aboutsummaryrefslogtreecommitdiffstats
path: root/resources/views
diff options
context:
space:
mode:
authorLibravatar Ricardo <ricardo@cino.io>2023-10-13 14:12:03 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-13 13:12:03 +0100
commite503468660a13760010a94ecda5f0625c6f47f87 (patch)
treefa532f54fc5f091de08d55405ec6339bd2440a02 /resources/views
parent1.3.16 [skip ci] (diff)
downloadferdium-server-e503468660a13760010a94ecda5f0625c6f47f87.tar.gz
ferdium-server-e503468660a13760010a94ecda5f0625c6f47f87.tar.zst
ferdium-server-e503468660a13760010a94ecda5f0625c6f47f87.zip
Server re-build with latest AdonisJS framework & Typescript (#47)
* chore: setup first basis structure * chore: ensure styling is loaded correctly * chore: comply to new routing syntax by replace . with / in routes/resource locations * chore: add login controller * chore: correctly use views with slash instead of dot * chore: working login + tests * chore: clean up tests * chore: add password-forgot endpoint and matching test * chore: add delete page test * chore: add logout test * chore: add reset-password route and tests * chore: remove obsolete comment * chore: add account-page and tests * chore: add data page & first step of the test * chore: add transfer/import data feature and tests * chore: add export and basic test * chore: add all static api routes with tests * Regenerate 'pnpm-lock.json' and fix bad merge conflict WIP: - Tests have been commented out since they dont work - Server doesn't start * easier dev and test runs * - remove --require-pragma from reformat-files so formatting works properly - run pnpm reformat-files over codebase - remove .json files from .eslintignore - add invalid.json file to .eslintignore - configure prettier properly in eslint config - add type jsdoc to prettier config - run adonis generate:manifest command to regenerate ace-manifest.json - specify volta in package.json - introduce typecheck npm script - remove unused .mjs extension from npm scripts - install missing type definition dependencies - add pnpm.allowedDeprecatedVersions to package.json - fix invalid extends in tsconfig.json causing TS issues throughout codebase - remove @ts-ignore throughout codebase which is not relevant anymore - enable some of the tsconfig options - remove outdated eslint-disable from codebase - change deprecated faker.company.companyName() to faker.company.name() - fix TS issues inside transfer.spec.ts * - update to latest node and pnpm versions - upgrade all non-major dependencies to latest - install missing @types/luxon dependency - add cuid to pnpm.allowedDeprecatedVersions - add esModuleInterop config option to tsconfig - migrate more deprecated faker methods to new ones - add more temporary ts-ignore to code * - update eslint config - remove trailingComma: all since default in prettier v3 - add typecheck command to prepare-code npm script - upgrade various dependencies to latest major version - update tsconfig to include only useful config options - disable some lint issues and fix others * - add test command to prepare-code - disable strictPropertyInitialization flag in tsconfig which creates issues with adonis models - update precommit hook to excute pnpm prepare-code - remove ts-ignore statements from all models * fix node and pnpm dependency update * add cross env (so that we can develop on windows) * add signup endpoint (TODO: JWT auth) * Add login endpoint * Add me and updateMe endpoints * Add service endpoint * refactor: change endpoints to use jwt * add recipes endpoint * add workspaces endpoint * fix web controllors for login and post import * Update node deps * Change auth middleware (for web) and exempt api from CSRF * Add import endpoint (franz import) * Fix export/import logic * Fix service and workspace data in user/data * Fix partial lint * chore: workaround lint issues * fix: migration naming had two . * Sync back node with recipes repo * Temporarily ignore typescript * Fix adonisrc to handle public folder static assets * Fix issue with production database * add Legacy Password Provider * Fix lint errors * Fix issue on login errors frontend * add Legacy Password Provider * Fix issue with customIcons * Fix issue with auth tokens * Update 'node' to '18.18.0' * make docker work * improve docker entrypoint (test api performance) * Add migration database script * NODE_ENV on recipes * prefer @ts-expect-error over @ts-ignore * small fixes * Update 'pnpm' to '8.7.6' * fix error catch * Automatically generate JWT Public and Private keys * Use custom Adonis5-jwt * Update code to use secret (old way, no breaking changes) * Normalize appKey * Trick to make JWT tokens on client work with new version * Fix error with new JWT logic * Change migration and how we store JWT * Fix 500 response code (needs to be 401) * Improve logic and fix bugs * Fix build and entrypoint logic * Catch error if appKey changes * Add newToken logic * Fix lint (ignore any errors) * Add build for PRs * pnpm reformat-files result * Fix some tests * Fix reset password not working (test failing) * Restore csrfTokens (disabled by accident) * Fix pnpm start command with .env * Disable failing tests on the transfer endpoint (TODO) * Add tests to PR build * Fix build * Remove unnecessary assertStatus * Add typecheck * hash password on UserFactory (fix build) * Add JWT_USE_PEM true by default (increase security) * fix name of github action --------- Co-authored-by: Vijay A <vraravam@users.noreply.github.com> Co-authored-by: Balaji Vijayakumar <kuttibalaji.v6@gmail.com> Co-authored-by: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Co-authored-by: André Oliveira <oliveira.andrerodrigues95@gmail.com>
Diffstat (limited to 'resources/views')
-rw-r--r--resources/views/dashboard/account.edge28
-rw-r--r--resources/views/dashboard/data.edge340
-rw-r--r--resources/views/dashboard/delete.edge10
-rw-r--r--resources/views/dashboard/forgotPassword.edge12
-rw-r--r--resources/views/dashboard/login.edge14
-rw-r--r--resources/views/dashboard/resetPassword.edge14
-rw-r--r--resources/views/dashboard/transfer.edge14
-rw-r--r--resources/views/emails/reset_password.edge8
-rw-r--r--resources/views/layouts/main.edge6
-rw-r--r--resources/views/layouts/v2.edge4
-rw-r--r--resources/views/others/import.edge12
-rw-r--r--resources/views/others/index.edge5
-rw-r--r--resources/views/others/message.edge2
-rw-r--r--resources/views/others/new.edge4
14 files changed, 251 insertions, 222 deletions
diff --git a/resources/views/dashboard/account.edge b/resources/views/dashboard/account.edge
index b805ac5..3a1f53c 100644
--- a/resources/views/dashboard/account.edge
+++ b/resources/views/dashboard/account.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
@@ -6,19 +6,19 @@
6 <h1 class="text-gray-700 text-center text-2xl pb-5"> 6 <h1 class="text-gray-700 text-center text-2xl pb-5">
7 Your Ferdium account 7 Your Ferdium account
8 </h1> 8 </h1>
9 @if(flashMessage('error')) 9 @if(flashMessages.has('error'))
10 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 10 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
11 {{ flashMessage('error') }} 11 {{ flashMessages.get('error') }}
12 </div> 12 </div>
13 @endif 13 @endif
14 @if(old('message')) 14 @if(flashMessages.has('message'))
15 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 15 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
16 {{ old('message') }} 16 {{ flashMessages.get('message') }}
17 </div> 17 </div>
18 @endif 18 @endif
19 @if(flashMessage('notification')) 19 @if(flashMessages.has('notification'))
20 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 20 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
21 {{ flashMessage('notification.message') }} 21 {{ flashMessages.get('notification.message') }}
22 </div> 22 </div>
23 @endif 23 @endif
24 @if(success === true) 24 @if(success === true)
@@ -34,7 +34,7 @@
34 <div> 34 <div>
35 <input 35 <input
36 class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" 36 class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
37 type="text" value="{{ old('name', username) }}" placeholder="Name" name="username" required> 37 type="text" value="{{ flashMessages.get('username', username) }}" placeholder="Name" name="username" required>
38 </div> 38 </div>
39 </div> 39 </div>
40 <div class="mb-6"> 40 <div class="mb-6">
@@ -42,7 +42,7 @@
42 <div> 42 <div>
43 <input 43 <input
44 class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" 44 class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
45 type="text" value="{{ old('lastname', lastname) }}" placeholder="Last Name" name="lastname" required> 45 type="text" value="{{ flashMessages.get('lastname', lastname) }}" placeholder="Last Name" name="lastname" required>
46 </div> 46 </div>
47 </div> 47 </div>
48 <div class="mb-6"> 48 <div class="mb-6">
@@ -50,7 +50,7 @@
50 <div> 50 <div>
51 <input 51 <input
52 class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" 52 class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
53 type="email" value="{{ old('email', email) }}" placeholder="E-Mail" name="email" required> 53 type="email" value="{{ flashMessages.get('email', email) }}" placeholder="E-Mail" name="email" required>
54 </div> 54 </div>
55 </div> 55 </div>
56 <div class="mb-6"> 56 <div class="mb-6">
@@ -67,16 +67,16 @@
67 </form> 67 </form>
68 <div class="text-center"> 68 <div class="text-center">
69 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3" 69 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3"
70 href="/user/data">My account data</a> 70 href="/user/data">My account data</a>
71 <br /> 71 <br />
72 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3" 72 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3"
73 href="/user/transfer">Import/Export account data</a> 73 href="/user/transfer">Import/Export account data</a>
74 <br /> 74 <br />
75 <a class="w-full font-bold text-sm text-red-500 hover:text-red-800 mb-3" 75 <a class="w-full font-bold text-sm text-red-500 hover:text-red-800 mb-3"
76 href="/user/delete">Delete my account</a> 76 href="/user/delete">Delete my account</a>
77 <br /> 77 <br />
78 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3" 78 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3"
79 href="/user/logout">Logout</a> 79 href="/user/logout">Logout</a>
80 </div> 80 </div>
81 </div> 81 </div>
82</div> 82</div>
diff --git a/resources/views/dashboard/data.edge b/resources/views/dashboard/data.edge
index cf48c1c..ac1ee40 100644
--- a/resources/views/dashboard/data.edge
+++ b/resources/views/dashboard/data.edge
@@ -1,179 +1,201 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<style> 4<style>
5 table { 5 table {
6 border: 1px solid #919191; 6 border: 1px solid #919191;
7 border-collapse: collapse; 7 border-collapse: collapse;
8 table-layout: fixed; 8 table-layout: fixed;
9 width: 100%; 9 width: 100%;
10 } 10 }
11 table thead { text-align: center; }
12 table tbody { text-align: right; }
13 table tr { border-bottom: 1px solid #919191; }
14 table tbody tr:nth-child(even) { background: var(--tertiary-color); }
15 table th { background: var(--secondary-color); font-weight: bold; }
16 table th, table td { padding: 1rem; }
17 table th:not(last-of-type), table td:not(last-of-type) { border-right: 1px solid #919191; }
18 11
12 table thead {
13 text-align: center;
14 }
15
16 table tbody {
17 text-align: right;
18 }
19
20 table tr {
21 border-bottom: 1px solid #919191;
22 }
23
24 table tbody tr:nth-child(even) {
25 background: var(--tertiary-color);
26 }
27
28 table th {
29 background: var(--secondary-color);
30 font-weight: bold;
31 }
32
33 table th,
34 table td {
35 padding: 1rem;
36 }
37
38 table th:not(last-of-type),
39 table td:not(last-of-type) {
40 border-right: 1px solid #919191;
41 }
19</style> 42</style>
20 43
21<div class="bg-purple-200 flex items-center justify-center"> 44<div class="bg-purple-200 flex items-center justify-center">
22 <div class="w-full bg-white shadow-md rounded px-8 pt-6 mt-5 pb-8 mb-4"> 45 <div class="w-full bg-white shadow-md rounded px-8 pt-6 mt-5 pb-8 mb-4">
23 <h1 class="text-gray-700 text-center text-2xl pb-5">Your Account Data</h1> 46 <h1 class="text-gray-700 text-center text-2xl pb-5">Your Account Data</h1>
24 47
25
26 <table class="w-full rounded-lg overflow-hidden sm:shadow-lg my-5"> 48 <table class="w-full rounded-lg overflow-hidden sm:shadow-lg my-5">
27 <tr> 49 <tr>
28 <th> 50 <th>
29 Name 51 Name
30 </th> 52 </th>
31 <th> 53 <th>
32 Value 54 Value
33 </th> 55 </th>
34 </tr> 56 </tr>
35 <tr> 57 <tr>
36 <td> 58 <td>
37 E-Mail 59 E-Mail
38 </td> 60 </td>
39 <td> 61 <td>
40 {{ mail }} 62 {{ mail }}
41 </td> 63 </td>
42 </tr> 64 </tr>
43 <tr> 65 <tr>
44 <td> 66 <td>
45 Username 67 Username
46 </td> 68 </td>
47 <td> 69 <td>
48 {{ username }} 70 {{ username }}
49 </td> 71 </td>
50 </tr> 72 </tr>
51 <tr> 73 <tr>
52 <td> 74 <td>
53 Last Name 75 Last Name
54 </td> 76 </td>
55 <td> 77 <td>
56 {{ lastname }} 78 {{ lastname }}
57 </td> 79 </td>
58 </tr> 80 </tr>
59 <tr> 81 <tr>
60 <td> 82 <td>
61 Created account on 83 Created account on
62 </td> 84 </td>
63 <td> 85 <td>
64 {{ created }} 86 {{ created }}
65 </td> 87 </td>
66 </tr> 88 </tr>
67 <tr> 89 <tr>
68 <td> 90 <td>
69 Last account update on 91 Last account update on
70 </td> 92 </td>
71 <td> 93 <td>
72 {{ updated }} 94 {{ updated }}
73 </td> 95 </td>
74 </tr> 96 </tr>
75 </table> 97 </table>
76 98
77 <h1 class="text-gray-700 text-center text-2xl pb-5">Your Services</h1> 99 <h1 class="text-gray-700 text-center text-2xl pb-5">Your Services</h1>
78 <table class="w-full rounded-lg overflow-hidden sm:shadow-lg my-5"> 100 <table class="w-full rounded-lg overflow-hidden sm:shadow-lg my-5">
79 <tr> 101 <tr>
80 <th> 102 <th>
81 Service ID 103 Service ID
82 </th> 104 </th>
83 <th> 105 <th>
84 Name 106 Name
85 </th> 107 </th>
86 <th> 108 <th>
87 Recipe ID 109 Recipe ID
88 </th> 110 </th>
89 <th> 111 <th>
90 Settings 112 Settings
91 </th> 113 </th>
92 <th> 114 <th>
93 Created 115 Created
94 </th> 116 </th>
95 <th> 117 <th>
96 Last updated 118 Last updated
97 </th> 119 </th>
98 </tr> 120 </tr>
99 121
100 @each(service in services) 122 @each(service in services)
101 <tr> 123 <tr>
102 <td> 124 <td>
103 {{ service.serviceId }} 125 {{ service.serviceId }}
104 </td> 126 </td>
105 <td> 127 <td>
106 {{ service.name }} 128 {{ service.name }}
107 </td> 129 </td>
108 <td> 130 <td>
109 {{ service.recipeId }} 131 {{ service.recipeId }}
110 </td> 132 </td>
111 <td> 133 <td>
112 {{ stringify(service.settings) }} 134 {{ stringify(service.settings) }}
113 </td> 135 </td>
114 <td> 136 <td>
115 {{ service.created_at }} 137 {{ service.createdAt.toFormat('yyyy-MM-dd HH:mm:ss') }}
116 </td> 138 </td>
117 <td> 139 <td>
118 {{ service.updated_at }} 140 {{ service.updatedAt.toFormat('yyyy-MM-dd HH:mm:ss') }}
119 </td> 141 </td>
120 </tr> 142 </tr>
121 @endeach 143 @endeach
122 </table> 144 </table>
123 145
124 <h1 class="text-gray-700 text-center text-2xl pb-5">Your Workspaces</h1> 146 <h1 class="text-gray-700 text-center text-2xl pb-5">Your Workspaces</h1>
125 <table> 147 <table>
126 <tr> 148 <tr>
127 <th> 149 <th>
128 Service ID 150 Workspace ID
129 </th> 151 </th>
130 <th> 152 <th>
131 Name 153 Name
132 </th> 154 </th>
133 <th> 155 <th>
134 Order 156 Order
135 </th> 157 </th>
136 <th> 158 <th>
137 Services 159 Services
138 </th> 160 </th>
139 <th> 161 <th>
140 Data 162 Data
141 </th> 163 </th>
142 <th> 164 <th>
143 Created 165 Created
144 </th> 166 </th>
145 <th> 167 <th>
146 Last updated 168 Last updated
147 </th> 169 </th>
148 </tr> 170 </tr>
149 171
150 @each(workspace in workspaces) 172 @each(workspace in workspaces)
151 <tr> 173 <tr>
152 <td> 174 <td>
153 {{ workspace.workspaceId }} 175 {{ workspace.workspaceId }}
154 </td> 176 </td>
155 <td> 177 <td>
156 {{ workspace.name }} 178 {{ workspace.name }}
157 </td> 179 </td>
158 <td> 180 <td>
159 {{ workspace.order }} 181 {{ workspace.order }}
160 </td> 182 </td>
161 <td> 183 <td>
162 {{ stringify(workspace.services) }} 184 {{ stringify(workspace.services) }}
163 </td> 185 </td>
164 <td> 186 <td>
165 {{ stringify(workspace.data) }} 187 {{ stringify(workspace.data) }}
166 </td> 188 </td>
167 <td> 189 <td>
168 {{ workspace.created_at }} 190 {{ workspace.createdAt.toFormat('yyyy-MM-dd HH:mm:ss') }}
169 </td> 191 </td>
170 <td> 192 <td>
171 {{ workspace.updated_at }} 193 {{ workspace.updatedAt.toFormat('yyyy-MM-dd HH:mm:ss') }}
172 </td> 194 </td>
173 </tr> 195 </tr>
174 @endeach 196 @endeach
175 </table> 197 </table>
176 198
177 <div class="text-center"> 199 <div class="text-center">
178 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3" href="/user/account">Back to My 200 <a class="w-full font-bold text-sm text-gray-500 hover:text-gray-800 mb-3" href="/user/account">Back to My
179 Account</a> 201 Account</a>
@@ -182,4 +204,4 @@
182 </div> 204 </div>
183</div> 205</div>
184</div> 206</div>
185@endsection \ No newline at end of file 207@endsection
diff --git a/resources/views/dashboard/delete.edge b/resources/views/dashboard/delete.edge
index d058a73..ea4a431 100644
--- a/resources/views/dashboard/delete.edge
+++ b/resources/views/dashboard/delete.edge
@@ -1,17 +1,17 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
5 <div class="w-full max-w-lg bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"> 5 <div class="w-full max-w-lg bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
6 <h1 class="text-gray-700 text-center text-2xl pb-5">Delete your account</h1> 6 <h1 class="text-gray-700 text-center text-2xl pb-5">Delete your account</h1>
7 @if(flashMessage('error')) 7 @if(flashMessages.has('error'))
8 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 8 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
9 {{ flashMessage('error') }} 9 {{ flashMessages.get('error') }}
10 </div> 10 </div>
11 @endif 11 @endif
12 @if(old('message')) 12 @if(flashMessages.has('message'))
13 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 13 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
14 {{ old('message') }} 14 {{ flashMessages.get('message') }}
15 </div> 15 </div>
16 @endif 16 @endif
17 17
diff --git a/resources/views/dashboard/forgotPassword.edge b/resources/views/dashboard/forgotPassword.edge
index cd5d8c0..b41e1cc 100644
--- a/resources/views/dashboard/forgotPassword.edge
+++ b/resources/views/dashboard/forgotPassword.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
@@ -8,14 +8,14 @@
8 Forgot Password? 8 Forgot Password?
9 </h1> 9 </h1>
10 10
11 @if(flashMessage('error')) 11 @if(flashMessages.has('error'))
12 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 12 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
13 {{ flashMessage('error') }} 13 {{ flashMessages.get('error') }}
14 </div> 14 </div>
15 @endif 15 @endif
16 @if(old('message')) 16 @if(flashMessages.has('message'))
17 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 17 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
18 {{ old('message') }} 18 {{ flashMessages.get('message') }}
19 </div> 19 </div>
20 @endif 20 @endif
21 21
@@ -30,7 +30,7 @@
30 name="mail" 30 name="mail"
31 type="text" 31 type="text"
32 placeholder="E-Mail" 32 placeholder="E-Mail"
33 value="{{ old('mail', '') }}" 33 value="{{ flashMessages.get('mail', '') }}"
34 required> 34 required>
35 </div> 35 </div>
36 36
diff --git a/resources/views/dashboard/login.edge b/resources/views/dashboard/login.edge
index 23995ae..360ad98 100644
--- a/resources/views/dashboard/login.edge
+++ b/resources/views/dashboard/login.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
@@ -8,14 +8,14 @@
8 Login 8 Login
9 </h1> 9 </h1>
10 10
11 @if(flashMessage('error')) 11 @if(flashMessages.has('error'))
12 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 12 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
13 {{ flashMessage('error') }} 13 {{ flashMessages.get('error') }}
14 </div> 14 </div>
15 @endif 15 @endif
16 @if(old('message')) 16 @if(flashMessages.has('message'))
17 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 17 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
18 {{ old('message') }} 18 {{ flashMessages.get('message') }}
19 </div> 19 </div>
20 @endif 20 @endif
21 21
@@ -30,7 +30,7 @@
30 name="mail" 30 name="mail"
31 type="text" 31 type="text"
32 placeholder="E-Mail" 32 placeholder="E-Mail"
33 value="{{ old('mail', '') }}" 33 value="{{ flashMessages.get('mail', '') }}"
34 required> 34 required>
35 </div> 35 </div>
36 <div class="mb-6"> 36 <div class="mb-6">
@@ -60,7 +60,7 @@
60 </a> 60 </a>
61 </div> 61 </div>
62 <div class="text-center"> 62 <div class="text-center">
63 <a class="w-full font-bold text-sm text-blue-500 hover:text-blue-800" href="../import"> 63 <a class="w-full font-bold text-sm text-blue-500 hover:text-blue-800" href="/import">
64 Import your Franz/Ferdi account 64 Import your Franz/Ferdi account
65 </a> 65 </a>
66 </div> 66 </div>
diff --git a/resources/views/dashboard/resetPassword.edge b/resources/views/dashboard/resetPassword.edge
index 4b39169..33b08c3 100644
--- a/resources/views/dashboard/resetPassword.edge
+++ b/resources/views/dashboard/resetPassword.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
@@ -8,14 +8,14 @@
8 Reset Your Password 8 Reset Your Password
9 </h1> 9 </h1>
10 10
11 @if(flashMessage('error')) 11 @if(flashMessages.has('error'))
12 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 12 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
13 {{ flashMessage('error') }} 13 {{ flashMessages.get('error') }}
14 </div> 14 </div>
15 @endif 15 @endif
16 @if(old('message')) 16 @if(flashMessages.has('message'))
17 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 17 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
18 {{ old('message') }} 18 {{ flashMessages.get('message') }}
19 </div> 19 </div>
20 @endif 20 @endif
21 21
@@ -30,7 +30,7 @@
30 name="password" 30 name="password"
31 type="password" 31 type="password"
32 placeholder="New Password" 32 placeholder="New Password"
33 value="{{ old('password', '') }}" 33 value="{{ flashMessages.get('password', '') }}"
34 required> 34 required>
35 </div> 35 </div>
36 <div class="mb-4"> 36 <div class="mb-4">
@@ -43,7 +43,7 @@
43 name="password_confirmation" 43 name="password_confirmation"
44 type="password" 44 type="password"
45 placeholder="Confirm Password" 45 placeholder="Confirm Password"
46 value="{{ old('password_confirmation', '') }}" 46 value="{{ flashMessages.get('password_confirmation', '') }}"
47 required> 47 required>
48 </div> 48 </div>
49 49
diff --git a/resources/views/dashboard/transfer.edge b/resources/views/dashboard/transfer.edge
index bdae1f4..759edbf 100644
--- a/resources/views/dashboard/transfer.edge
+++ b/resources/views/dashboard/transfer.edge
@@ -1,22 +1,22 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
5 <div class="w-full max-w-lg bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"> 5 <div class="w-full max-w-lg bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
6 <h1 class="text-gray-700 text-center text-2xl pb-5">Import/Export data from another Ferdium server</h1> 6 <h1 class="text-gray-700 text-center text-2xl pb-5">Import/Export data from another Ferdium server</h1>
7 @if(flashMessage('error')) 7 @if(flashMessages.has('error'))
8 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 8 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
9 {{ flashMessage('error') }} 9 {{ flashMessages.get('error') }}
10 </div> 10 </div>
11 @endif 11 @endif
12 @if(old('message')) 12 @if(flashMessages.has('message'))
13 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 13 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
14 {{ old('message') }} 14 {{ flashMessages.get('message') }}
15 </div> 15 </div>
16 @endif 16 @endif
17 @if(flashMessage('notification')) 17 @if(flashMessages.has('notification'))
18 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 18 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
19 {{ flashMessage('notification.message') }} 19 {{ flashMessages.get('notification.message') }}
20 </div> 20 </div>
21 @endif 21 @endif
22 @if(success === true) 22 @if(success === true)
diff --git a/resources/views/emails/reset_password.edge b/resources/views/emails/reset_password.edge
new file mode 100644
index 0000000..e2d2c1c
--- /dev/null
+++ b/resources/views/emails/reset_password.edge
@@ -0,0 +1,8 @@
1Hello {{ username }},
2we received a request to reset your Ferdium account password.
3Use the link below to reset your password. If you didn't requested that your password be reset, please ignore this
4message.
5
6{{ appUrl }}/user/reset?token={{ encodeURIComponent(token) }}
7
8This message was sent automatically. Please do not reply.
diff --git a/resources/views/layouts/main.edge b/resources/views/layouts/main.edge
index c611bc5..a53b6c5 100644
--- a/resources/views/layouts/main.edge
+++ b/resources/views/layouts/main.edge
@@ -6,10 +6,10 @@
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 <title>ferdium-server</title> 8 <title>ferdium-server</title>
9 <link rel="shortcut icon" type="image/jpg" href="img/favicon.ico" /> 9 <link rel="shortcut icon" type="image/jpg" href="/img/favicon.ico" />
10 10
11 {{ style('css/vanilla') }} 11 <link rel="stylesheet" type="text/css" href="/css/vanilla.css">
12 {{ style('css/main') }} 12 <link rel="stylesheet" type="text/css" href="/css/main.css">
13</head> 13</head>
14 14
15<body> 15<body>
diff --git a/resources/views/layouts/v2.edge b/resources/views/layouts/v2.edge
index 38af29f..ac20cab 100644
--- a/resources/views/layouts/v2.edge
+++ b/resources/views/layouts/v2.edge
@@ -8,8 +8,8 @@
8 <title>Server</title> 8 <title>Server</title>
9 <link rel="shortcut icon" type="image/jpg" href="/img/favicon.ico" /> 9 <link rel="shortcut icon" type="image/jpg" href="/img/favicon.ico" />
10 10
11 {{ style('css/tailwind') }} 11 <link rel="stylesheet" type="text/css" href="/css/tailwind.css">
12 {{ style('css/main') }} 12 <link rel="stylesheet" type="text/css" href="/css/main.css">
13</head> 13</head>
14 14
15<body> 15<body>
diff --git a/resources/views/others/import.edge b/resources/views/others/import.edge
index 7fb58de..ca7cc6d 100644
--- a/resources/views/others/import.edge
+++ b/resources/views/others/import.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
@@ -11,14 +11,14 @@
11 Please login using your Franz/Ferdi account. We will create a new Ferdium account with the same credentials. 11 Please login using your Franz/Ferdi account. We will create a new Ferdium account with the same credentials.
12 </p> 12 </p>
13 13
14 @if(flashMessage('error')) 14 @if(flashMessages.has('error'))
15 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 15 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
16 {{ flashMessage('error') }} 16 {{ flashMessages.get('error') }}
17 </div> 17 </div>
18 @endif 18 @endif
19 @if(old('message')) 19 @if(flashMessages.has('message'))
20 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"> 20 <div class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4">
21 {{ old('message') }} 21 {{ flashMessages.get('message') }}
22 </div> 22 </div>
23 @endif 23 @endif
24 24
@@ -32,7 +32,7 @@
32 name="email" 32 name="email"
33 type="text" 33 type="text"
34 placeholder="E-Mail" 34 placeholder="E-Mail"
35 value="{{ old('email', '') }}" 35 value="{{ flashMessages.get('email', '') }}"
36 required> 36 required>
37 </div> 37 </div>
38 <div class="mb-6"> 38 <div class="mb-6">
diff --git a/resources/views/others/index.edge b/resources/views/others/index.edge
index 5cc5726..1f595b6 100644
--- a/resources/views/others/index.edge
+++ b/resources/views/others/index.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4 <!--Main--> 4 <!--Main-->
@@ -39,7 +39,7 @@
39 39
40 <!--Right Col--> 40 <!--Right Col-->
41 <div class="w-full xl:w-3/5 py-6 overflow-y-hidden"> 41 <div class="w-full xl:w-3/5 py-6 overflow-y-hidden">
42 <img class="w-5/6 mx-auto lg:mr-0 slide-in-bottom" src="{{ assetsUrl('img/hero.png') }}"> 42 <img class="w-5/6 mx-auto lg:mr-0 slide-in-bottom" src="/img/hero.png">
43 </div> 43 </div>
44 44
45 </div> 45 </div>
@@ -53,6 +53,5 @@
53 53
54 // Show on page 54 // Show on page
55 document.getElementById('server').innerText = server; 55 document.getElementById('server').innerText = server;
56
57 </script> 56 </script>
58@endsection 57@endsection
diff --git a/resources/views/others/message.edge b/resources/views/others/message.edge
index 59be2ed..08200da 100644
--- a/resources/views/others/message.edge
+++ b/resources/views/others/message.edge
@@ -1,4 +1,4 @@
1@layout('layouts.v2') 1@layout('layouts/v2')
2 2
3@section('content') 3@section('content')
4<div class="w-screen bg-purple-200 flex items-center justify-center"> 4<div class="w-screen bg-purple-200 flex items-center justify-center">
diff --git a/resources/views/others/new.edge b/resources/views/others/new.edge
index ed97a34..66587c2 100644
--- a/resources/views/others/new.edge
+++ b/resources/views/others/new.edge
@@ -1,4 +1,4 @@
1@layout('layouts.main') 1@layout('layouts/main')
2 2
3@section('content') 3@section('content')
4<h1>Create a new recipe</h1> 4<h1>Create a new recipe</h1>
@@ -33,5 +33,5 @@
33 <button type="submit" id="submitbutton">Create recipe</button> 33 <button type="submit" id="submitbutton">Create recipe</button>
34</form> 34</form>
35 35
36<script src="js/new.js"></script> 36<script src="/js/new.js"></script>
37@endsection 37@endsection