Fossil SCM
Main UI of chat history search for /chat, without the actual search functionality.
Commit
80b869acf9efffe484d0e5988f1ae4a78cf07f4487f985817d0e38a19d242053
Parent
3b84b4f8c6de64c…
3 files changed
+10
-2
+19
-3
+10
-18
+10
-2
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -203,10 +203,12 @@ | ||
| 203 | 203 | @ data-placeholder="%h(zInputPlaceholder0)" \ |
| 204 | 204 | @ class="chat-input-field hidden"></div> |
| 205 | 205 | @ <div id='chat-buttons-wrapper'> |
| 206 | 206 | @ <span class='cbutton' id="chat-button-preview" \ |
| 207 | 207 | @ title="Preview message (Shift-Enter)">👁</span> |
| 208 | + @ <span class='cbutton' id="chat-button-search" \ | |
| 209 | + @ title="Search chat history">🔍</span> | |
| 208 | 210 | @ <span class='cbutton' id="chat-button-attach" \ |
| 209 | 211 | @ title="Attach file to message">%s(zPaperclip)</span> |
| 210 | 212 | @ <span class='cbutton' id="chat-button-settings" \ |
| 211 | 213 | @ title="Configure chat">⚙</span> |
| 212 | 214 | @ <span class='cbutton' id="chat-button-submit" \ |
| @@ -234,16 +236,22 @@ | ||
| 234 | 236 | @ <div id='chat-user-list'></div> |
| 235 | 237 | @ </div> |
| 236 | 238 | @ <div id='chat-preview' class='hidden chat-view'> |
| 237 | 239 | @ <header>Preview: (<a href='%R/md_rules' target='_blank'>markdown reference</a>)</header> |
| 238 | 240 | @ <div id='chat-preview-content' class='message-widget-content'></div> |
| 239 | - @ <div id='chat-preview-buttons'><button id='chat-preview-close'>Close Preview</button></div> | |
| 241 | + @ <div class='button-bar'><button class='action-close'>Close Preview</button></div> | |
| 240 | 242 | @ </div> |
| 241 | 243 | @ <div id='chat-config' class='hidden chat-view'> |
| 242 | 244 | @ <div id='chat-config-options'></div> |
| 243 | 245 | /* ^^^populated client-side */ |
| 244 | - @ <button>Close Settings</button> | |
| 246 | + @ <div class='button-bar'><button class='action-close'>Close Settings</button></div> | |
| 247 | + @ </div> | |
| 248 | + @ <div id='chat-search' class='hidden chat-view'> | |
| 249 | + @ <header>Chat history search...</header> | |
| 250 | + @ <div id='chat-search-body' class='message-widget-content'></div> | |
| 251 | + /* ^^^populated client-side */ | |
| 252 | + @ <div class='button-bar'><button class='action-close'>Close Search</button></div> | |
| 245 | 253 | @ </div> |
| 246 | 254 | @ <div id='chat-messages-wrapper' class='chat-view'> |
| 247 | 255 | /* New chat messages get inserted immediately after this element */ |
| 248 | 256 | @ <span id='message-inject-point'></span> |
| 249 | 257 | @ </div> |
| 250 | 258 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -203,10 +203,12 @@ | |
| 203 | @ data-placeholder="%h(zInputPlaceholder0)" \ |
| 204 | @ class="chat-input-field hidden"></div> |
| 205 | @ <div id='chat-buttons-wrapper'> |
| 206 | @ <span class='cbutton' id="chat-button-preview" \ |
| 207 | @ title="Preview message (Shift-Enter)">👁</span> |
| 208 | @ <span class='cbutton' id="chat-button-attach" \ |
| 209 | @ title="Attach file to message">%s(zPaperclip)</span> |
| 210 | @ <span class='cbutton' id="chat-button-settings" \ |
| 211 | @ title="Configure chat">⚙</span> |
| 212 | @ <span class='cbutton' id="chat-button-submit" \ |
| @@ -234,16 +236,22 @@ | |
| 234 | @ <div id='chat-user-list'></div> |
| 235 | @ </div> |
| 236 | @ <div id='chat-preview' class='hidden chat-view'> |
| 237 | @ <header>Preview: (<a href='%R/md_rules' target='_blank'>markdown reference</a>)</header> |
| 238 | @ <div id='chat-preview-content' class='message-widget-content'></div> |
| 239 | @ <div id='chat-preview-buttons'><button id='chat-preview-close'>Close Preview</button></div> |
| 240 | @ </div> |
| 241 | @ <div id='chat-config' class='hidden chat-view'> |
| 242 | @ <div id='chat-config-options'></div> |
| 243 | /* ^^^populated client-side */ |
| 244 | @ <button>Close Settings</button> |
| 245 | @ </div> |
| 246 | @ <div id='chat-messages-wrapper' class='chat-view'> |
| 247 | /* New chat messages get inserted immediately after this element */ |
| 248 | @ <span id='message-inject-point'></span> |
| 249 | @ </div> |
| 250 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -203,10 +203,12 @@ | |
| 203 | @ data-placeholder="%h(zInputPlaceholder0)" \ |
| 204 | @ class="chat-input-field hidden"></div> |
| 205 | @ <div id='chat-buttons-wrapper'> |
| 206 | @ <span class='cbutton' id="chat-button-preview" \ |
| 207 | @ title="Preview message (Shift-Enter)">👁</span> |
| 208 | @ <span class='cbutton' id="chat-button-search" \ |
| 209 | @ title="Search chat history">🔍</span> |
| 210 | @ <span class='cbutton' id="chat-button-attach" \ |
| 211 | @ title="Attach file to message">%s(zPaperclip)</span> |
| 212 | @ <span class='cbutton' id="chat-button-settings" \ |
| 213 | @ title="Configure chat">⚙</span> |
| 214 | @ <span class='cbutton' id="chat-button-submit" \ |
| @@ -234,16 +236,22 @@ | |
| 236 | @ <div id='chat-user-list'></div> |
| 237 | @ </div> |
| 238 | @ <div id='chat-preview' class='hidden chat-view'> |
| 239 | @ <header>Preview: (<a href='%R/md_rules' target='_blank'>markdown reference</a>)</header> |
| 240 | @ <div id='chat-preview-content' class='message-widget-content'></div> |
| 241 | @ <div class='button-bar'><button class='action-close'>Close Preview</button></div> |
| 242 | @ </div> |
| 243 | @ <div id='chat-config' class='hidden chat-view'> |
| 244 | @ <div id='chat-config-options'></div> |
| 245 | /* ^^^populated client-side */ |
| 246 | @ <div class='button-bar'><button class='action-close'>Close Settings</button></div> |
| 247 | @ </div> |
| 248 | @ <div id='chat-search' class='hidden chat-view'> |
| 249 | @ <header>Chat history search...</header> |
| 250 | @ <div id='chat-search-body' class='message-widget-content'></div> |
| 251 | /* ^^^populated client-side */ |
| 252 | @ <div class='button-bar'><button class='action-close'>Close Search</button></div> |
| 253 | @ </div> |
| 254 | @ <div id='chat-messages-wrapper' class='chat-view'> |
| 255 | /* New chat messages get inserted immediately after this element */ |
| 256 | @ <span id='message-inject-point'></span> |
| 257 | @ </div> |
| 258 |
+19
-3
| --- src/fossil.page.chat.js | ||
| +++ src/fossil.page.chat.js | ||
| @@ -145,10 +145,11 @@ | ||
| 145 | 145 | inputM: E1('#chat-input-field-multi'), |
| 146 | 146 | inputFile: E1('#chat-input-file'), |
| 147 | 147 | contentDiv: E1('div.content'), |
| 148 | 148 | viewConfig: E1('#chat-config'), |
| 149 | 149 | viewPreview: E1('#chat-preview'), |
| 150 | + viewSearch: E1('#chat-search'), | |
| 150 | 151 | previewContent: E1('#chat-preview-content'), |
| 151 | 152 | btnPreview: E1('#chat-button-preview'), |
| 152 | 153 | views: document.querySelectorAll('.chat-view'), |
| 153 | 154 | activeUserListWrapper: E1('#chat-user-list-wrapper'), |
| 154 | 155 | activeUserList: E1('#chat-user-list') |
| @@ -1580,11 +1581,11 @@ | ||
| 1580 | 1581 | Chat.setCurrentView(Chat.e.currentView===Chat.e.viewConfig |
| 1581 | 1582 | ? Chat.e.viewMessages : Chat.e.viewConfig); |
| 1582 | 1583 | return false; |
| 1583 | 1584 | }; |
| 1584 | 1585 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 1585 | - Chat.e.viewConfig.querySelector('button').addEventListener('click', cbToggle, false); | |
| 1586 | + Chat.e.viewConfig.querySelector('button.action-close').addEventListener('click', cbToggle, false); | |
| 1586 | 1587 | |
| 1587 | 1588 | /** Internal acrobatics to allow certain settings toggles to access |
| 1588 | 1589 | related toggles. */ |
| 1589 | 1590 | const namedOptions = { |
| 1590 | 1591 | activeUsers:{ |
| @@ -1840,11 +1841,11 @@ | ||
| 1840 | 1841 | op.persistentSetting, |
| 1841 | 1842 | function(setting){ |
| 1842 | 1843 | if(op.checkbox) op.checkbox.checked = !!setting.value; |
| 1843 | 1844 | else if(op.select) op.select.value = setting.value; |
| 1844 | 1845 | if(op.callback) op.callback(setting); |
| 1845 | - } | |
| 1846 | + } | |
| 1846 | 1847 | ); |
| 1847 | 1848 | if(op.checkbox){ |
| 1848 | 1849 | op.checkbox.addEventListener( |
| 1849 | 1850 | 'change', function(){ |
| 1850 | 1851 | Chat.settings.set(op.persistentSetting, op.checkbox.checked) |
| @@ -1947,11 +1948,11 @@ | ||
| 1947 | 1948 | this.setCurrentView(this.e.viewPreview); |
| 1948 | 1949 | this.e.previewContent.innerHTML = t; |
| 1949 | 1950 | this.e.viewPreview.querySelectorAll('a').forEach(addAnchorTargetBlank); |
| 1950 | 1951 | this.inputFocus(); |
| 1951 | 1952 | }; |
| 1952 | - Chat.e.viewPreview.querySelector('#chat-preview-close'). | |
| 1953 | + Chat.e.viewPreview.querySelector('button.action-close'). | |
| 1953 | 1954 | addEventListener('click', ()=>Chat.setCurrentView(Chat.e.viewMessages), false); |
| 1954 | 1955 | let previewPending = false; |
| 1955 | 1956 | const elemsToEnable = [btnPreview, Chat.e.btnSubmit, Chat.e.inputFields]; |
| 1956 | 1957 | const submit = function(ev){ |
| 1957 | 1958 | ev.preventDefault(); |
| @@ -1994,10 +1995,25 @@ | ||
| 1994 | 1995 | }); |
| 1995 | 1996 | return false; |
| 1996 | 1997 | }; |
| 1997 | 1998 | btnPreview.addEventListener('click', submit, false); |
| 1998 | 1999 | })()/*message preview setup*/; |
| 2000 | + | |
| 2001 | + (function(){/*Set up #chat-search and related bits */ | |
| 2002 | + const settingsButton = document.querySelector('#chat-button-search'); | |
| 2003 | + const eBody = E1('#chat-search-body'); | |
| 2004 | + const cbToggle = function(ev){ | |
| 2005 | + ev.preventDefault(); | |
| 2006 | + ev.stopPropagation(); | |
| 2007 | + Chat.setCurrentView(Chat.e.currentView===Chat.e.viewSearch | |
| 2008 | + ? Chat.e.viewMessages : Chat.e.viewSearch); | |
| 2009 | + return false; | |
| 2010 | + }; | |
| 2011 | + D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); | |
| 2012 | + Chat.e.viewSearch.querySelector('button.action-close').addEventListener('click', cbToggle, false); | |
| 2013 | + | |
| 2014 | + })()/*search view setup*/; | |
| 1999 | 2015 | |
| 2000 | 2016 | /** Callback for poll() to inject new content into the page. jx == |
| 2001 | 2017 | the response from /chat-poll. If atEnd is true, the message is |
| 2002 | 2018 | appended to the end of the chat list (for loading older |
| 2003 | 2019 | messages), else the beginning (the default). */ |
| 2004 | 2020 |
| --- src/fossil.page.chat.js | |
| +++ src/fossil.page.chat.js | |
| @@ -145,10 +145,11 @@ | |
| 145 | inputM: E1('#chat-input-field-multi'), |
| 146 | inputFile: E1('#chat-input-file'), |
| 147 | contentDiv: E1('div.content'), |
| 148 | viewConfig: E1('#chat-config'), |
| 149 | viewPreview: E1('#chat-preview'), |
| 150 | previewContent: E1('#chat-preview-content'), |
| 151 | btnPreview: E1('#chat-button-preview'), |
| 152 | views: document.querySelectorAll('.chat-view'), |
| 153 | activeUserListWrapper: E1('#chat-user-list-wrapper'), |
| 154 | activeUserList: E1('#chat-user-list') |
| @@ -1580,11 +1581,11 @@ | |
| 1580 | Chat.setCurrentView(Chat.e.currentView===Chat.e.viewConfig |
| 1581 | ? Chat.e.viewMessages : Chat.e.viewConfig); |
| 1582 | return false; |
| 1583 | }; |
| 1584 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 1585 | Chat.e.viewConfig.querySelector('button').addEventListener('click', cbToggle, false); |
| 1586 | |
| 1587 | /** Internal acrobatics to allow certain settings toggles to access |
| 1588 | related toggles. */ |
| 1589 | const namedOptions = { |
| 1590 | activeUsers:{ |
| @@ -1840,11 +1841,11 @@ | |
| 1840 | op.persistentSetting, |
| 1841 | function(setting){ |
| 1842 | if(op.checkbox) op.checkbox.checked = !!setting.value; |
| 1843 | else if(op.select) op.select.value = setting.value; |
| 1844 | if(op.callback) op.callback(setting); |
| 1845 | } |
| 1846 | ); |
| 1847 | if(op.checkbox){ |
| 1848 | op.checkbox.addEventListener( |
| 1849 | 'change', function(){ |
| 1850 | Chat.settings.set(op.persistentSetting, op.checkbox.checked) |
| @@ -1947,11 +1948,11 @@ | |
| 1947 | this.setCurrentView(this.e.viewPreview); |
| 1948 | this.e.previewContent.innerHTML = t; |
| 1949 | this.e.viewPreview.querySelectorAll('a').forEach(addAnchorTargetBlank); |
| 1950 | this.inputFocus(); |
| 1951 | }; |
| 1952 | Chat.e.viewPreview.querySelector('#chat-preview-close'). |
| 1953 | addEventListener('click', ()=>Chat.setCurrentView(Chat.e.viewMessages), false); |
| 1954 | let previewPending = false; |
| 1955 | const elemsToEnable = [btnPreview, Chat.e.btnSubmit, Chat.e.inputFields]; |
| 1956 | const submit = function(ev){ |
| 1957 | ev.preventDefault(); |
| @@ -1994,10 +1995,25 @@ | |
| 1994 | }); |
| 1995 | return false; |
| 1996 | }; |
| 1997 | btnPreview.addEventListener('click', submit, false); |
| 1998 | })()/*message preview setup*/; |
| 1999 | |
| 2000 | /** Callback for poll() to inject new content into the page. jx == |
| 2001 | the response from /chat-poll. If atEnd is true, the message is |
| 2002 | appended to the end of the chat list (for loading older |
| 2003 | messages), else the beginning (the default). */ |
| 2004 |
| --- src/fossil.page.chat.js | |
| +++ src/fossil.page.chat.js | |
| @@ -145,10 +145,11 @@ | |
| 145 | inputM: E1('#chat-input-field-multi'), |
| 146 | inputFile: E1('#chat-input-file'), |
| 147 | contentDiv: E1('div.content'), |
| 148 | viewConfig: E1('#chat-config'), |
| 149 | viewPreview: E1('#chat-preview'), |
| 150 | viewSearch: E1('#chat-search'), |
| 151 | previewContent: E1('#chat-preview-content'), |
| 152 | btnPreview: E1('#chat-button-preview'), |
| 153 | views: document.querySelectorAll('.chat-view'), |
| 154 | activeUserListWrapper: E1('#chat-user-list-wrapper'), |
| 155 | activeUserList: E1('#chat-user-list') |
| @@ -1580,11 +1581,11 @@ | |
| 1581 | Chat.setCurrentView(Chat.e.currentView===Chat.e.viewConfig |
| 1582 | ? Chat.e.viewMessages : Chat.e.viewConfig); |
| 1583 | return false; |
| 1584 | }; |
| 1585 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 1586 | Chat.e.viewConfig.querySelector('button.action-close').addEventListener('click', cbToggle, false); |
| 1587 | |
| 1588 | /** Internal acrobatics to allow certain settings toggles to access |
| 1589 | related toggles. */ |
| 1590 | const namedOptions = { |
| 1591 | activeUsers:{ |
| @@ -1840,11 +1841,11 @@ | |
| 1841 | op.persistentSetting, |
| 1842 | function(setting){ |
| 1843 | if(op.checkbox) op.checkbox.checked = !!setting.value; |
| 1844 | else if(op.select) op.select.value = setting.value; |
| 1845 | if(op.callback) op.callback(setting); |
| 1846 | } |
| 1847 | ); |
| 1848 | if(op.checkbox){ |
| 1849 | op.checkbox.addEventListener( |
| 1850 | 'change', function(){ |
| 1851 | Chat.settings.set(op.persistentSetting, op.checkbox.checked) |
| @@ -1947,11 +1948,11 @@ | |
| 1948 | this.setCurrentView(this.e.viewPreview); |
| 1949 | this.e.previewContent.innerHTML = t; |
| 1950 | this.e.viewPreview.querySelectorAll('a').forEach(addAnchorTargetBlank); |
| 1951 | this.inputFocus(); |
| 1952 | }; |
| 1953 | Chat.e.viewPreview.querySelector('button.action-close'). |
| 1954 | addEventListener('click', ()=>Chat.setCurrentView(Chat.e.viewMessages), false); |
| 1955 | let previewPending = false; |
| 1956 | const elemsToEnable = [btnPreview, Chat.e.btnSubmit, Chat.e.inputFields]; |
| 1957 | const submit = function(ev){ |
| 1958 | ev.preventDefault(); |
| @@ -1994,10 +1995,25 @@ | |
| 1995 | }); |
| 1996 | return false; |
| 1997 | }; |
| 1998 | btnPreview.addEventListener('click', submit, false); |
| 1999 | })()/*message preview setup*/; |
| 2000 | |
| 2001 | (function(){/*Set up #chat-search and related bits */ |
| 2002 | const settingsButton = document.querySelector('#chat-button-search'); |
| 2003 | const eBody = E1('#chat-search-body'); |
| 2004 | const cbToggle = function(ev){ |
| 2005 | ev.preventDefault(); |
| 2006 | ev.stopPropagation(); |
| 2007 | Chat.setCurrentView(Chat.e.currentView===Chat.e.viewSearch |
| 2008 | ? Chat.e.viewMessages : Chat.e.viewSearch); |
| 2009 | return false; |
| 2010 | }; |
| 2011 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 2012 | Chat.e.viewSearch.querySelector('button.action-close').addEventListener('click', cbToggle, false); |
| 2013 | |
| 2014 | })()/*search view setup*/; |
| 2015 | |
| 2016 | /** Callback for poll() to inject new content into the page. jx == |
| 2017 | the response from /chat-poll. If atEnd is true, the message is |
| 2018 | appended to the end of the chat list (for loading older |
| 2019 | messages), else the beginning (the default). */ |
| 2020 |
+10
-18
| --- src/style.chat.css | ||
| +++ src/style.chat.css | ||
| @@ -68,11 +68,11 @@ | ||
| 68 | 68 | content placed below this. */ |
| 69 | 69 | border-bottom: 1px transparent; |
| 70 | 70 | } |
| 71 | 71 | body.chat.monospace-messages .message-widget-content, |
| 72 | 72 | body.chat.monospace-messages .chat-input-field{ |
| 73 | - font-family: monospace; | |
| 73 | + font-family: monospace; | |
| 74 | 74 | } |
| 75 | 75 | body.chat .message-widget-content > * { |
| 76 | 76 | margin: 0; |
| 77 | 77 | padding: 0; |
| 78 | 78 | } |
| @@ -192,20 +192,10 @@ | ||
| 192 | 192 | body.chat.chat-only-mode{ |
| 193 | 193 | padding: 0; |
| 194 | 194 | margin: 0 auto; |
| 195 | 195 | } |
| 196 | 196 | body.chat #chat-button-settings {} |
| 197 | -/** Popup widget for the /chat settings. */ | |
| 198 | -body.chat .chat-settings-popup { | |
| 199 | - font-size: 0.8em; | |
| 200 | - text-align: left; | |
| 201 | - display: flex; | |
| 202 | - flex-direction: column; | |
| 203 | - align-items: stretch; | |
| 204 | - padding: 0.25em; | |
| 205 | - z-index: 200; | |
| 206 | -} | |
| 207 | 197 | |
| 208 | 198 | /** Container for the list of /chat messages. */ |
| 209 | 199 | body.chat #chat-messages-wrapper { |
| 210 | 200 | overflow: auto; |
| 211 | 201 | padding: 0 0.25em; |
| @@ -356,18 +346,18 @@ | ||
| 356 | 346 | body.chat #chat-buttons-wrapper > .cbutton:hover { |
| 357 | 347 | background-color: rgba(200,200,200,0.3); |
| 358 | 348 | } |
| 359 | 349 | body.chat #chat-input-line-wrapper.compact #chat-buttons-wrapper > .cbutton { |
| 360 | 350 | margin: 2px 0.125em 0 0.125em; |
| 361 | - min-width: 6ex; | |
| 362 | - max-width: 6ex; | |
| 351 | + min-width: 4.5ex; | |
| 352 | + max-width: 4.5ex; | |
| 363 | 353 | min-height: 2.3ex; |
| 364 | 354 | max-height: 2.3ex; |
| 365 | 355 | font-size: 120%; |
| 366 | 356 | } |
| 367 | 357 | body.chat #chat-input-line-wrapper.compact #chat-buttons-wrapper #chat-button-submit { |
| 368 | - min-width: 12ex; | |
| 358 | + min-width: 10ex; | |
| 369 | 359 | } |
| 370 | 360 | .chat-input-field { |
| 371 | 361 | font-family: inherit |
| 372 | 362 | } |
| 373 | 363 | body.chat #chat-input-line-wrapper:not(.compact) #chat-input-field-multi, |
| @@ -450,10 +440,11 @@ | ||
| 450 | 440 | /*ensure that these grow more than the non-.chat-view elements. |
| 451 | 441 | Note that setting flex shrink to 0 breaks/disables scrolling!*/; |
| 452 | 442 | margin-bottom: 0.2em; |
| 453 | 443 | } |
| 454 | 444 | body.chat #chat-config, |
| 445 | +body.chat #chat-search, | |
| 455 | 446 | body.chat #chat-preview { |
| 456 | 447 | /* /chat configuration widget */ |
| 457 | 448 | display: flex; |
| 458 | 449 | flex-direction: column; |
| 459 | 450 | overflow: auto; |
| @@ -528,27 +519,28 @@ | ||
| 528 | 519 | display: inline-block; |
| 529 | 520 | opacity: 0.85; |
| 530 | 521 | } |
| 531 | 522 | body.chat #chat-config #chat-config-options .menu-entry select { |
| 532 | 523 | } |
| 533 | -body.chat #chat-preview #chat-preview-content { | |
| 524 | +body.chat #chat-preview .message-widget-content, | |
| 525 | +body.chat #chat-search .message-widget-content { | |
| 534 | 526 | overflow: auto; |
| 535 | 527 | flex: 1 1 auto; |
| 536 | 528 | padding: 0.5em; |
| 537 | 529 | border: 1px dotted; |
| 538 | 530 | } |
| 531 | + | |
| 539 | 532 | body.chat #chat-preview #chat-preview-content > * { |
| 540 | 533 | margin: 0; |
| 541 | 534 | padding: 0; |
| 542 | 535 | } |
| 543 | -body.chat #chat-preview #chat-preview-buttons { | |
| 536 | +body.chat .chat-view .button-bar { | |
| 544 | 537 | flex: 0 1 auto; |
| 545 | 538 | display: flex; |
| 546 | 539 | flex-direction: column; |
| 547 | 540 | } |
| 548 | -body.chat #chat-config > button, | |
| 549 | -body.chat #chat-preview #chat-preview-buttons > button { | |
| 541 | +body.chat .chat-view .button-bar button { | |
| 550 | 542 | padding: 0.5em; |
| 551 | 543 | flex: 0 1 auto; |
| 552 | 544 | margin: 0.25em 0; |
| 553 | 545 | } |
| 554 | 546 | |
| 555 | 547 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -68,11 +68,11 @@ | |
| 68 | content placed below this. */ |
| 69 | border-bottom: 1px transparent; |
| 70 | } |
| 71 | body.chat.monospace-messages .message-widget-content, |
| 72 | body.chat.monospace-messages .chat-input-field{ |
| 73 | font-family: monospace; |
| 74 | } |
| 75 | body.chat .message-widget-content > * { |
| 76 | margin: 0; |
| 77 | padding: 0; |
| 78 | } |
| @@ -192,20 +192,10 @@ | |
| 192 | body.chat.chat-only-mode{ |
| 193 | padding: 0; |
| 194 | margin: 0 auto; |
| 195 | } |
| 196 | body.chat #chat-button-settings {} |
| 197 | /** Popup widget for the /chat settings. */ |
| 198 | body.chat .chat-settings-popup { |
| 199 | font-size: 0.8em; |
| 200 | text-align: left; |
| 201 | display: flex; |
| 202 | flex-direction: column; |
| 203 | align-items: stretch; |
| 204 | padding: 0.25em; |
| 205 | z-index: 200; |
| 206 | } |
| 207 | |
| 208 | /** Container for the list of /chat messages. */ |
| 209 | body.chat #chat-messages-wrapper { |
| 210 | overflow: auto; |
| 211 | padding: 0 0.25em; |
| @@ -356,18 +346,18 @@ | |
| 356 | body.chat #chat-buttons-wrapper > .cbutton:hover { |
| 357 | background-color: rgba(200,200,200,0.3); |
| 358 | } |
| 359 | body.chat #chat-input-line-wrapper.compact #chat-buttons-wrapper > .cbutton { |
| 360 | margin: 2px 0.125em 0 0.125em; |
| 361 | min-width: 6ex; |
| 362 | max-width: 6ex; |
| 363 | min-height: 2.3ex; |
| 364 | max-height: 2.3ex; |
| 365 | font-size: 120%; |
| 366 | } |
| 367 | body.chat #chat-input-line-wrapper.compact #chat-buttons-wrapper #chat-button-submit { |
| 368 | min-width: 12ex; |
| 369 | } |
| 370 | .chat-input-field { |
| 371 | font-family: inherit |
| 372 | } |
| 373 | body.chat #chat-input-line-wrapper:not(.compact) #chat-input-field-multi, |
| @@ -450,10 +440,11 @@ | |
| 450 | /*ensure that these grow more than the non-.chat-view elements. |
| 451 | Note that setting flex shrink to 0 breaks/disables scrolling!*/; |
| 452 | margin-bottom: 0.2em; |
| 453 | } |
| 454 | body.chat #chat-config, |
| 455 | body.chat #chat-preview { |
| 456 | /* /chat configuration widget */ |
| 457 | display: flex; |
| 458 | flex-direction: column; |
| 459 | overflow: auto; |
| @@ -528,27 +519,28 @@ | |
| 528 | display: inline-block; |
| 529 | opacity: 0.85; |
| 530 | } |
| 531 | body.chat #chat-config #chat-config-options .menu-entry select { |
| 532 | } |
| 533 | body.chat #chat-preview #chat-preview-content { |
| 534 | overflow: auto; |
| 535 | flex: 1 1 auto; |
| 536 | padding: 0.5em; |
| 537 | border: 1px dotted; |
| 538 | } |
| 539 | body.chat #chat-preview #chat-preview-content > * { |
| 540 | margin: 0; |
| 541 | padding: 0; |
| 542 | } |
| 543 | body.chat #chat-preview #chat-preview-buttons { |
| 544 | flex: 0 1 auto; |
| 545 | display: flex; |
| 546 | flex-direction: column; |
| 547 | } |
| 548 | body.chat #chat-config > button, |
| 549 | body.chat #chat-preview #chat-preview-buttons > button { |
| 550 | padding: 0.5em; |
| 551 | flex: 0 1 auto; |
| 552 | margin: 0.25em 0; |
| 553 | } |
| 554 | |
| 555 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -68,11 +68,11 @@ | |
| 68 | content placed below this. */ |
| 69 | border-bottom: 1px transparent; |
| 70 | } |
| 71 | body.chat.monospace-messages .message-widget-content, |
| 72 | body.chat.monospace-messages .chat-input-field{ |
| 73 | font-family: monospace; |
| 74 | } |
| 75 | body.chat .message-widget-content > * { |
| 76 | margin: 0; |
| 77 | padding: 0; |
| 78 | } |
| @@ -192,20 +192,10 @@ | |
| 192 | body.chat.chat-only-mode{ |
| 193 | padding: 0; |
| 194 | margin: 0 auto; |
| 195 | } |
| 196 | body.chat #chat-button-settings {} |
| 197 | |
| 198 | /** Container for the list of /chat messages. */ |
| 199 | body.chat #chat-messages-wrapper { |
| 200 | overflow: auto; |
| 201 | padding: 0 0.25em; |
| @@ -356,18 +346,18 @@ | |
| 346 | body.chat #chat-buttons-wrapper > .cbutton:hover { |
| 347 | background-color: rgba(200,200,200,0.3); |
| 348 | } |
| 349 | body.chat #chat-input-line-wrapper.compact #chat-buttons-wrapper > .cbutton { |
| 350 | margin: 2px 0.125em 0 0.125em; |
| 351 | min-width: 4.5ex; |
| 352 | max-width: 4.5ex; |
| 353 | min-height: 2.3ex; |
| 354 | max-height: 2.3ex; |
| 355 | font-size: 120%; |
| 356 | } |
| 357 | body.chat #chat-input-line-wrapper.compact #chat-buttons-wrapper #chat-button-submit { |
| 358 | min-width: 10ex; |
| 359 | } |
| 360 | .chat-input-field { |
| 361 | font-family: inherit |
| 362 | } |
| 363 | body.chat #chat-input-line-wrapper:not(.compact) #chat-input-field-multi, |
| @@ -450,10 +440,11 @@ | |
| 440 | /*ensure that these grow more than the non-.chat-view elements. |
| 441 | Note that setting flex shrink to 0 breaks/disables scrolling!*/; |
| 442 | margin-bottom: 0.2em; |
| 443 | } |
| 444 | body.chat #chat-config, |
| 445 | body.chat #chat-search, |
| 446 | body.chat #chat-preview { |
| 447 | /* /chat configuration widget */ |
| 448 | display: flex; |
| 449 | flex-direction: column; |
| 450 | overflow: auto; |
| @@ -528,27 +519,28 @@ | |
| 519 | display: inline-block; |
| 520 | opacity: 0.85; |
| 521 | } |
| 522 | body.chat #chat-config #chat-config-options .menu-entry select { |
| 523 | } |
| 524 | body.chat #chat-preview .message-widget-content, |
| 525 | body.chat #chat-search .message-widget-content { |
| 526 | overflow: auto; |
| 527 | flex: 1 1 auto; |
| 528 | padding: 0.5em; |
| 529 | border: 1px dotted; |
| 530 | } |
| 531 | |
| 532 | body.chat #chat-preview #chat-preview-content > * { |
| 533 | margin: 0; |
| 534 | padding: 0; |
| 535 | } |
| 536 | body.chat .chat-view .button-bar { |
| 537 | flex: 0 1 auto; |
| 538 | display: flex; |
| 539 | flex-direction: column; |
| 540 | } |
| 541 | body.chat .chat-view .button-bar button { |
| 542 | padding: 0.5em; |
| 543 | flex: 0 1 auto; |
| 544 | margin: 0.25em 0; |
| 545 | } |
| 546 | |
| 547 |