|
3 | 3 | .login-menu(v-if='openLogin' :class='[(theme.fullscreen) ? "fullscreen" : "", (!openLogin) ? "hide" : ""]') |
4 | 4 | .login-form |
5 | 5 | .login-form_user |
6 | | - Icon(mode='user' :item='settings.user') |
| 6 | + icon(mode='user' :item='settings.user') |
7 | 7 | form(@submit.prevent='submit') |
8 | 8 | SelectItem( |
9 | 9 | mode='user' |
10 | 10 | :item='settings.user' |
11 | 11 | :icon='false') |
12 | 12 | input(type='password' ref='password' v-model='password' placeholder='password' :readonly='logging', :class="{'error': error}") |
13 | 13 | .login-form_desktop |
14 | | - Icon(mode='desktop' :item='settings.desktop') |
| 14 | + icon(mode='desktop' :item='settings.desktop') |
15 | 15 | form |
16 | | - SelectItem( |
| 16 | + select-item( |
17 | 17 | mode='desktop' |
18 | 18 | :item='settings.desktop' |
19 | 19 | :icon='false') |
20 | 20 | .login-bottom |
21 | | - SystemButton(type='shutdown') |
22 | | - SystemButton(type='restart') |
23 | | - SystemButton(type='suspend') |
24 | | - SystemButton(type='settings') |
| 21 | + system-button(type='shutdown') |
| 22 | + system-button(type='restart') |
| 23 | + system-button(type='suspend') |
| 24 | + system-button(type='settings') |
25 | 25 | </template> |
26 | 26 |
|
27 | 27 | <script> |
|
52 | 52 | } |
53 | 53 | }, |
54 | 54 | computed: { |
55 | | - ...mapState(['openSettings', 'openLogin']), |
| 55 | + ...mapState(['openSettings', 'openLogin', 'openUsers', 'openDesktops']), |
56 | 56 | ...mapState('system', { |
57 | 57 | theme: state => state.settings.theme |
58 | 58 | }), |
|
70 | 70 | this.SET({type: 'openLogin', items: true}) |
71 | 71 | } else if (this.openLogin) { |
72 | 72 | this.$nextTick(() => { |
73 | | - this.$refs.password.focus() |
| 73 | + this.$refs.password.focus(); |
74 | 74 | }) |
75 | 75 | } else { |
76 | | - this.submit() |
| 76 | + this.submit(); |
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
80 | 80 | if (event.key === "Escape") { |
81 | | - console.log("Escape") |
82 | 81 | if (this.openSettings) { |
83 | | - console.log("Close settings, open login") |
84 | | - this.SET({type: 'openLogin', items: true}) |
85 | | - this.SET({type: 'openSettings', items: false}) |
| 82 | + this.SET({type: 'openLogin', items: true}); |
| 83 | + this.SET({type: 'openSettings', items: false}); |
86 | 84 | } else if (this.openLogin) { |
87 | | - console.log("Close login") |
88 | | - this.SET({type: 'openLogin', items: false}) |
| 85 | + this.SET({type: 'openLogin', items: false}); |
| 86 | + this.SET({type: 'openUsers', items: false}); |
| 87 | + this.SET({type: 'openDesktops', items: false}); |
89 | 88 | } |
90 | 89 | } |
91 | 90 | }, |
|
134 | 133 |
|
135 | 134 | .login-form_user, .login-form_desktop |
136 | 135 | display flex |
137 | | - justify-content space-between |
| 136 | + justify-content space-around |
138 | 137 |
|
139 | 138 | form |
140 | 139 | width calc(100% - 12vmin) |
|
0 commit comments