diff --git a/core/images/list.tid b/core/images/list.tid new file mode 100644 index 000000000..c27a51647 --- /dev/null +++ b/core/images/list.tid @@ -0,0 +1,9 @@ +title: $:/core/images/list +tags: $:/tags/Image + + + + + + + \ No newline at end of file diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index 3a8f21969..5c8398f6d 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -54,6 +54,8 @@ Home/Caption: home Home/Hint: Open the default tiddlers Language/Caption: language Language/Hint: Choose the user interface language +Manager/Caption: tiddler manager +Manager/Hint: Open tiddler manager More/Caption: more More/Hint: More actions NewHere/Caption: new here diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids index c21b68326..7d16deb27 100644 --- a/core/language/en-GB/Misc.multids +++ b/core/language/en-GB/Misc.multids @@ -43,6 +43,33 @@ OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywik PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect RecentChanges/DateFormat: DDth MMM YYYY SystemTiddler/Tooltip: This is a system tiddler + +SystemTiddlers/Include/Prompt: Include system tiddlers + +Manager/Item/Fields: Fields +Manager/Item/RawText: Raw text +Manager/Item/WikifiedText: Wikified text +Manager/Item/Colour: Colour +Manager/Item/Tags: Tags +Manager/Item/Icon: Icon +Manager/Item/Icon/None: (none) +Manager/Item/Tools: Tools + +Manager/Controls/Show/Prompt: Show: +Manager/Controls/Show/Option/Tiddlers: tiddlers +Manager/Controls/Show/Option/Tags: tags + +Manager/Controls/Search/Prompt: Search: +Manager/Controls/Search/Placeholder: Search + +Manager/Controls/Sort/Prompt: Sort by: + +Manager/Controls/Order/Prompt: Reverse order + + +Manager/Controls/FilterByTag/Prompt: Filter by tag: +Manager/Controls/FilterByTag/None: (none) + TagManager/Colour/Heading: Colour TagManager/Count/Heading: Count TagManager/Icon/Heading: Icon diff --git a/core/ui/Manager.tid b/core/ui/Manager.tid new file mode 100644 index 000000000..b0a08ee64 --- /dev/null +++ b/core/ui/Manager.tid @@ -0,0 +1,92 @@ +title: $:/Manager +icon: $:/core/images/list +color: #bbb + +\define lingo-base() $:/language/Manager/ + +\define list-item-content-item() +
+ <$vars state-title="""$:/state/popup/manager/item/$(listItem)$"""> + <$reveal state=<> type="match" text="show" default="show" tag="div"> + <$button set=<> setTo="hide" class="tc-btn-invisible tc-manager-list-item-content-item-heading"> + {{$:/core/images/down-arrow}} <$transclude tiddler=<> field="caption"/> + + + <$reveal state=<> type="nomatch" text="show" default="show" tag="div"> + <$button set=<> setTo="show" class="tc-btn-invisible tc-manager-list-item-content-item-heading"> + {{$:/core/images/right-arrow}} <$transclude tiddler=<> field="caption"/> + + + <$reveal state=<> type="match" text="show" default="show" tag="div" class="tc-manager-list-item-content-item-body"> + <$transclude tiddler=<>/> + + +
+\end + +
+
+
+ <> <$select tiddler="$:/config/Manager/Show" default="tiddlers"> + + + +
+
+ <> <$edit-text tiddler="$:/config/Manager/Filter" tag="input" default="" placeholder={{$:/language/Manager/Controls/Search/Placeholder}}/> +
+
+ <> <$select tiddler="$:/config/Manager/Tag" default=""> + + <$list filter="[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]" variable="tag"> + + + +
+
+ <> <$select tiddler="$:/config/Manager/Sort" default="title"> + + <$list filter="title modified modifier created creator created" variable="field"> + + + + + <$list filter="[all{$:/config/Manager/Show}!is{$:/config/Manager/System}fields[]sort[title]] -title -modified -modifier -created -creator -created" variable="field"> + + + + + <$checkbox tiddler="$:/config/Manager/Order" field="text" checked="reverse" unchecked="forward" default="forward"> + <> + +
+
+ <$checkbox tiddler="$:/config/Manager/System" field="text" checked="" unchecked="system" default="system"> + {{$:/language/SystemTiddlers/Include/Prompt}} + +
+
+
+ <$list filter="[all{$:/config/Manager/Show}!is{$:/config/Manager/System}search{$:/config/Manager/Filter}tag:strict{$:/config/Manager/Tag}sort{$:/config/Manager/Sort}order{$:/config/Manager/Order}]"> + <$vars transclusion=<>> +
+ <$button popup=<> class="tc-btn-invisible tc-manager-list-item-heading" selectedClass="tc-manager-list-item-heading-selected"> + <$text text=<>/> + + <$reveal state=<> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle"> +
+ <$list filter="[all[shadows+tiddlers]tag[$:/tags/Manager/ItemMain]!has[draft.of]]" variable="listItem"> + <> + +
+ + +
+ + +
+
diff --git a/core/ui/Manager/ItemMainFields.tid b/core/ui/Manager/ItemMainFields.tid new file mode 100644 index 000000000..cf88e52c6 --- /dev/null +++ b/core/ui/Manager/ItemMainFields.tid @@ -0,0 +1,9 @@ +title: $:/Manager/ItemMain/Fields +tags: $:/tags/Manager/ItemMain +caption: {{$:/language/Manager/Item/Fields}} + + + +<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> + +
diff --git a/core/ui/Manager/ItemMainRawText.tid b/core/ui/Manager/ItemMainRawText.tid new file mode 100644 index 000000000..627095070 --- /dev/null +++ b/core/ui/Manager/ItemMainRawText.tid @@ -0,0 +1,5 @@ +title: $:/Manager/ItemMain/RawText +tags: $:/tags/Manager/ItemMain +caption: {{$:/language/Manager/Item/RawText}} + +
<$view/>
diff --git a/core/ui/Manager/ItemMainWikifiedText.tid b/core/ui/Manager/ItemMainWikifiedText.tid new file mode 100644 index 000000000..0e9fd1e75 --- /dev/null +++ b/core/ui/Manager/ItemMainWikifiedText.tid @@ -0,0 +1,5 @@ +title: $:/Manager/ItemMain/WikifiedText +tags: $:/tags/Manager/ItemMain +caption: {{$:/language/Manager/Item/WikifiedText}} + +<$transclude mode="block"/> diff --git a/core/ui/Manager/ItemSidebarColour.tid b/core/ui/Manager/ItemSidebarColour.tid new file mode 100644 index 000000000..6b432239b --- /dev/null +++ b/core/ui/Manager/ItemSidebarColour.tid @@ -0,0 +1,15 @@ +title: $:/Manager/ItemSidebar/Colour +tags: $:/tags/Manager/ItemSidebar +caption: {{$:/language/Manager/Item/Colour}} + +\define swatch-styles() +height: 1em; +background-color: $(colour)$ +\end + +<$vars colour={{!!color}}> +

>/> + +

+<$edit-text field="color" tag="input" type="color"/> / <$edit-text field="color" tag="input" type="text" size="9"/> +

diff --git a/core/ui/Manager/ItemSidebarIcon.tid b/core/ui/Manager/ItemSidebarIcon.tid new file mode 100644 index 000000000..c9fe85a27 --- /dev/null +++ b/core/ui/Manager/ItemSidebarIcon.tid @@ -0,0 +1,23 @@ +title: $:/Manager/ItemSidebar/Icon +tags: $:/tags/Manager/ItemSidebar +caption: {{$:/language/Manager/Item/Icon}} + +

+

+<$button popup=<> class="tc-btn-invisible"> +<$transclude tiddler={{!!icon}}> +{{$:/language/Manager/Item/Icon/None}} + + +
+<$reveal state=<> type="nomatch" text="" default="" tag="div" class="tc-popup"> +
+<$macrocall $name="image-picker-include-tagged-images" actions=""" +<$action-setfield $field="icon" $value=<>/> +<$action-deletetiddler $tiddler=<>/> +"""/> +
+ +
+
+

diff --git a/core/ui/Manager/ItemSidebarTags.tid b/core/ui/Manager/ItemSidebarTags.tid new file mode 100644 index 000000000..e22c2a19a --- /dev/null +++ b/core/ui/Manager/ItemSidebarTags.tid @@ -0,0 +1,32 @@ +title: $:/Manager/ItemSidebar/Tags +tags: $:/tags/Manager/ItemSidebar +caption: {{$:/language/Manager/Item/Tags}} + +\define tag-checkbox-actions() +<$action-listops + $tiddler="$:/config/Manager/RecentTags" + $subfilter="[] [list[$:/config/Manager/RecentTags]] +[limit[12]]" +/> +\end + +\define tag-picker-actions() +<> +<$action-listops + $tiddler=<> + $field="tags" + $subfilter="[] [all[current]tags[]]" +/> +\end + +

+<$list filter="[is[current]tags[]] [list[$:/config/Manager/RecentTags]] +[sort[title]] " variable="tag"> +

+<$checkbox tiddler=<> tag=<> actions=<>> +<$macrocall $name="tag-pill" tag=<>/> + +
+ +

+

+<$macrocall $name="tag-picker" actions=<>/> +

diff --git a/core/ui/Manager/ItemSidebarTools.tid b/core/ui/Manager/ItemSidebarTools.tid new file mode 100644 index 000000000..45876e989 --- /dev/null +++ b/core/ui/Manager/ItemSidebarTools.tid @@ -0,0 +1,10 @@ +title: $:/Manager/ItemSidebar/Tools +tags: $:/tags/Manager/ItemSidebar +caption: {{$:/language/Manager/Item/Tools}} + +

+<$button to=<>>{{$:/core/images/link}} open +

+

+<$button message="tm-edit-tiddler" param=<>>{{$:/core/images/edit-button}} edit +

diff --git a/core/ui/PageControls/manager.tid b/core/ui/PageControls/manager.tid new file mode 100644 index 000000000..b2a7ed9bf --- /dev/null +++ b/core/ui/PageControls/manager.tid @@ -0,0 +1,19 @@ +title: $:/core/ui/Buttons/manager +tags: $:/tags/PageControls +caption: {{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}} +description: {{$:/language/Buttons/Manager/Hint}} + +\define manager-button(class) +<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> +<$list filter="[prefix[yes]]"> +{{$:/core/images/list}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Manager/Caption}}/> + + +\end + +<$list filter="[list[$:/StoryList]] +[field:title[$:/Manager]]" emptyMessage=<>> +<> + diff --git a/core/wiki/config/Manager.multids b/core/wiki/config/Manager.multids new file mode 100644 index 000000000..11d370750 --- /dev/null +++ b/core/wiki/config/Manager.multids @@ -0,0 +1,8 @@ +title: $:/config/Manager/ + +Show: tiddlers +Filter: +Order: forward +Sort: title +System: system +Tag: diff --git a/core/wiki/config/ManagerItemState.multids b/core/wiki/config/ManagerItemState.multids new file mode 100644 index 000000000..845034ff6 --- /dev/null +++ b/core/wiki/config/ManagerItemState.multids @@ -0,0 +1,3 @@ +title: $:/state/popup/manager/item/$:/Manager/ + +ItemMain/RawText: hide \ No newline at end of file diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids index 7ad91db29..f880b3399 100644 --- a/core/wiki/config/PageControlButtons.multids +++ b/core/wiki/config/PageControlButtons.multids @@ -11,6 +11,7 @@ core/ui/Buttons/refresh: hide core/ui/Buttons/import: hide core/ui/Buttons/language: hide core/ui/Buttons/tag-manager: hide +core/ui/Buttons/manager: hide core/ui/Buttons/more-page-actions: hide core/ui/Buttons/new-journal: hide core/ui/Buttons/new-image: hide diff --git a/core/wiki/macros/image-picker.tid b/core/wiki/macros/image-picker.tid index 68bbba34d..579f3202a 100644 --- a/core/wiki/macros/image-picker.tid +++ b/core/wiki/macros/image-picker.tid @@ -1,26 +1,35 @@ title: $:/core/macros/image-picker tags: $:/tags/Macro -\define image-picker-inner(actions) +\define image-picker-thumbnail(actions) <$button tag="a" tooltip="""$(imageTitle)$"""> - $actions$ - <$transclude tiddler=<>/> - \end -\define image-picker(actions,subfilter:"") -
- -<$list filter="[all[shadows+tiddlers]is[image]$subfilter$!has[draft.of]] -[type[application/pdf]] +[sort[title]]" variable="imageTitle"> - -<$macrocall $name="image-picker-inner" actions="""$actions$"""/> - +\define image-picker-list(filter,actions) +<$list filter="""$filter$""" variable="imageTitle"> +<$macrocall $name="image-picker-thumbnail" actions="""$actions$"""/> - -
- \end +\define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]") +
+<$vars state-system=<>> +<$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="hide"> +{{$:/language/SystemTiddlers/Include/Prompt}} + +<$reveal state=<> type="match" text="hide" default="hide" tag="div"> +<$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions="""$actions$"""/> + +<$reveal state=<> type="nomatch" text="hide" default="hide" tag="div"> +<$macrocall $name="image-picker-list" filter="""$filter$""" actions="""$actions$"""/> + + +
+\end + +\define image-picker-include-tagged-images(actions) +<$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions="""$actions$"""/> +\end diff --git a/core/wiki/tags/ManagerItemMain.tid b/core/wiki/tags/ManagerItemMain.tid new file mode 100644 index 000000000..fa1af0824 --- /dev/null +++ b/core/wiki/tags/ManagerItemMain.tid @@ -0,0 +1,2 @@ +title: $:/tags/Manager/ItemMain +list: $:/Manager/ItemMain/WikifiedText $:/Manager/ItemMain/RawText $:/Manager/ItemMain/Fields \ No newline at end of file diff --git a/core/wiki/tags/ManagerItemSidebar.tid b/core/wiki/tags/ManagerItemSidebar.tid new file mode 100644 index 000000000..b450ef772 --- /dev/null +++ b/core/wiki/tags/ManagerItemSidebar.tid @@ -0,0 +1,2 @@ +title: $:/tags/Manager/ItemSidebar +list: $:/Manager/ItemSidebar/Tags $:/Manager/ItemSidebar/Colour $:/Manager/ItemSidebar/Icon $:/Manager/ItemSidebar/Tools \ No newline at end of file diff --git a/core/wiki/tags/PageControls.tid b/core/wiki/tags/PageControls.tid index 3bef09b7d..4d5972827 100644 --- a/core/wiki/tags/PageControls.tid +++ b/core/wiki/tags/PageControls.tid @@ -1,2 +1,2 @@ title: $:/tags/PageControls -list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]] +list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/manager]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/timestamp]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/print]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]] diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 0cadceb1e..1b5f94348 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1725,6 +1725,113 @@ html body.tc-body.tc-single-tiddler-window { border: none; } +/* +** Manager +*/ + +.tc-manager-wrapper { + +} + +.tc-manager-controls { + +} + +.tc-manager-control { + margin: 0.5em 0; +} + +.tc-manager-list { + width: 100%; + border-top: 1px solid <>; + border-left: 1px solid <>; + border-right: 1px solid <>; +} + +.tc-manager-list-item { + +} + +.tc-manager-list-item-heading { + display: block; + width: 100%; + text-align: left; + border-bottom: 1px solid <>; + padding: 3px; +} + +.tc-manager-list-item-heading-selected { + font-weight: bold; + color: <>; + fill: <>; + background-color: <>; +} + +.tc-manager-list-item-heading:hover { + background: <>; + color: <>; +} + +.tc-manager-list-item-content { + display: flex; +} + +.tc-manager-list-item-content-sidebar { + flex: 1 0; + background: <>; + border-right: 0.5em solid <>; + border-bottom: 0.5em solid <>; + white-space: nowrap; +} + +.tc-manager-list-item-content-item-heading { + display: block; + width: 100%; + text-align: left; + background: <>; + text-transform: uppercase; + font-size: 0.6em; + font-weight: bold; + padding: 0.5em 0 0.5em 0; +} + +.tc-manager-list-item-content-item-body { + padding: 0 0.5em 0 0.5em; +} + +.tc-manager-list-item-content-item-body > pre { + margin: 0.5em 0 0.5em 0; + border: none; + background: inherit; +} + +.tc-manager-list-item-content-tiddler { + flex: 3 1; + border-left: 0.5em solid <>; + border-right: 0.5em solid <>; + border-bottom: 0.5em solid <>; +} + +.tc-manager-list-item-content-item-body > table { + border: none; + padding: 0; + margin: 0; +} + +.tc-manager-list-item-content-item-body > table td { + border: none; +} + +.tc-manager-icon-editor > button { + width: 100%; +} + +.tc-manager-icon-editor > button > svg, +.tc-manager-icon-editor > button > button { + width: 100%; + height: auto; +} + /* ** Alerts */