Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 1ecfacb

Browse files
committed
Merge vapor-3 into master
2 parents a5e7e2e + 25447f8 commit 1ecfacb

File tree

153 files changed

+2641
-3882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+2641
-3882
lines changed

.circleci/config.yml

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,66 @@
1+
version: 2
12
jobs:
2-
build:
3-
docker:
4-
- image: buildpack-deps:trusty
3+
MacOS:
4+
macos:
5+
xcode: "10.0.0"
56
steps:
67
- checkout
8+
- restore_cache:
9+
keys:
10+
- v1-spm-deps-{{ checksum "Package.swift" }}
711
- run:
8-
name: Install Swift
9-
command: 'eval "$(curl -sL https://apt.vapor.sh)"'
12+
name: Install CMySQL and CTLS
13+
command: |
14+
brew tap vapor/homebrew-tap
15+
brew install cmysql
16+
brew install ctls
17+
brew install libressl
1018
- run:
11-
name: Install Vapor toolbox
19+
name: Build and Run Tests
20+
no_output_timeout: 1800
1221
command: |
13-
sudo apt-get install --yes vapor
14-
sudo apt-get install --yes cmysql
15-
sudo chmod -R a+rx /usr/
22+
swift package generate-xcodeproj --enable-code-coverage
23+
xcodebuild -scheme AdminPanel-Package -enableCodeCoverage YES test | xcpretty
1624
- run:
17-
name: Run Tests
25+
name: Report coverage to Codecov
26+
command: |
27+
bash <(curl -s https://codecov.io/bash)
28+
- save_cache:
29+
key: v1-spm-deps-{{ checksum "Package.swift" }}
30+
paths:
31+
- .build
32+
Linux:
33+
docker:
34+
- image: nodesvapor/vapor-ci:swift-4.2
35+
steps:
36+
- checkout
37+
- restore_cache:
38+
keys:
39+
- v2-spm-deps-{{ checksum "Package.swift" }}
40+
- run:
41+
name: Copy Package file
42+
command: cp Package.swift res
43+
- run:
44+
name: Build and Run Tests
45+
no_output_timeout: 1800
1846
command: |
1947
swift test -Xswiftc -DNOJSON
48+
- run:
49+
name: Restoring Package file
50+
command: mv res Package.swift
51+
- save_cache:
52+
key: v2-spm-deps-{{ checksum "Package.swift" }}
53+
paths:
54+
- .build
55+
workflows:
56+
version: 2
57+
build-and-test:
58+
jobs:
59+
- MacOS
60+
- Linux
61+
experimental:
62+
notify:
63+
branches:
64+
only:
65+
- master
66+
- develop

.codebeatignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Public/**
2+
Resources/Assets/**

.swiftlint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
included:
2+
- Sources
3+
function_body_length:
4+
warning: 60
5+
identifier_name:
6+
min_length:
7+
warning: 2
8+
line_length: 100
9+
disabled_rules:
10+
- opening_brace
11+
- nesting
12+
colon:
13+
flexible_right_spacing: true

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Nodes Vapor
3+
Copyright (c) 2016-2018 Nodes
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Package.swift

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
1+
// swift-tools-version:4.1
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
14
import PackageDescription
25

36
let package = Package(
47
name: "AdminPanel",
8+
products: [
9+
.library(
10+
name: "AdminPanel",
11+
targets: ["AdminPanel"]),
12+
],
513
dependencies: [
6-
.Package(url: "https://github.com/vapor/vapor.git", majorVersion: 2),
7-
.Package(url: "https://github.com/nodes-vapor/sugar.git", majorVersion: 2),
8-
.Package(url: "https://github.com/nodes-vapor/slugify.git", majorVersion: 1),
9-
.Package(url: "https://github.com/nodes-vapor/flash.git", majorVersion: 1),
10-
.Package(url: "https://github.com/nodes-vapor/paginator.git", majorVersion: 1),
11-
.Package(url: "https://github.com/vapor/auth.git", majorVersion: 1),
12-
.Package(url: "https://github.com/vapor/fluent.git", majorVersion: 2),
13-
.Package(url: "https://github.com/vapor/mysql-provider.git", majorVersion: 2),
14+
.package(url: "https://github.com/nodes-vapor/bootstrap.git", from: "4.0.0-rc"),
15+
.package(url: "https://github.com/nodes-vapor/flash.git", from: "5.0.0-rc"),
16+
.package(url: "https://github.com/nodes-vapor/paginator.git", from: "3.2.0"),
17+
.package(url: "https://github.com/nodes-vapor/reset.git", from: "1.0.0-rc"),
18+
.package(url: "https://github.com/nodes-vapor/submissions.git", from: "2.0.0-rc"),
19+
.package(url: "https://github.com/nodes-vapor/sugar.git", from: "4.0.0-rc"),
20+
21+
.package(url: "https://github.com/twof/VaporMailgunService.git", from: "1.1.0"),
22+
23+
.package(url: "https://github.com/vapor/auth.git", from: "2.0.0"),
24+
.package(url: "https://github.com/vapor/fluent-mysql.git", from: "3.0.0"),
25+
.package(url: "https://github.com/vapor/fluent.git", from: "3.0.0"),
26+
.package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"),
27+
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
28+
],
29+
targets: [
30+
.target(
31+
name: "AdminPanel",
32+
dependencies: [
33+
"Authentication",
34+
"Bootstrap",
35+
"Flash",
36+
"Fluent",
37+
"FluentMySQL",
38+
"Leaf",
39+
"Mailgun",
40+
"Paginator",
41+
"Reset",
42+
"Submissions",
43+
"Sugar",
44+
"Vapor",
45+
]),
46+
.testTarget(
47+
name: "AdminPanelTests",
48+
dependencies: ["AdminPanel"]),
1449
]
1550
)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
body {
2+
font-size: .875rem;
3+
}
4+
5+
.feather {
6+
width: 16px;
7+
height: 16px;
8+
vertical-align: text-bottom;
9+
}
10+
11+
.sticky-top {
12+
position: fixed;
13+
top: 0;
14+
right: 0;
15+
left: 0;
16+
z-index: 1030;
17+
}
18+
19+
.sidebar {
20+
position: fixed;
21+
top: 0;
22+
bottom: 0;
23+
left: 0;
24+
z-index: 100;
25+
padding: 48px 0 0;
26+
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
27+
}
28+
29+
.sidebar-sticky {
30+
position: relative;
31+
top: 0;
32+
height: calc(100vh - 48px);
33+
padding-top: .5rem;
34+
overflow-x: hidden;
35+
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
36+
}
37+
38+
@supports ((position: -webkit-sticky) or (position: sticky)) {
39+
.sidebar-sticky {
40+
position: -webkit-sticky;
41+
position: sticky;
42+
}
43+
}
44+
45+
.sidebar .nav-link {
46+
font-weight: 500;
47+
color: #333;
48+
}
49+
50+
.sidebar .nav-link .feather {
51+
margin-right: 4px;
52+
color: #999;
53+
}
54+
55+
.sidebar .nav-link.active {
56+
color: #007bff;
57+
}
58+
59+
.sidebar .nav-link:hover .feather,
60+
.sidebar .nav-link.active .feather {
61+
color: inherit;
62+
}
63+
64+
.sidebar-heading {
65+
font-size: .75rem;
66+
text-transform: uppercase;
67+
}
68+
69+
[role="main"] {
70+
padding-top: 48px;
71+
}
72+
73+
.alerts {
74+
padding-top: 1rem;
75+
}
76+
77+
.alert {
78+
overflow: auto;
79+
}
80+
81+
.navbar-brand {
82+
padding-top: .75rem;
83+
padding-bottom: .75rem;
84+
font-size: 1rem;
85+
background-color: rgba(0, 0, 0, .25);
86+
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
87+
}
88+
89+
.navbar-brand .badge {
90+
vertical-align: text-bottom;
91+
}

Public/AdminPanel/css/login.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
html,
2+
body {
3+
height: 100%;
4+
}
5+
6+
body {
7+
display: -ms-flexbox;
8+
display: flex;
9+
-ms-flex-align: center;
10+
align-items: center;
11+
padding-top: 40px;
12+
padding-bottom: 40px;
13+
background-color: #f5f5f5;
14+
}
15+
16+
.form-signin {
17+
width: 100%;
18+
max-width: 500px;
19+
padding: 15px;
20+
margin: auto;
21+
}
22+
.form-signin .checkbox {
23+
font-weight: 400;
24+
}
25+
.form-signin .form-control {
26+
position: relative;
27+
box-sizing: border-box;
28+
height: auto;
29+
padding: 10px;
30+
font-size: 16px;
31+
}
32+
.form-signin .form-control:focus {
33+
z-index: 2;
34+
}

0 commit comments

Comments
 (0)