aboutsummaryrefslogtreecommitdiffstats
path: root/resources/views
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-09-04 09:59:25 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-09-04 09:59:25 +0200
commitea03e3766efffeb5e6b9bb90f566e64bf44640f3 (patch)
tree36f52de9554a08456949cc4a7fa5b40adc84ca94 /resources/views
parentBetter response when recipe creation is disabled (diff)
downloadferdium-server-ea03e3766efffeb5e6b9bb90f566e64bf44640f3.tar.gz
ferdium-server-ea03e3766efffeb5e6b9bb90f566e64bf44640f3.tar.zst
ferdium-server-ea03e3766efffeb5e6b9bb90f566e64bf44640f3.zip
Add user dashboard
Diffstat (limited to 'resources/views')
-rw-r--r--resources/views/dashboard/account.edge63
-rw-r--r--resources/views/dashboard/data.edge167
-rw-r--r--resources/views/dashboard/delete.edge31
-rw-r--r--resources/views/dashboard/login.edge42
-rw-r--r--resources/views/layouts/main.edge18
5 files changed, 321 insertions, 0 deletions
diff --git a/resources/views/dashboard/account.edge b/resources/views/dashboard/account.edge
new file mode 100644
index 0000000..0361fa4
--- /dev/null
+++ b/resources/views/dashboard/account.edge
@@ -0,0 +1,63 @@
1@layout('layouts.main')
2
3@section('content')
4<h2>Your Ferdi account</h2>
5@if(flashMessage('error'))
6 <div class="alert">
7 {{ flashMessage('error') }}
8 </div>
9@endif
10@if(old('message'))
11 <div class="alert">
12 {{ old('message') }}
13 </div>
14@endif
15@if(flashMessage('notification'))
16 <div class="alert">
17 {{ flashMessage('notification.message') }}
18 </div>
19@endif
20@if(success === true)
21 <div class="alert" style="background-color:#28C76F;">
22 Sucessfully updated your user account
23 </div>
24@endif
25
26<form action="/user/account" method="POST">
27 {{ csrfField() }}
28 <div>
29 <label>Name</label>
30 <div>
31 <input type="text" value="{{ old('name', username) }}" placeholder="Name" name="username" required>
32 </div>
33 </div>
34 <div>
35 <label>E-Mail</label>
36 <div>
37 <input type="email" value="{{ old('email', email) }}" placeholder="E-Mail" name="email" required>
38 </div>
39 </div>
40 <div>
41 <label>Password</label>
42 <div>
43 <input type="password" placeholder="*********" name="password">
44 </div>
45 </div>
46 <div>
47 <button style="background-color:#28C76F;margin-bottom:1rem;">Change settings</button>
48 </div>
49</form>
50
51<div>
52 <a class="button" href="/user/delete" style="background-color:#F6416C;margin-bottom:1rem;">Delete my account</a>
53</div>
54<div>
55 <a class="button" href="/user/data" style="margin-bottom:1rem;">My account data</a>
56</div>
57<div>
58 <a class="button" href="/user/logout">Logout</a>
59</div>
60
61</div>
62
63@endsection \ No newline at end of file
diff --git a/resources/views/dashboard/data.edge b/resources/views/dashboard/data.edge
new file mode 100644
index 0000000..1935229
--- /dev/null
+++ b/resources/views/dashboard/data.edge
@@ -0,0 +1,167 @@
1@layout('layouts.main')
2
3@section('content')
4<h2>Your Ferdi account data</h2>
5@if(flashMessage('error'))
6 <div class="alert">
7 {{ flashMessage('error') }}
8 </div>
9@endif
10@if(old('message'))
11 <div class="alert">
12 {{ old('message') }}
13 </div>
14@endif
15
16<h4>General account data</h4>
17<table>
18 <tr>
19 <th>
20 Name
21 </th>
22 <th>
23 Value
24 </th>
25 </tr>
26 <tr>
27 <td>
28 E-Mail
29 </td>
30 <td>
31 {{ mail }}
32 </td>
33 </tr>
34 <tr>
35 <td>
36 Username
37 </td>
38 <td>
39 {{ username }}
40 </td>
41 </tr>
42 <tr>
43 <td>
44 Created account on
45 </td>
46 <td>
47 {{ created }}
48 </td>
49 </tr>
50 <tr>
51 <td>
52 Last account update on
53 </td>
54 <td>
55 {{ updated }}
56 </td>
57 </tr>
58</table>
59
60<h4>Your services</h4>
61<table>
62 <tr>
63 <th>
64 Service ID
65 </th>
66 <th>
67 Name
68 </th>
69 <th>
70 Recipe ID
71 </th>
72 <th>
73 Settings
74 </th>
75 <th>
76 Created
77 </th>
78 <th>
79 Last updated
80 </th>
81 </tr>
82
83 @each(service in services)
84 <tr>
85 <td>
86 {{ service.serviceId }}
87 </td>
88 <td>
89 {{ service.name }}
90 </td>
91 <td>
92 {{ service.recipeId }}
93 </td>
94 <td>
95 {{ service.settings }}
96 </td>
97 <td>
98 {{ service.created_at }}
99 </td>
100 <td>
101 {{ service.updated_at }}
102 </td>
103 </tr>
104 @endeach
105</table>
106
107
108<h4>Your workspaces</h4>
109<table>
110 <tr>
111 <th>
112 Service ID
113 </th>
114 <th>
115 Name
116 </th>
117 <th>
118 Order
119 </th>
120 <th>
121 Services
122 </th>
123 <th>
124 Data
125 </th>
126 <th>
127 Created
128 </th>
129 <th>
130 Last updated
131 </th>
132 </tr>
133
134 @each(workspace in workspaces)
135 <tr>
136 <td>
137 {{ workspace.workspaceId }}
138 </td>
139 <td>
140 {{ workspace.name }}
141 </td>
142 <td>
143 {{ workspace.order }}
144 </td>
145 <td>
146 {{ workspace.services }}
147 </td>
148 <td>
149 {{ workspace.data }}
150 </td>
151 <td>
152 {{ workspace.created_at }}
153 </td>
154 <td>
155 {{ workspace.updated_at }}
156 </td>
157 </tr>
158 @endeach
159</table>
160
161<div>
162 <a class="button" href="/user/account">Back to my account</a>
163</div>
164
165</div>
166
167@endsection \ No newline at end of file
diff --git a/resources/views/dashboard/delete.edge b/resources/views/dashboard/delete.edge
new file mode 100644
index 0000000..d3fc0df
--- /dev/null
+++ b/resources/views/dashboard/delete.edge
@@ -0,0 +1,31 @@
1@layout('layouts.main')
2
3@section('content')
4<h2>Delete Ferdi account</h2>
5@if(flashMessage('error'))
6 <div class="alert">
7 {{ flashMessage('error') }}
8 </div>
9@endif
10@if(old('message'))
11 <div class="alert">
12 {{ old('message') }}
13 </div>
14@endif
15
16<form action="/user/delete" method="POST">
17 <p>Are you sure, that you want to delete your Ferdi account?</p>
18 <p>This will <b>permanently</b> delete all your account settings, services and workspaces.</p>
19 <div>
20 {{ csrfField() }}
21 <button style="background-color:#F6416C;margin-bottom:1rem;">Yes, delete account</button>
22 </div>
23</form>
24
25<div>
26 <a class="button" href="/user/account" style="background-color:#28C76F;">Cancel</a>
27</div>
28
29</div>
30
31@endsection \ No newline at end of file
diff --git a/resources/views/dashboard/login.edge b/resources/views/dashboard/login.edge
new file mode 100644
index 0000000..58e97ba
--- /dev/null
+++ b/resources/views/dashboard/login.edge
@@ -0,0 +1,42 @@
1@layout('layouts.main')
2
3@section('content')
4<h2>Login</h2>
5@if(flashMessage('error'))
6 <div class="alert">
7 {{ flashMessage('error') }}
8 </div>
9@endif
10@if(old('message'))
11 <div class="alert">
12 {{ old('message') }}
13 </div>
14@endif
15<form action="/user/login" method="POST">
16 {{ csrfField() }}
17 <div>
18 <label>E-Mail</label>
19 <div>
20 <input type="email" value="{{ old('mail', '') }}" placeholder="E-Mail" name="mail">
21 </div>
22 </div>
23 <div>
24 <label>Password</label>
25 <div>
26 <input type="password" placeholder="*********" name="password">
27 </div>
28 </div>
29 <div>
30 <button>Login</button>
31 By logging in, you accept the <a href="/terms">Terms of Service</a> and <a href="/privacy">Privacy policy</a>.
32
33 </div>
34 <div>
35 <p>Not a member yet? Register in the Ferdi app or <a href="../import">import your Franz account</a>.</p>
36 </div>
37</form>
38<br />
39
40</div>
41
42@endsection \ No newline at end of file
diff --git a/resources/views/layouts/main.edge b/resources/views/layouts/main.edge
new file mode 100644
index 0000000..b6cc8ca
--- /dev/null
+++ b/resources/views/layouts/main.edge
@@ -0,0 +1,18 @@
1<!DOCTYPE html>
2<html lang="en">
3
4<head>
5 <meta charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 <title>ferdi-server</title>
9
10 {{ style('css/vanilla') }}
11 {{ style('css/main') }}
12</head>
13
14<body>
15 @!section('content')
16</body>
17
18</html>