From ee25af758e72071669540387b3068ee357affa28 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 30 Aug 2018 12:38:13 +0100 Subject: [PATCH] Make "Open" tab mutate into "History" tab when in STM Instead of introducing a new "History" tab to the sidebar we make the existing "Open" tab mutate into a "History" tab when in Single Tiddler Mode. --- core/ui/SideBar/History.tid | 5 ----- core/ui/SideBar/Open.tid | 9 ++++++++- core/wiki/tags/SideBar.tid | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 core/ui/SideBar/History.tid diff --git a/core/ui/SideBar/History.tid b/core/ui/SideBar/History.tid deleted file mode 100644 index e6f295f2d..000000000 --- a/core/ui/SideBar/History.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: $:/core/ui/SideBar/History -tags: $:/tags/SideBar -caption: {{$:/language/SideBar/History/Caption}} - -<$list filter="[list[$:/HistoryList]limit[100]]" template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/SideBar/Open.tid b/core/ui/SideBar/Open.tid index 61e52b420..1dbc8f815 100644 --- a/core/ui/SideBar/Open.tid +++ b/core/ui/SideBar/Open.tid @@ -1,6 +1,6 @@ title: $:/core/ui/SideBar/Open tags: $:/tags/SideBar -caption: {{$:/language/SideBar/Open/Caption}} +caption: <$list filter="[prefix[yes]]" emptyMessage="{{$:/language/SideBar/Open/Caption}}">{{$:/language/SideBar/History/Caption}} \define lingo-base() $:/language/CloseAll/ @@ -8,6 +8,7 @@ caption: {{$:/language/SideBar/Open/Caption}} <$action-listops $tiddler="$:/StoryList" $subfilter="+[insertbefore:currentTiddler]"/> \end +\define open() <$list filter="[list[$:/StoryList]]" history="$:/HistoryList" storyview="pop">
<$droppable actions=<>> @@ -28,3 +29,9 @@ caption: {{$:/language/SideBar/Open/Caption}} <$button message="tm-close-all-tiddlers" class="tc-btn-invisible tc-btn-mini"><> +\end + +<$list filter="[prefix[yes]]" emptyMessage=<>> +<$list filter="[list[$:/HistoryList]limit[100]]" template="$:/core/ui/ListItemTemplate"/> + + diff --git a/core/wiki/tags/SideBar.tid b/core/wiki/tags/SideBar.tid index cfa1f3043..48f8a608e 100644 --- a/core/wiki/tags/SideBar.tid +++ b/core/wiki/tags/SideBar.tid @@ -1,3 +1,3 @@ title: $:/tags/SideBar -list: [[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/History]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]] +list: [[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]]