1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +00:00

New System Explorer tab in sidebar (#2881)

* Create System-Explorer.tid

* Fixes problem with syslink parser
This commit is contained in:
Adrian Morosanu 2017-06-09 17:22:09 +03:00 committed by Jeremy Ruston
parent 4b9fcdf958
commit 1e9d214f67

View File

@ -0,0 +1,60 @@
title: $:/core/ui/MoreSideBar/System-Explorer
tags: $:/tags/MoreSideBar
caption: {{$:/language/SideBar/System-Explorer/Caption}}
\define cleanChunk()
<$list filter="[[$(chunk)$]] +[removesuffix[/]]" variable="cleanChunk">
<$text text=<<cleanChunk>>/>
</$list>
\end
\define leafnode(prefix)
<li>
<$list filter="""[[$prefix$$(chunk)$]is[shadow]] [[$prefix$$(chunk)$]is[tiddler]] +[removeprefix[$prefix$]] +[limit[1]]"""
emptyMessage="""<$text text="$prefix$$(chunk)$"/>""">
<button class="tc-btn-invisible" disabled>{{$:/core/images/blank}}</button> <$link to="""$prefix$$(chunk)$""">
<$view field="title"/>
</$link>
</$list>
</li>
\end
\define branchnode(prefix)
<$reveal type="nomatch" text="" default="""$(chunk)$""">
<li>
<$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]""">
<$reveal type="nomatch" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}}</$button>
</$reveal>
<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}</$button>
</$reveal>
</$list>
<<cleanChunk>>
<$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]""">(<$count filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]]"""/>)
<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$macrocall $name="tree" prefix="""$prefix$$(chunk)$"""/>
</$reveal>
</$list>
</li>
</$reveal>
\end
\define tree(prefix)
<ol>
<$list filter="[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]] +[!suffix[/]]" variable="chunk">
<<leafnode """$prefix$""">>
</$list>
<$list filter="[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]] +[suffix[/]]" variable="chunk">
<<branchnode """$prefix$""">>
</$list>
</ol>
\end
<div class="tc-table-of-contents">
<<tree "$:/">>
</div>