mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-05 18:26:56 +00:00
make filtering the story-river work
This commit is contained in:
parent
a26716c998
commit
569ec747fa
9
core/ui/KeyboardShortcuts/filter-river.tid
Normal file
9
core/ui/KeyboardShortcuts/filter-river.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/KeyboardShortcuts/filter-river
|
||||
tags: $:/tags/KeyboardShortcut
|
||||
key: ((filter-river))
|
||||
|
||||
<%if [{$:/state/story-river/filter}!match[yes]] %>
|
||||
<$action-setfield $tiddler="$:/state/story-river/filter" text="yes"/>
|
||||
<% else %>
|
||||
<$action-deletetiddler $tiddler="$:/state/story-river/filter"/>
|
||||
<% endif %>
|
@ -14,7 +14,11 @@ tags: $:/tags/PageTemplate
|
||||
|
||||
</section>
|
||||
|
||||
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/StoryTiddlerTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
|
||||
<$vars searchPrefix="[" searchSuffix="]">
|
||||
|
||||
<$list filter=<<tf.story-river.filter>> history="$:/HistoryList" template="$:/core/ui/StoryTiddlerTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
|
||||
|
||||
</$vars>
|
||||
|
||||
<section class="story-frontdrop">
|
||||
|
||||
|
@ -67,6 +67,14 @@ tags: $:/tags/SideBarSegment
|
||||
<<advanced-search-actions>>
|
||||
{{$:/core/images/advanced-search-button}}
|
||||
</$button>
|
||||
<$button tooltip="filter" class={{{ [{$:/state/story-river/filter}match[yes]then[tc-selected]] tc-btn-invisible +[join[ ]] }}}>
|
||||
<%if [{$:/state/story-river/filter}!match[yes]] %>
|
||||
<$action-setfield $tiddler="$:/state/story-river/filter" text="yes"/>
|
||||
<% else %>
|
||||
<$action-deletetiddler $tiddler="$:/state/story-river/filter"/>
|
||||
<% endif %>
|
||||
{{$:/core/images/github}}
|
||||
</$button>
|
||||
<$button class="tc-btn-invisible">
|
||||
<<cancel-search-actions>><$action-sendmessage $message="tm-focus-selector" $param=".tc-search input"/>
|
||||
{{$:/core/images/close-button}}
|
||||
|
3
core/wiki/config/StoryFilterFields.tid
Normal file
3
core/wiki/config/StoryFilterFields.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/config/StoryFilter/fields
|
||||
|
||||
*
|
3
core/wiki/config/StoryFilterFlags.tid
Normal file
3
core/wiki/config/StoryFilterFlags.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/config/StoryFilter/flags
|
||||
|
||||
words
|
@ -1,3 +1,4 @@
|
||||
title: $:/core/wiki/functions/search
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function tf.story-river.filter() [[list]addsuffix[<tv-story-list>]addsuffix[$(searchSuffix)$]substitute[]addsuffix[ ]addsuffix[:filter]addsuffix[$(searchPrefix)$]substitute[]addsuffix[{$:/state/story-river/filter}match]addsuffix[$(searchPrefix)$]substitute[]addsuffix[yes]addsuffix[$(searchSuffix)$]substitute[]addsuffix[then<currentTiddler>]addsuffix[search:]addsuffix{$:/config/StoryFilter/fields}addsuffix[:]addsuffix{$:/config/StoryFilter/flags}addsuffix[{$:/temp/search/input}]addsuffix[else{$:/state/story-river/filter}!match]addsuffix[$(searchPrefix)$]substitute[]addsuffix[yes]addsuffix[$(searchSuffix)$]substitute[]addsuffix[then<currentTiddler>]] +[addprefix[$(searchPrefix)$]substitute[]addsuffix[$(searchSuffix)$]substitute[]]
|
Loading…
x
Reference in New Issue
Block a user