Fossil SCM

/chat links now open in a new tab by default. Reduced min-width of input field to help out FF on Android.

stephan 2021-09-21 13:34 trunk
Commit cea66528e281cbd8fa85c48a7712ea878dfbcfd72cb5db769e63c194301f63fd
--- src/chat.js
+++ src/chat.js
@@ -668,10 +668,11 @@
668668
'-',pad2(d.getDate()),
669669
' ',pad2(d.getHours()),':',pad2(d.getMinutes()),
670670
':',pad2(d.getSeconds())
671671
].join('');
672672
};
673
+ const addAnchorTargetBlank = (e)=>D.attr(e, 'target','_blank');
673674
cf.prototype = {
674675
scrollIntoView: function(){
675676
this.e.content.scrollIntoView();
676677
},
677678
setMessage: function(m){
@@ -744,10 +745,11 @@
744745
if(m.xmsg instanceof Array){
745746
// Used by Chat.reportErrorAsMessage()
746747
D.append(contentTarget, m.xmsg);
747748
}else{
748749
contentTarget.innerHTML = m.xmsg;
750
+ contentTarget.querySelectorAll('a').forEach(addAnchorTargetBlank);
749751
if(F.pikchr){
750752
F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr'));
751753
}
752754
}
753755
}
754756
--- src/chat.js
+++ src/chat.js
@@ -668,10 +668,11 @@
668 '-',pad2(d.getDate()),
669 ' ',pad2(d.getHours()),':',pad2(d.getMinutes()),
670 ':',pad2(d.getSeconds())
671 ].join('');
672 };
 
673 cf.prototype = {
674 scrollIntoView: function(){
675 this.e.content.scrollIntoView();
676 },
677 setMessage: function(m){
@@ -744,10 +745,11 @@
744 if(m.xmsg instanceof Array){
745 // Used by Chat.reportErrorAsMessage()
746 D.append(contentTarget, m.xmsg);
747 }else{
748 contentTarget.innerHTML = m.xmsg;
 
749 if(F.pikchr){
750 F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr'));
751 }
752 }
753 }
754
--- src/chat.js
+++ src/chat.js
@@ -668,10 +668,11 @@
668 '-',pad2(d.getDate()),
669 ' ',pad2(d.getHours()),':',pad2(d.getMinutes()),
670 ':',pad2(d.getSeconds())
671 ].join('');
672 };
673 const addAnchorTargetBlank = (e)=>D.attr(e, 'target','_blank');
674 cf.prototype = {
675 scrollIntoView: function(){
676 this.e.content.scrollIntoView();
677 },
678 setMessage: function(m){
@@ -744,10 +745,11 @@
745 if(m.xmsg instanceof Array){
746 // Used by Chat.reportErrorAsMessage()
747 D.append(contentTarget, m.xmsg);
748 }else{
749 contentTarget.innerHTML = m.xmsg;
750 contentTarget.querySelectorAll('a').forEach(addAnchorTargetBlank);
751 if(F.pikchr){
752 F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr'));
753 }
754 }
755 }
756
--- src/style.chat.css
+++ src/style.chat.css
@@ -223,10 +223,11 @@
223223
margin-bottom: 0.25em;
224224
align-items: stretch;
225225
}
226226
body.chat #chat-input-line.single-line {
227227
flex-wrap: wrap;
228
+ margin-bottom: 0.25em;
228229
}
229230
body.chat #chat-edit-buttons {
230231
display: flex;
231232
flex-direction: column;
232233
justify-content: space-between;
@@ -246,13 +247,13 @@
246247
margin: 0 0 0 0.25em;
247248
max-width: 2em;
248249
}
249250
body.chat #chat-input-line > input[type=text],
250251
body.chat #chat-input-line > textarea {
251
- flex: 5 1 auto;
252
+ flex: 2 1 auto;
252253
max-width: revert;
253
- min-width: 24em;
254
+ min-width: 16em;
254255
}
255256
/* Widget holding the file selection control and preview */
256257
body.chat #chat-input-file-area {
257258
display: flex;
258259
flex-direction: row;
259260
--- src/style.chat.css
+++ src/style.chat.css
@@ -223,10 +223,11 @@
223 margin-bottom: 0.25em;
224 align-items: stretch;
225 }
226 body.chat #chat-input-line.single-line {
227 flex-wrap: wrap;
 
228 }
229 body.chat #chat-edit-buttons {
230 display: flex;
231 flex-direction: column;
232 justify-content: space-between;
@@ -246,13 +247,13 @@
246 margin: 0 0 0 0.25em;
247 max-width: 2em;
248 }
249 body.chat #chat-input-line > input[type=text],
250 body.chat #chat-input-line > textarea {
251 flex: 5 1 auto;
252 max-width: revert;
253 min-width: 24em;
254 }
255 /* Widget holding the file selection control and preview */
256 body.chat #chat-input-file-area {
257 display: flex;
258 flex-direction: row;
259
--- src/style.chat.css
+++ src/style.chat.css
@@ -223,10 +223,11 @@
223 margin-bottom: 0.25em;
224 align-items: stretch;
225 }
226 body.chat #chat-input-line.single-line {
227 flex-wrap: wrap;
228 margin-bottom: 0.25em;
229 }
230 body.chat #chat-edit-buttons {
231 display: flex;
232 flex-direction: column;
233 justify-content: space-between;
@@ -246,13 +247,13 @@
247 margin: 0 0 0 0.25em;
248 max-width: 2em;
249 }
250 body.chat #chat-input-line > input[type=text],
251 body.chat #chat-input-line > textarea {
252 flex: 2 1 auto;
253 max-width: revert;
254 min-width: 16em;
255 }
256 /* Widget holding the file selection control and preview */
257 body.chat #chat-input-file-area {
258 display: flex;
259 flex-direction: row;
260

Keyboard Shortcuts

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