This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
forked from artur9010/lightdm-webkit-material
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
242 lines (230 loc) · 16.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/bower_components/angular-material/angular-material.css">
<link rel="stylesheet" href="assets/bower_components/animate.css/animate.min.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body ng-app="webkitMaterial" ng-style="backgroundStyle">
<div class="ng-cloak" id="wrapper" layout="column" layout-align="center stretch">
<md-button id="help-button" class="md-icon-button" aria-label="Help" ng-click="$root.card = 'help'"><i class="fa fa-question-circle"></i></md-button>
<main layout="column" layout-align="center center" flex ng-switch on="$root.card">
<!-- Login card -->
<md-card id="login" ng-class="animation" ng-style="animationDuration" ng-controller="loginController" ng-switch-default>
<md-card-content>
<div class="header">Welcome back!</div>
<div class="content">
<img class="profile-img" ng-src="{{getUserImage(user)}}" fallback-src="assets/ui/avatar.png"/> <!-- Replace src with {{getUserImage(user)}} for actual .face support -->
<form layout="column" layout-align="center stretch" ng-submit="signIn()" name="loginForm">
<md-input-container>
<label class="test">User</label>
<md-select id="user" name="user" class="md-select" ng-model="user" required>
<md-option ng-repeat="u in users" value="{{u.name}}">
{{u.display_name}}
</md-option>
</md-select>
</md-input-container>
<md-input-container>
<label><i class="fa fa-lock"></i> Password</label>
<input type="password" name="password" ng-model="password" id="pass" autofocus>
<div ng-messages="loginForm.password.$error">
<div ng-message="correct">
Incorrect password
</div>
</div>
</md-input-container>
<md-input-container>
<label>Session</label>
<md-select id="session" name="session" ng-model="session" required>
<md-option ng-repeat="s in sessions" value="{{s.key}}">
{{s.name}}
</md-option>
</md-select>
</md-input-container>
<md-button type="submit" ng-hide="state == 'signingin'" ng-disabled="state == 'signingin'"><i class="fa fa-sign-in"></i> Sign in</md-button>
<md-button type="submit" ng-show="state == 'signingin'" ng-disabled="true"><i class="fa fa-circle-o-notch fa-spin" style="padding: 1px;"></i> Signing in...</md-button>
</form>
</div>
</md-card-content>
</md-card>
<!-- Settings card -->
<md-card id="settings" ng-class="animation" ng-style="animationDuration" class="animate-switch" ng-switch-when="settings" ng-controller="settingsController">
<div class="header">Settings</div>
<md-card-content class="content">
<form layout="column" layout-align="center stretch" name="settingsForm">
<md-input-container>
<label class="" for="settings-language"><i class="fa fa-language"></i> Language</label>
<md-select id="settings-language" ng-model="settings.language">
<md-option ng-repeat="l in settings.languages" value="{{l.code}}">{{l.name}}</md-option>
</md-select>
</md-input-container>
<md-input-container>
<label for="settings-backgroundEngine"><i class="fa fa-gears"></i> Background Engine</label>
<md-select id="settings-background" name="backgroundEngine" ng-model="settings.backgroundEngine">
<md-option value="trianglify">Trianglify</md-option>
<md-option value="particleground">Particleground</md-option>
<md-option value="random-image">Random Image</md-option>
<md-option value="image">Image</md-option>
</md-select>
<div class="hint" ng-if="settings.backgroundEngine == 'random-image'">Background images should be located in "/var/lib/AccountsService/wallpapers" in png or jpeg format.</div>
<div class="hint" ng-if="settings.backgroundEngine == 'image'">Background image should be located at "/var/lib/AccountsService/wallpapers/lightdm-webkit.jpg" in jpeg format.</div>
</md-input-container>
<md-input-container ng-show="settings.backgroundEngine == 'particleground'">
<label for="settings-particleground-density"><i class="fa fa-share-alt"></i> Density <small>(<i class="fa fa-arrow-down"></i> more <i class="fa fa-arrow-up"></i> less)</small></label>
<input type="number" name="particlegroundDensity" min="5000" max="100000" id="settings-particleground-density" ng-model="settings.particlegroundDensity">
<div ng-messages="settingsForm.particlegroundDensity.$error" role="alert">
<div ng-message-exp="['min', 'max']">
Particle density should be between 5000 and 100000.
</div>
</div>
</md-input-container>
<md-input-container ng-if="settings.backgroundEngine != 'image' || settings.backgroundEngine != 'random-image'">
<label for="settings-background"><i class="fa fa-desktop"></i> Background Color Scheme</label>
<md-select id="settings-background" ng-model="settings.background">
<md-option value="random">Random (default)</md-option>
<md-optgroup label="One-color">
<md-option value="Blues">Blue</md-option>
<md-option value="Purples">Purple</md-option>
<md-option value="Oranges">Orange</md-option>
<md-option value="Reds">Red</md-option>
</md-optgroup>
<md-optgroup label="Multiple colours">
<md-option value="YlOrRd">Yellow-Orange-Red</md-option>
<md-option value="YlGnBu">Yellow-Green-Blue</md-option>
<md-option value="PuOr">Purple-Orange</md-option>
<md-option value="YlOrBr">Yellow-Orange-Brown</md-option>
</md-optgroup>
</md-select>
</md-input-container>
<md-input-container>
<label for="settings-clockStyle"><i class="fa fa-clock-o"></i> Clock Format</label>
<md-select id="settings-clockStyle" ng-model="settings.clockFormat" class="">
<md-option value="H:mm:ss">24-hour</md-option>
<md-option value="h:mm:ss a">12-hour</md-option>
</md-select>
</md-input-container>
<md-input-container>
<label for="settings-animation"><i class="fa fa-magic"></i> Animation</label>
<md-select id="settings-animation" ng-model="settings.animation">
<md-option ng-repeat="a in settings.animations" value="{{a}}">{{a| cleanAnimationName}}</md-option>
</md-select>
</md-input-container>
<md-input-container>
<label for="settings-animation-duration"><i class="fa fa-clock-o"></i> Animation Duration <small>(milliseconds)</small></label>
<input type="number" name="animationDuration" min="0" max="5000" id="settings-animation-duration" ng-model="settings.animationDuration">
<div ng-messages="settingsForm.animationDuration.$error" role="alert">
<div ng-message-exp="['min', 'max']">
Animation duration should be between 0 and 5000.
</div>
</div>
</md-input-container>
<md-button ng-click="$root.card = 'login'">
<i class="fa fa-floppy-o"></i> Done
</md-button>
</form>
</md-card-content>
</md-card>
<!-- Shutdown dialog -->
<md-card id="shutdown-dialog" ng-class="animation" ng-style="animationDuration" ng-switch-when="shutdown">
<div class="header">Shutdown</div>
<md-card-content class="content">
Do you really want to shutdown?
</md-card-content>
<md-card-actions layout="row" layout-align="space-around center">
<md-button ng-click="$root.card = 'login'"><i class="fa fa-ban"></i> Cancel</md-button>
<md-button onclick="lightdm.shutdown();"><i class="fa fa-power-off"></i> Shutdown</md-button>
</md-card-actions>
</md-card>
<!-- Restart dialog -->
<md-card id="restart-dialog" ng-class="animation" ng-style="animationDuration" ng-switch-when="restart">
<div class="header">Restart</div>
<md-card-content class="content">
Do you really want to restart?
</md-card-content>
<md-card-actions layout="row" layout-align="space-around center">
<md-button ng-click="$root.card = 'login'"><i class="fa fa-ban"></i> Cancel</md-button>
<md-button onclick="lightdm.restart();"><i class="fa fa-refresh"></i> Restart</md-button>
</md-card-actions>
</md-card>
<!-- Suspend dialog -->
<md-card id="suspend-dialog" ng-class="animation" ng-style="animationDuration" ng-switch-when="suspend">
<div class="header">Suspend</div>
<md-card-content class="content">
Do you really want to suspend?
</md-card-content>
<md-card-actions layout="row" layout-align="space-around center">
<md-button ng-click="$root.card = 'login'"><i class="fa fa-ban"></i> Cancel</md-button>
<md-button onclick="lightdm.suspend();"><i class="fa fa-power-off fa-rotate-90"></i> Suspend</md-button>
</md-card-actions>
</md-card>
<!-- Hibernate dialog -->
<md-card id="hibernate-dialog" ng-class="animation" ng-style="animationDuration" ng-switch-when="hibernate">
<div class="header">Hibernate</div>
<md-card-content class="content">
Do you really want to hibernate?
</md-card-content>
<md-card-actions layout="row" layout-align="space-around center">
<md-button ng-click="$root.card = 'login'"><i class="fa fa-ban"></i> Cancel</md-button>
<md-button onclick="lightdm.hibernate();"><i class="fa fa-power-off "></i> Hibernate</md-button>
</md-card-actions>
</md-card>
<!-- Help dialog -->
<md-card id="help-dialog" ng-class="animation" ng-style="animationDuration" ng-switch-when="help">
<div class="header">Help</div>
<md-card-content class="content">
<b>I found a bug/mistake? Where can I report it?</b>
<br/>
<small><i>https://github.com/artur9010/lightdm-webkit-material/issues</i></small>
<br/><br/>
<b>Setting a profile icon</b>
<br/>
<small>See <i>https://github.com/Antergos/lightdm-webkit2-greeter/tree/master/themes/antergos#user-icons-management</i> for more info.</small>
<br/><br/>
<div style="text-align: center;"><small>Crafted with <i class="fa fa-heart"></i> in Poland and the USA.</small></div>
</md-card-content>
<md-card-actions layout="row" layout-align="space-around center">
<md-button flex ng-click="$root.card = 'login'">Ok</md-button>
</md-card-actions>
</md-card>
</main>
<!-- Footer -->
<footer layout="row" align="center center">
<md-button ng-click="$root.card = 'shutdown'">
<i class="fa fa-power-off"></i> Shutdown
</md-button>
<md-button ng-click="$root.card = 'restart'">
<i class="fa fa-refresh"></i> Restart
</md-button>
<md-button ng-click="$root.card = 'suspend'">
<i class="fa fa-power-off fa-rotate-90"></i> Suspend
</md-button>
<md-button ng-click="$root.card = 'hibernate'">
<i class="fa fa-power-off"></i> Hibernate
</md-button>
<md-button ng-click="$root.card = 'settings'">
<i class="fa fa-cog"></i> Settings
</md-button>
<span flex></span>
<div id="clock" layout="column" layout-align="center center">
<span ng-controller="timeController">{{clock| date:format}}</span>
</div>
</footer>
</div>
<!-- Required libs -->
<script src="assets/js/jquery.js"></script>
<script src="assets/bower_components/color-scheme-js/lib/color-scheme.min.js"></script>
<!-- Login -->
<script src="assets/js/mock.js"></script>
<!-- Material -->
<script src="assets/bower_components/angular/angular.min.js"></script>
<script src="assets/bower_components/angular-load/angular-load.js"></script>
<script src="assets/bower_components/angular-aria/angular-aria.min.js"></script>
<script src="assets/bower_components/angular-animate/angular-animate.min.js"></script>
<script src="assets/bower_components/angular-messages/angular-messages.min.js"></script>
<script src="assets/bower_components/angular-material/angular-material.min.js"></script>
<script src="assets/js/app.js"></script>
<div id="particles"></div>
</body>
</html>