Skip to content

Commit a1916ed

Browse files
authored
V2.0.1 (#22)
* accounts: improve logic * css: fixes
1 parent 833615c commit a1916ed

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

css/body-background.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
background-repeat: no-repeat;
1515
background-position: center;
1616
background-attachment: fixed;
17+
-webkit-touch-callout: none;
18+
-webkit-user-select: none;
19+
user-select: none;
1720
}

css/screens.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,18 @@
107107
display: inline-block;
108108
}
109109

110+
.greeter-content {
111+
cursor: default;
112+
-webkit-touch-callout: none;
113+
-webkit-user-select: none;
114+
user-select: none;
115+
}
116+
110117
#greeter-message.greeter-content {
111118
font-size: 32pt;
112119
font-weight: 400;
113120
text-align: center;
114121
color: var(--global-fg);
115-
cursor: pointer;
116122
}
117123

118124
#greeter-clock.greeter-content {

css/sidebar.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@
2424
top: 0;
2525
right: -411px;
2626
box-sizing: border-box;
27+
box-shadow: none;
2728
padding: 10px 10px;
2829
overflow: hidden;
2930
scrollbar-width: none;
3031
z-index: 5;
31-
box-shadow:
32-
0 1px 1px rgba(0,0,0,0.12),
33-
0 2px 2px rgba(0,0,0,0.12),
34-
0 4px 4px rgba(0,0,0,0.12),
35-
0 8px 8px rgba(0,0,0,0.12),
36-
0 16px 16px rgba(0,0,0,0.12);
3732
-webkit-touch-callout: none;
3833
-webkit-user-select: none;
3934
user-select: none;
@@ -46,6 +41,12 @@
4641

4742
#sidebar.sidebar-show {
4843
right: 0;
44+
box-shadow:
45+
0 1px 1px rgba(0,0,0,0.12),
46+
0 2px 2px rgba(0,0,0,0.12),
47+
0 4px 4px rgba(0,0,0,0.12),
48+
0 8px 8px rgba(0,0,0,0.12),
49+
0 16px 16px rgba(0,0,0,0.12);
4950
}
5051

5152
.sidebar-group {

js/accounts.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ class Accounts {
6868
);
6969
}
7070

71+
_setAccountDefaultOnStartUp() {
72+
this._setUserImageProfile(this._defaultUserProfileImage, this._defaultUserProfileImageFallback);
73+
this._setUserNameLabel(this._defaultUserDisplayName);
74+
const defaultAccountItem = document.querySelector(`#button-accounts-item-${this._defaultUser}`);
75+
this._updateAccountDefault(defaultAccountItem);
76+
}
77+
7178
_updateProfileVariablesOnStartUp() {
7279
this._defaultUser = this._localStorage.getItem('defaultUser') ||
7380
this._usersObject[0].username;
@@ -77,14 +84,7 @@ class Accounts {
7784
this._usersObject[0].image;
7885
this._defaultUserProfileImageFallback = this._localStorage.getItem('defaultUserProfileImageFallback') ||
7986
'assets/profiles/user.svg';
80-
}
81-
82-
_setAccountDefaultOnStartUp() {
83-
this._updateProfileVariablesOnStartUp();
84-
this._setUserImageProfile(this._defaultUserProfileImage, this._defaultUserProfileImageFallback);
85-
this._setUserNameLabel(this._defaultUserDisplayName);
86-
const defaultAccountItem = document.querySelector(`#button-accounts-item-${this._defaultUser}`);
87-
this._updateAccountDefault(defaultAccountItem);
87+
this._setAccountDefaultOnStartUp();
8888
}
8989

9090
_populateAccountsList() {
@@ -119,7 +119,7 @@ class Accounts {
119119
listItem.appendChild(userItemButton);
120120
this._accountsList.appendChild(listItem);
121121
}
122-
this._setAccountDefaultOnStartUp();
122+
this._updateProfileVariablesOnStartUp();
123123
}
124124

125125
_init() {

0 commit comments

Comments
 (0)