ScuttleBot
ui: add $ prefix for system bots in user list
Commit
4533e987352d8efd64557e5ce6c885152a425560d39e45f2ba38952e3299801c
Parent
c71a610781e93a1…
1 file changed
+2
-1
+2
-1
| --- internal/api/ui/index.html | ||
| +++ internal/api/ui/index.html | ||
| @@ -1835,10 +1835,11 @@ | ||
| 1835 | 1835 | } |
| 1836 | 1836 | |
| 1837 | 1837 | function nickPrefix(nick) { |
| 1838 | 1838 | const tier = nickTier(nick); |
| 1839 | 1839 | if (tier === 0) return '@'; |
| 1840 | + if (tier === 1) return '$'; | |
| 1840 | 1841 | if (tier === 2) return '+'; |
| 1841 | 1842 | return ''; |
| 1842 | 1843 | } |
| 1843 | 1844 | |
| 1844 | 1845 | function renderNicklist(users) { |
| @@ -2003,11 +2004,11 @@ | ||
| 2003 | 2004 | |
| 2004 | 2005 | // On first Tab press with this prefix, build candidate list |
| 2005 | 2006 | if (_tabIdx === -1 || word.toLowerCase() !== _tabPrefix.toLowerCase()) { |
| 2006 | 2007 | _tabPrefix = word; |
| 2007 | 2008 | const nicks = Array.from(document.querySelectorAll('#nicklist-users .nicklist-nick')) |
| 2008 | - .map(el => el.textContent.replace(/^[●@+]\s*/, '').trim()) | |
| 2009 | + .map(el => el.textContent.replace(/^[●@+$]\s*/, '').trim()) | |
| 2009 | 2010 | .filter(n => n.toLowerCase().startsWith(word.replace(/^@/, '').toLowerCase())); |
| 2010 | 2011 | if (!nicks.length) return; |
| 2011 | 2012 | _tabCandidates = nicks; |
| 2012 | 2013 | _tabIdx = 0; |
| 2013 | 2014 | } else { |
| 2014 | 2015 |
| --- internal/api/ui/index.html | |
| +++ internal/api/ui/index.html | |
| @@ -1835,10 +1835,11 @@ | |
| 1835 | } |
| 1836 | |
| 1837 | function nickPrefix(nick) { |
| 1838 | const tier = nickTier(nick); |
| 1839 | if (tier === 0) return '@'; |
| 1840 | if (tier === 2) return '+'; |
| 1841 | return ''; |
| 1842 | } |
| 1843 | |
| 1844 | function renderNicklist(users) { |
| @@ -2003,11 +2004,11 @@ | |
| 2003 | |
| 2004 | // On first Tab press with this prefix, build candidate list |
| 2005 | if (_tabIdx === -1 || word.toLowerCase() !== _tabPrefix.toLowerCase()) { |
| 2006 | _tabPrefix = word; |
| 2007 | const nicks = Array.from(document.querySelectorAll('#nicklist-users .nicklist-nick')) |
| 2008 | .map(el => el.textContent.replace(/^[●@+]\s*/, '').trim()) |
| 2009 | .filter(n => n.toLowerCase().startsWith(word.replace(/^@/, '').toLowerCase())); |
| 2010 | if (!nicks.length) return; |
| 2011 | _tabCandidates = nicks; |
| 2012 | _tabIdx = 0; |
| 2013 | } else { |
| 2014 |
| --- internal/api/ui/index.html | |
| +++ internal/api/ui/index.html | |
| @@ -1835,10 +1835,11 @@ | |
| 1835 | } |
| 1836 | |
| 1837 | function nickPrefix(nick) { |
| 1838 | const tier = nickTier(nick); |
| 1839 | if (tier === 0) return '@'; |
| 1840 | if (tier === 1) return '$'; |
| 1841 | if (tier === 2) return '+'; |
| 1842 | return ''; |
| 1843 | } |
| 1844 | |
| 1845 | function renderNicklist(users) { |
| @@ -2003,11 +2004,11 @@ | |
| 2004 | |
| 2005 | // On first Tab press with this prefix, build candidate list |
| 2006 | if (_tabIdx === -1 || word.toLowerCase() !== _tabPrefix.toLowerCase()) { |
| 2007 | _tabPrefix = word; |
| 2008 | const nicks = Array.from(document.querySelectorAll('#nicklist-users .nicklist-nick')) |
| 2009 | .map(el => el.textContent.replace(/^[●@+$]\s*/, '').trim()) |
| 2010 | .filter(n => n.toLowerCase().startsWith(word.replace(/^@/, '').toLowerCase())); |
| 2011 | if (!nicks.length) return; |
| 2012 | _tabCandidates = nicks; |
| 2013 | _tabIdx = 0; |
| 2014 | } else { |
| 2015 |