Skip to content

Commit 1ce10e1

Browse files
author
Jan Henning Thorsen
committed
Can also quick search for "+#" or "+@"
1 parent fb4076b commit 1ce10e1

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

Diff for: Changes

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Revision history for perl distribution Convos
22

33
5.25 Not Released
44
- Entering "+" in the quick search bar will show conversation with unread messages
5+
- Entering "+#" in the quick search bar will show channels with unread messages
6+
- Entering "+@" in the quick search bar will show private conversation with unread messages
57

68
5.24 2021-02-11T09:30:00+0900
79
- Will not show participants in sidebar if already visible on the right side

Diff for: assets/components/ChatSidebar.svelte

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ function filterNav() {
5454
5555
// Show and hide navigation links
5656
for (let p = 0; p < prefix.length; p++) {
57-
const filterRe = filter == '+' ? new RegExp(/[1-9]\d*\s*$/) : new RegExp(prefix[p] + regexpEscape(filter), 'i');
57+
const filterRe
58+
= filter == '+' ? new RegExp(/[1-9]\d*\s*$/)
59+
: filter == '+@' ? new RegExp(/^\s*\w.*[1-9]\d*\s*$/)
60+
: filter == '+#' ? new RegExp(/^\s*#.*[1-9]\d*\s*$/)
61+
: new RegExp(prefix[p] + regexpEscape(filter), 'i');
62+
5863
const seen = {};
5964
q(navEl, 'a', (aEl, i) => {
6065
const aClassList = aEl.classList;

Diff for: assets/page/Help.svelte

+10-5
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ const changelogUrl = 'https://github.com/Nordaaker/convos/blob/' + settings('ver
2121
{@html $lmd('More information can also be found on https://convos.chat.')}
2222
</p>
2323

24-
<h2 id="shortcuts">{$l('Shortcuts')}</h2>
24+
<h2 id="quick-search">{$l('Quick search')}</h2>
25+
<p>{$l('Pressing `shift+enter` will shift focus between chat input and search in sidebar.')}</p>
2526
<dl>
26-
<dt>{$l('shift+enter')}</dt>
27-
<dd>{$l('Shift focus between chat input and search in sidebar.')}</dd>
28-
<dt>{$l('Open conversation or connection settings')}</dt>
29-
<dd>{$l('Clicking on the icon next to the conversation name will take you to settings.')}</dd>
27+
<dt>+</dt>
28+
<dd>{$l('Filter conversations with unread messages.')}</dd>
29+
<dt>+@</dt>
30+
<dd>{$l('Filter private conversations with unread messages.')}</dd>
31+
<dt>+#</dt>
32+
<dd>{$l('Filter channels with unread messages.')}</dd>
33+
<dt>{$l('Any other combination')}</dt>
34+
<dd>{$l('Filter channels, private conversations or search for a string.')}</dd>
3035
</dl>
3136

3237
<h2 id="autocomplete">{$l('Autocomplete')}</h2>

0 commit comments

Comments
 (0)