Fossil SCM
Corrected persistence of the timestamps toggle. Removed about 40 lines of dead CSS.
Commit
dddd42baa6bbd967b2f211b7b7e636bae66d539cf208ff4820f23ba28e2ac2be
Parent
a3ea94205b7c262…
2 files changed
+8
-5
+6
-40
+8
-5
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -534,10 +534,13 @@ | ||
| 534 | 534 | if(cs.settings.getBool('monospace-messages',false)){ |
| 535 | 535 | document.body.classList.add('monospace-messages'); |
| 536 | 536 | } |
| 537 | 537 | if(cs.settings.getBool('active-user-list',false)){ |
| 538 | 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'); | |
| 539 | 542 | } |
| 540 | 543 | cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false)); |
| 541 | 544 | cs.chatOnlyMode(cs.settings.getBool('chat-only-mode')); |
| 542 | 545 | cs.pageTitleOrig = cs.e.pageTitle.innerText; |
| 543 | 546 | const qs = (e)=>document.querySelector(e); |
| @@ -1185,23 +1188,23 @@ | ||
| 1185 | 1188 | boolValue: ()=>!document.body.classList.contains('my-messages-right'), |
| 1186 | 1189 | callback: function f(){ |
| 1187 | 1190 | document.body.classList.toggle('my-messages-right'); |
| 1188 | 1191 | } |
| 1189 | 1192 | },{ |
| 1190 | - label: "Images inline", | |
| 1193 | + label: "Show images inline", | |
| 1191 | 1194 | boolValue: ()=>Chat.settings.getBool('images-inline'), |
| 1192 | 1195 | callback: function(){ |
| 1193 | 1196 | const v = Chat.settings.toggle('images-inline'); |
| 1194 | 1197 | F.toast.message("Image mode set to "+(v ? "inline" : "hyperlink")+"."); |
| 1195 | 1198 | } |
| 1196 | 1199 | },{ |
| 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'), | |
| 1199 | 1202 | persistentSetting: 'active-user-list-timestamps', |
| 1200 | - callback: ()=>D.toggleClass(Chat.e.activeUserList,'no-timestamps') | |
| 1203 | + callback: ()=>D.toggleClass(Chat.e.activeUserList,'timestamps') | |
| 1201 | 1204 | },{ |
| 1202 | - label: "Show recent user list", | |
| 1205 | + label: "Show recent activity list", | |
| 1203 | 1206 | boolValue: ()=>!Chat.e.activeUserListWrapper.classList.contains('hidden'), |
| 1204 | 1207 | persistentSetting: 'active-user-list', |
| 1205 | 1208 | callback: function(){ |
| 1206 | 1209 | D.toggleClass(Chat.e.activeUserListWrapper,'hidden'); |
| 1207 | 1210 | if(Chat.e.activeUserListWrapper.classList.contains('hidden')){ |
| 1208 | 1211 |
| --- 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 |
+6
-40
| --- src/style.chat.css | ||
| +++ src/style.chat.css | ||
| @@ -132,48 +132,10 @@ | ||
| 132 | 132 | flex-direction: column; |
| 133 | 133 | align-items: stretch; |
| 134 | 134 | padding: 0.25em; |
| 135 | 135 | z-index: 200; |
| 136 | 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 | 137 | |
| 176 | 138 | /** Container for the list of /chat messages. */ |
| 177 | 139 | body.chat #chat-messages-wrapper { |
| 178 | 140 | overflow: auto; |
| 179 | 141 | flex: 2 1 auto; |
| @@ -325,12 +287,15 @@ | ||
| 325 | 287 | } |
| 326 | 288 | body.chat #chat-config #chat-config-options .menu-entry { |
| 327 | 289 | display: flex; |
| 328 | 290 | align-items: center; |
| 329 | 291 | flex-direction: row; |
| 330 | - flex-wrap: wrap; | |
| 292 | + flex-wrap: nowrap; | |
| 331 | 293 | padding: 1em; |
| 294 | +} | |
| 295 | +body.chat #chat-config #chat-config-options .menu-entry > label { | |
| 296 | + cursor: pointer; | |
| 332 | 297 | } |
| 333 | 298 | body.chat #chat-config #chat-config-options .menu-entry > input:first-child { |
| 334 | 299 | margin-right: 1em; |
| 335 | 300 | } |
| 336 | 301 | body.chat #chat-config #chat-config-options .menu-entry > label:first-child { |
| @@ -359,10 +324,11 @@ | ||
| 359 | 324 | } |
| 360 | 325 | |
| 361 | 326 | body.chat #chat-user-list-wrapper { |
| 362 | 327 | border-radius: 0.5em; |
| 363 | 328 | margin: 0.5em 0 0 0; |
| 329 | + padding: 0.25em 0.5em; | |
| 364 | 330 | font-size: 85%; |
| 365 | 331 | } |
| 366 | 332 | body.chat #chat-user-list { |
| 367 | 333 | display: flex; |
| 368 | 334 | flex-direction: row; |
| @@ -382,12 +348,12 @@ | ||
| 382 | 348 | } |
| 383 | 349 | body.chat #chat-user-list .timestamp { |
| 384 | 350 | font-size: 80%; |
| 385 | 351 | font-family: monospace; |
| 386 | 352 | } |
| 387 | -body.chat #chat-user-list.no-timestamps .timestamp { | |
| 353 | +body.chat #chat-user-list:not(.timestamps) .timestamp { | |
| 388 | 354 | display: none; |
| 389 | 355 | } |
| 390 | 356 | body.chat #chat-user-list .chat-user.selected { |
| 391 | 357 | font-weight: bold; |
| 392 | 358 | text-decoration: underline; |
| 393 | 359 | } |
| 394 | 360 |
| --- 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 |