Fossil SCM

Corrected persistence of the timestamps toggle. Removed about 40 lines of dead CSS.

stephan 2021-09-23 12:23 chat-user-filter
Commit dddd42baa6bbd967b2f211b7b7e636bae66d539cf208ff4820f23ba28e2ac2be
2 files changed +8 -5 +6 -40
+8 -5
--- src/chat.js
+++ src/chat.js
@@ -534,10 +534,13 @@
534534
if(cs.settings.getBool('monospace-messages',false)){
535535
document.body.classList.add('monospace-messages');
536536
}
537537
if(cs.settings.getBool('active-user-list',false)){
538538
cs.e.activeUserListWrapper.classList.remove('hidden');
539
+ }
540
+ if(cs.settings.getBool('active-user-list-timestamps',false)){
541
+ cs.e.activeUserList.classList.add('timestamps');
539542
}
540543
cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false));
541544
cs.chatOnlyMode(cs.settings.getBool('chat-only-mode'));
542545
cs.pageTitleOrig = cs.e.pageTitle.innerText;
543546
const qs = (e)=>document.querySelector(e);
@@ -1185,23 +1188,23 @@
11851188
boolValue: ()=>!document.body.classList.contains('my-messages-right'),
11861189
callback: function f(){
11871190
document.body.classList.toggle('my-messages-right');
11881191
}
11891192
},{
1190
- label: "Images inline",
1193
+ label: "Show images inline",
11911194
boolValue: ()=>Chat.settings.getBool('images-inline'),
11921195
callback: function(){
11931196
const v = Chat.settings.toggle('images-inline');
11941197
F.toast.message("Image mode set to "+(v ? "inline" : "hyperlink")+".");
11951198
}
11961199
},{
1197
- label: "Show timestamps in recent user list",
1198
- boolValue: ()=>!Chat.e.activeUserList.classList.contains('no-timestamps'),
1200
+ label: "Show timestamps in recent activity list",
1201
+ boolValue: ()=>Chat.e.activeUserList.classList.contains('timestamps'),
11991202
persistentSetting: 'active-user-list-timestamps',
1200
- callback: ()=>D.toggleClass(Chat.e.activeUserList,'no-timestamps')
1203
+ callback: ()=>D.toggleClass(Chat.e.activeUserList,'timestamps')
12011204
},{
1202
- label: "Show recent user list",
1205
+ label: "Show recent activity list",
12031206
boolValue: ()=>!Chat.e.activeUserListWrapper.classList.contains('hidden'),
12041207
persistentSetting: 'active-user-list',
12051208
callback: function(){
12061209
D.toggleClass(Chat.e.activeUserListWrapper,'hidden');
12071210
if(Chat.e.activeUserListWrapper.classList.contains('hidden')){
12081211
--- src/chat.js
+++ src/chat.js
@@ -534,10 +534,13 @@
534 if(cs.settings.getBool('monospace-messages',false)){
535 document.body.classList.add('monospace-messages');
536 }
537 if(cs.settings.getBool('active-user-list',false)){
538 cs.e.activeUserListWrapper.classList.remove('hidden');
 
 
 
539 }
540 cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false));
541 cs.chatOnlyMode(cs.settings.getBool('chat-only-mode'));
542 cs.pageTitleOrig = cs.e.pageTitle.innerText;
543 const qs = (e)=>document.querySelector(e);
@@ -1185,23 +1188,23 @@
1185 boolValue: ()=>!document.body.classList.contains('my-messages-right'),
1186 callback: function f(){
1187 document.body.classList.toggle('my-messages-right');
1188 }
1189 },{
1190 label: "Images inline",
1191 boolValue: ()=>Chat.settings.getBool('images-inline'),
1192 callback: function(){
1193 const v = Chat.settings.toggle('images-inline');
1194 F.toast.message("Image mode set to "+(v ? "inline" : "hyperlink")+".");
1195 }
1196 },{
1197 label: "Show timestamps in recent user list",
1198 boolValue: ()=>!Chat.e.activeUserList.classList.contains('no-timestamps'),
1199 persistentSetting: 'active-user-list-timestamps',
1200 callback: ()=>D.toggleClass(Chat.e.activeUserList,'no-timestamps')
1201 },{
1202 label: "Show recent user list",
1203 boolValue: ()=>!Chat.e.activeUserListWrapper.classList.contains('hidden'),
1204 persistentSetting: 'active-user-list',
1205 callback: function(){
1206 D.toggleClass(Chat.e.activeUserListWrapper,'hidden');
1207 if(Chat.e.activeUserListWrapper.classList.contains('hidden')){
1208
--- src/chat.js
+++ src/chat.js
@@ -534,10 +534,13 @@
534 if(cs.settings.getBool('monospace-messages',false)){
535 document.body.classList.add('monospace-messages');
536 }
537 if(cs.settings.getBool('active-user-list',false)){
538 cs.e.activeUserListWrapper.classList.remove('hidden');
539 }
540 if(cs.settings.getBool('active-user-list-timestamps',false)){
541 cs.e.activeUserList.classList.add('timestamps');
542 }
543 cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false));
544 cs.chatOnlyMode(cs.settings.getBool('chat-only-mode'));
545 cs.pageTitleOrig = cs.e.pageTitle.innerText;
546 const qs = (e)=>document.querySelector(e);
@@ -1185,23 +1188,23 @@
1188 boolValue: ()=>!document.body.classList.contains('my-messages-right'),
1189 callback: function f(){
1190 document.body.classList.toggle('my-messages-right');
1191 }
1192 },{
1193 label: "Show images inline",
1194 boolValue: ()=>Chat.settings.getBool('images-inline'),
1195 callback: function(){
1196 const v = Chat.settings.toggle('images-inline');
1197 F.toast.message("Image mode set to "+(v ? "inline" : "hyperlink")+".");
1198 }
1199 },{
1200 label: "Show timestamps in recent activity list",
1201 boolValue: ()=>Chat.e.activeUserList.classList.contains('timestamps'),
1202 persistentSetting: 'active-user-list-timestamps',
1203 callback: ()=>D.toggleClass(Chat.e.activeUserList,'timestamps')
1204 },{
1205 label: "Show recent activity list",
1206 boolValue: ()=>!Chat.e.activeUserListWrapper.classList.contains('hidden'),
1207 persistentSetting: 'active-user-list',
1208 callback: function(){
1209 D.toggleClass(Chat.e.activeUserListWrapper,'hidden');
1210 if(Chat.e.activeUserListWrapper.classList.contains('hidden')){
1211
--- src/style.chat.css
+++ src/style.chat.css
@@ -132,48 +132,10 @@
132132
flex-direction: column;
133133
align-items: stretch;
134134
padding: 0.25em;
135135
z-index: 200;
136136
}
137
-body.chat .chat-settings-popup > span {
138
- vertical-align: middle;
139
-}
140
-body.chat .chat-settings-popup > span.menu-entry{
141
- white-space: nowrap;
142
- cursor: pointer;
143
- border: 1px solid;
144
- border-radius: 0.25em;
145
- padding: 0.25em 0.5em;
146
- display: flex;
147
- flex-direction: row;
148
- align-items: center;
149
- justify-content: space-between;
150
-}
151
-body.chat .chat-settings-popup > span.menu-entry:hover {
152
-}
153
-body.chat .chat-settings-popup > span.menu-entry > .help-buttonlet {
154
- vertical-align: middle;
155
-}
156
-body.chat .chat-settings-popup > span.menu-entry > span.button {
157
- margin: 0.25em 0.2em;
158
- padding: 0.25em;
159
- flex: 1 1 auto/*eliminates dead no-click zones on the right*/;
160
-}
161
-body.chat .chat-settings-popup > span.menu-entry > input[type=checkbox] {
162
- cursor: inherit;
163
-}
164
-body.chat .chat-settings-popup > select.menu-entry {
165
- flex: 1 1 auto;
166
- padding: 0;
167
- cursor: pointer;
168
- min-height: 2.5em;
169
- border-radius: 0.25em;
170
-}
171
-body.chat .chat-settings-popup > select.menu-entry > option {
172
- /*Recall that many browsers don't allow styling of OPTION
173
- elements, or allow only very limited styling.*/
174
-}
175137
176138
/** Container for the list of /chat messages. */
177139
body.chat #chat-messages-wrapper {
178140
overflow: auto;
179141
flex: 2 1 auto;
@@ -325,12 +287,15 @@
325287
}
326288
body.chat #chat-config #chat-config-options .menu-entry {
327289
display: flex;
328290
align-items: center;
329291
flex-direction: row;
330
- flex-wrap: wrap;
292
+ flex-wrap: nowrap;
331293
padding: 1em;
294
+}
295
+body.chat #chat-config #chat-config-options .menu-entry > label {
296
+ cursor: pointer;
332297
}
333298
body.chat #chat-config #chat-config-options .menu-entry > input:first-child {
334299
margin-right: 1em;
335300
}
336301
body.chat #chat-config #chat-config-options .menu-entry > label:first-child {
@@ -359,10 +324,11 @@
359324
}
360325
361326
body.chat #chat-user-list-wrapper {
362327
border-radius: 0.5em;
363328
margin: 0.5em 0 0 0;
329
+ padding: 0.25em 0.5em;
364330
font-size: 85%;
365331
}
366332
body.chat #chat-user-list {
367333
display: flex;
368334
flex-direction: row;
@@ -382,12 +348,12 @@
382348
}
383349
body.chat #chat-user-list .timestamp {
384350
font-size: 80%;
385351
font-family: monospace;
386352
}
387
-body.chat #chat-user-list.no-timestamps .timestamp {
353
+body.chat #chat-user-list:not(.timestamps) .timestamp {
388354
display: none;
389355
}
390356
body.chat #chat-user-list .chat-user.selected {
391357
font-weight: bold;
392358
text-decoration: underline;
393359
}
394360
--- src/style.chat.css
+++ src/style.chat.css
@@ -132,48 +132,10 @@
132 flex-direction: column;
133 align-items: stretch;
134 padding: 0.25em;
135 z-index: 200;
136 }
137 body.chat .chat-settings-popup > span {
138 vertical-align: middle;
139 }
140 body.chat .chat-settings-popup > span.menu-entry{
141 white-space: nowrap;
142 cursor: pointer;
143 border: 1px solid;
144 border-radius: 0.25em;
145 padding: 0.25em 0.5em;
146 display: flex;
147 flex-direction: row;
148 align-items: center;
149 justify-content: space-between;
150 }
151 body.chat .chat-settings-popup > span.menu-entry:hover {
152 }
153 body.chat .chat-settings-popup > span.menu-entry > .help-buttonlet {
154 vertical-align: middle;
155 }
156 body.chat .chat-settings-popup > span.menu-entry > span.button {
157 margin: 0.25em 0.2em;
158 padding: 0.25em;
159 flex: 1 1 auto/*eliminates dead no-click zones on the right*/;
160 }
161 body.chat .chat-settings-popup > span.menu-entry > input[type=checkbox] {
162 cursor: inherit;
163 }
164 body.chat .chat-settings-popup > select.menu-entry {
165 flex: 1 1 auto;
166 padding: 0;
167 cursor: pointer;
168 min-height: 2.5em;
169 border-radius: 0.25em;
170 }
171 body.chat .chat-settings-popup > select.menu-entry > option {
172 /*Recall that many browsers don't allow styling of OPTION
173 elements, or allow only very limited styling.*/
174 }
175
176 /** Container for the list of /chat messages. */
177 body.chat #chat-messages-wrapper {
178 overflow: auto;
179 flex: 2 1 auto;
@@ -325,12 +287,15 @@
325 }
326 body.chat #chat-config #chat-config-options .menu-entry {
327 display: flex;
328 align-items: center;
329 flex-direction: row;
330 flex-wrap: wrap;
331 padding: 1em;
 
 
 
332 }
333 body.chat #chat-config #chat-config-options .menu-entry > input:first-child {
334 margin-right: 1em;
335 }
336 body.chat #chat-config #chat-config-options .menu-entry > label:first-child {
@@ -359,10 +324,11 @@
359 }
360
361 body.chat #chat-user-list-wrapper {
362 border-radius: 0.5em;
363 margin: 0.5em 0 0 0;
 
364 font-size: 85%;
365 }
366 body.chat #chat-user-list {
367 display: flex;
368 flex-direction: row;
@@ -382,12 +348,12 @@
382 }
383 body.chat #chat-user-list .timestamp {
384 font-size: 80%;
385 font-family: monospace;
386 }
387 body.chat #chat-user-list.no-timestamps .timestamp {
388 display: none;
389 }
390 body.chat #chat-user-list .chat-user.selected {
391 font-weight: bold;
392 text-decoration: underline;
393 }
394
--- src/style.chat.css
+++ src/style.chat.css
@@ -132,48 +132,10 @@
132 flex-direction: column;
133 align-items: stretch;
134 padding: 0.25em;
135 z-index: 200;
136 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
138 /** Container for the list of /chat messages. */
139 body.chat #chat-messages-wrapper {
140 overflow: auto;
141 flex: 2 1 auto;
@@ -325,12 +287,15 @@
287 }
288 body.chat #chat-config #chat-config-options .menu-entry {
289 display: flex;
290 align-items: center;
291 flex-direction: row;
292 flex-wrap: nowrap;
293 padding: 1em;
294 }
295 body.chat #chat-config #chat-config-options .menu-entry > label {
296 cursor: pointer;
297 }
298 body.chat #chat-config #chat-config-options .menu-entry > input:first-child {
299 margin-right: 1em;
300 }
301 body.chat #chat-config #chat-config-options .menu-entry > label:first-child {
@@ -359,10 +324,11 @@
324 }
325
326 body.chat #chat-user-list-wrapper {
327 border-radius: 0.5em;
328 margin: 0.5em 0 0 0;
329 padding: 0.25em 0.5em;
330 font-size: 85%;
331 }
332 body.chat #chat-user-list {
333 display: flex;
334 flex-direction: row;
@@ -382,12 +348,12 @@
348 }
349 body.chat #chat-user-list .timestamp {
350 font-size: 80%;
351 font-family: monospace;
352 }
353 body.chat #chat-user-list:not(.timestamps) .timestamp {
354 display: none;
355 }
356 body.chat #chat-user-list .chat-user.selected {
357 font-weight: bold;
358 text-decoration: underline;
359 }
360

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button