Fossil SCM

/chat: in the popup which is triggered by tapping a user's name add a link to the /timeline filtered on that user, per suggestion by Sean in the forum.

stephan 2021-06-15 02:29 trunk
Commit b71be5ef366b39cd89f98e55a0e7345f00119c88efac55cac7948cbf5e4759c9
+13
--- src/chat.js
+++ src/chat.js
@@ -738,10 +738,23 @@
738738
btnDeleteGlobal.addEventListener('click', function(){
739739
self.hide();
740740
Chat.deleteMessage(eMsg);
741741
});
742742
}
743
+ if(eMsg.dataset.xfrom){
744
+ /* Add a link to the /timeline filtered on this user. */
745
+ const toolbar2 = D.addClass(D.div(), 'toolbar');
746
+ D.append(this.e, toolbar2);
747
+ const timelineLink = D.attr(
748
+ D.a(F.repoUrl('timeline',{
749
+ u: eMsg.dataset.xfrom,
750
+ y: 'a'
751
+ }), "User's Timeline"),
752
+ 'target', '_blank'
753
+ );
754
+ D.append(toolbar2, timelineLink);
755
+ }
743756
}/*refresh()*/
744757
});
745758
f.popup.installHideHandlers();
746759
f.popup.hide = function(){
747760
delete this._eMsg;
748761
--- src/chat.js
+++ src/chat.js
@@ -738,10 +738,23 @@
738 btnDeleteGlobal.addEventListener('click', function(){
739 self.hide();
740 Chat.deleteMessage(eMsg);
741 });
742 }
 
 
 
 
 
 
 
 
 
 
 
 
 
743 }/*refresh()*/
744 });
745 f.popup.installHideHandlers();
746 f.popup.hide = function(){
747 delete this._eMsg;
748
--- src/chat.js
+++ src/chat.js
@@ -738,10 +738,23 @@
738 btnDeleteGlobal.addEventListener('click', function(){
739 self.hide();
740 Chat.deleteMessage(eMsg);
741 });
742 }
743 if(eMsg.dataset.xfrom){
744 /* Add a link to the /timeline filtered on this user. */
745 const toolbar2 = D.addClass(D.div(), 'toolbar');
746 D.append(this.e, toolbar2);
747 const timelineLink = D.attr(
748 D.a(F.repoUrl('timeline',{
749 u: eMsg.dataset.xfrom,
750 y: 'a'
751 }), "User's Timeline"),
752 'target', '_blank'
753 );
754 D.append(toolbar2, timelineLink);
755 }
756 }/*refresh()*/
757 });
758 f.popup.installHideHandlers();
759 f.popup.hide = function(){
760 delete this._eMsg;
761
--- src/default.css
+++ src/default.css
@@ -1287,10 +1287,14 @@
12871287
/* problem: if we inherit the color it may either be
12881288
transparent or inherit translucency via the
12891289
skin, leaving it unreadable. Since we set the bg
12901290
color we must also set the fg color. */;
12911291
color: rgba(235, 235, 235, 0.9);
1292
+}
1293
+.fossil-PopupWidget a,
1294
+.fossil-PopupWidget a:visited {
1295
+ color: initial;
12921296
}
12931297
.fossil-toast-message.error,
12941298
.fossil-toast-message.warning {
12951299
background: yellow;
12961300
}
12971301
--- src/default.css
+++ src/default.css
@@ -1287,10 +1287,14 @@
1287 /* problem: if we inherit the color it may either be
1288 transparent or inherit translucency via the
1289 skin, leaving it unreadable. Since we set the bg
1290 color we must also set the fg color. */;
1291 color: rgba(235, 235, 235, 0.9);
 
 
 
 
1292 }
1293 .fossil-toast-message.error,
1294 .fossil-toast-message.warning {
1295 background: yellow;
1296 }
1297
--- src/default.css
+++ src/default.css
@@ -1287,10 +1287,14 @@
1287 /* problem: if we inherit the color it may either be
1288 transparent or inherit translucency via the
1289 skin, leaving it unreadable. Since we set the bg
1290 color we must also set the fg color. */;
1291 color: rgba(235, 235, 235, 0.9);
1292 }
1293 .fossil-PopupWidget a,
1294 .fossil-PopupWidget a:visited {
1295 color: initial;
1296 }
1297 .fossil-toast-message.error,
1298 .fossil-toast-message.warning {
1299 background: yellow;
1300 }
1301

Keyboard Shortcuts

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