diff --git a/core/ui/Components/plugin-info.tid b/core/ui/Components/plugin-info.tid new file mode 100644 index 000000000..a5fbf141a --- /dev/null +++ b/core/ui/Components/plugin-info.tid @@ -0,0 +1,95 @@ +title: $:/core/ui/Components/plugin-info + +\define lingo-base() $:/language/ControlPanel/Plugins/ + +\define popup-state-macro() +$(qualified-state)$-$(currentTiddler)$ +\end + +\define tabs-state-macro() +$(popup-state)$-$(pluginInfoType)$ +\end + +\define plugin-icon-title() +$(currentTiddler)$/icon +\end + +\define plugin-disable-title() +$:/config/Plugins/Disabled/$(currentTiddler)$ +\end + +\define plugin-table-body(type,disabledMessage,default-popup-state) +
+<$reveal type="nomatch" state=<> text="yes" default="""$default-popup-state$"""> +<$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="yes"> +{{$:/core/images/right-arrow}} + + +<$reveal type="match" state=<> text="yes" default="""$default-popup-state$"""> +<$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="no"> +{{$:/core/images/down-arrow}} + + +
+
+<$transclude tiddler=<> subtiddler=<>> +<$transclude tiddler="$:/core/images/plugin-generic-$type$"/> + +
+
+

+''<$view field="description"><$view field="title"/>'' $disabledMessage$ +

+

+<$view field="title"/> +

+

+
<$view field="version"/>
+

+
+\end + +\define plugin-info(type,default-popup-state) +<$set name="popup-state" value=<>> +<$reveal type="nomatch" state=<> text="yes"> +<$link to={{!!title}} class="tc-plugin-info"> +<> + + +<$reveal type="match" state=<> text="yes"> +<$link to={{!!title}} class="tc-plugin-info tc-plugin-info-disabled"> +<">> + + +<$reveal type="match" text="yes" state=<> default="""$default-popup-state$"""> +
+
+<$list filter="[all[current]] -[[$:/core]]"> +
+<$reveal type="nomatch" state=<> text="yes"> +<$button set=<> setTo="yes" tooltip={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}> +<> + + +<$reveal type="match" state=<> text="yes"> +<$button set=<> setTo="no" tooltip={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}> +<> + + +
+ +<$reveal type="nomatch" text="" state="!!list"> +<$set name="tabsList" filter="[list[]] contents"> +<$macrocall $name="tabs" state=<> tabsList=<> default="readme" template="$:/core/ui/PluginInfo"/> + + +<$reveal type="match" text="" state="!!list"> +<> + +
+
+ + +\end + +<$macrocall $name="plugin-info" type=<> default-popup-state=<>/> diff --git a/core/ui/ControlPanel/Plugins.tid b/core/ui/ControlPanel/Plugins.tid index d0bec764c..49ff58e5e 100644 --- a/core/ui/ControlPanel/Plugins.tid +++ b/core/ui/ControlPanel/Plugins.tid @@ -4,95 +4,11 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}} \define lingo-base() $:/language/ControlPanel/Plugins/ -\define popup-state-macro() -$(qualified-state)$-$(currentTiddler)$ -\end - -\define tabs-state-macro() -$(popup-state)$-$(pluginInfoType)$ -\end - -\define plugin-icon-title() -$(currentTiddler)$/icon -\end - -\define plugin-disable-title() -$:/config/Plugins/Disabled/$(currentTiddler)$ -\end - -\define plugin-table-body(type,disabledMessage) -
-<$reveal type="nomatch" state=<> text="yes"> -<$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="yes"> -{{$:/core/images/right-arrow}} - - -<$reveal type="match" state=<> text="yes"> -<$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="no"> -{{$:/core/images/down-arrow}} - - -
-
-<$transclude tiddler=<> subtiddler=<>> -<$transclude tiddler="$:/core/images/plugin-generic-$type$"/> - -
-
-

-''<$view field="description"><$view field="title"/>'' $disabledMessage$ -

-

-<$view field="title"/> -

-

-
<$view field="version"/>
-

-
-\end - \define plugin-table(type) +<$set name="plugin-type" value="""$type$"""> <$set name="qualified-state" value=<>> -<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]" emptyMessage=<>> -<$set name="popup-state" value=<>> -<$reveal type="nomatch" state=<> text="yes"> -<$link to={{!!title}} class="tc-plugin-info"> -<> - - -<$reveal type="match" state=<> text="yes"> -<$link to={{!!title}} class="tc-plugin-info tc-plugin-info-disabled"> -<">> - - -<$reveal type="match" text="yes" state=<>> -
-
-<$list filter="[all[current]] -[[$:/core]]"> -
-<$reveal type="nomatch" state=<> text="yes"> -<$button set=<> setTo="yes" tooltip={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}> -<> - - -<$reveal type="match" state=<> text="yes"> -<$button set=<> setTo="no" tooltip={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}> -<> - - -
- -<$reveal type="nomatch" text="" state="!!list"> -<$macrocall $name="tabs" state=<> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/> - -<$reveal type="match" text="" state="!!list"> -<> - -
-
- +<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]" emptyMessage=<> template="$:/core/ui/Components/plugin-info"/> - \end diff --git a/core/ui/MoreSideBar/Plugins.tid b/core/ui/MoreSideBar/Plugins.tid new file mode 100644 index 000000000..614bcaeee --- /dev/null +++ b/core/ui/MoreSideBar/Plugins.tid @@ -0,0 +1,8 @@ +title: $:/core/ui/MoreSideBar/Plugins +tags: $:/tags/MoreSideBar +caption: {{$:/language/ControlPanel/Plugins/Caption}} + + +{{$:/language/ControlPanel/Plugins/Installed/Hint}} + +<> diff --git a/core/ui/MoreSideBar/plugins/Languages.tid b/core/ui/MoreSideBar/plugins/Languages.tid new file mode 100644 index 000000000..2220f0124 --- /dev/null +++ b/core/ui/MoreSideBar/plugins/Languages.tid @@ -0,0 +1,5 @@ +title: $:/core/ui/MoreSideBar/Plugins/Languages +tags: $:/tags/MoreSideBar/Plugins +caption: {{$:/language/ControlPanel/Plugins/Languages/Caption}} + +<$list filter="[!has[draft.of]plugin-type[language]sort[description]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/> diff --git a/core/ui/MoreSideBar/plugins/Plugins.tid b/core/ui/MoreSideBar/plugins/Plugins.tid new file mode 100644 index 000000000..96933542a --- /dev/null +++ b/core/ui/MoreSideBar/plugins/Plugins.tid @@ -0,0 +1,5 @@ +title: $:/core/ui/MoreSideBar/Plugins/Plugins +tags: $:/tags/MoreSideBar/Plugins +caption: {{$:/language/ControlPanel/Plugins/Plugins/Caption}} + +<$list filter="[!has[draft.of]plugin-type[plugin]sort[description]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}>>/> diff --git a/core/ui/MoreSideBar/plugins/Theme.tid b/core/ui/MoreSideBar/plugins/Theme.tid new file mode 100644 index 000000000..48447cd6e --- /dev/null +++ b/core/ui/MoreSideBar/plugins/Theme.tid @@ -0,0 +1,5 @@ +title: $:/core/ui/MoreSideBar/Plugins/Theme +tags: $:/tags/MoreSideBar/Plugins +caption: {{$:/language/ControlPanel/Plugins/Themes/Caption}} + +<$list filter="[!has[draft.of]plugin-type[theme]sort[description]]" template="$:/core/ui/PluginListItemTemplate" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/> diff --git a/core/ui/PluginInfo.tid b/core/ui/PluginInfo.tid index 9e43b0dee..d8944bf35 100644 --- a/core/ui/PluginInfo.tid +++ b/core/ui/PluginInfo.tid @@ -6,10 +6,15 @@ $(currentTiddler)$/$(languageTitle)$/$(currentTab)$ \define info-tiddler-title() $(currentTiddler)$/$(currentTab)$ \end +\define default-tiddler-title() +$:/core/ui/PluginInfo/Default/$(currentTab)$ +\end <$transclude tiddler=<> mode="block"> <$transclude tiddler=<> subtiddler=<> mode="block"> <$transclude tiddler=<> subtiddler=<> mode="block"> +<$transclude tiddler=<> mode="block"> {{$:/language/ControlPanel/Plugin/NoInfoFound/Hint}} + diff --git a/core/ui/PluginInfoDefaultContents.tid b/core/ui/PluginInfoDefaultContents.tid new file mode 100644 index 000000000..f006d0c60 --- /dev/null +++ b/core/ui/PluginInfoDefaultContents.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/PluginInfo/Default/contents + +\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/ +<> +
    +<$list filter="[all[current]plugintiddlers[]sort[title]]" emptyMessage=<>> +
  • +<$link to={{!!title}}> +<$view field="title"/> + +
  • + +
diff --git a/core/ui/PluginListItemTemplate.tid b/core/ui/PluginListItemTemplate.tid new file mode 100644 index 000000000..f781bca92 --- /dev/null +++ b/core/ui/PluginListItemTemplate.tid @@ -0,0 +1,9 @@ +title: $:/core/ui/PluginListItemTemplate + +
+<$link to={{!!title}}> +<$view field="description"> +<$view field="title"/> + + +
\ No newline at end of file diff --git a/core/ui/ViewTemplate/plugin.tid b/core/ui/ViewTemplate/plugin.tid index 2c7d2081c..07bb3b618 100644 --- a/core/ui/ViewTemplate/plugin.tid +++ b/core/ui/ViewTemplate/plugin.tid @@ -2,7 +2,11 @@ title: $:/core/ui/ViewTemplate/plugin tags: $:/tags/ViewTemplate <$list filter="[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]"> - -{{||$:/core/ui/TiddlerInfo/Advanced/PluginInfo}} - +<$set name="plugin-type" value={{!!plugin-type}}> +<$set name="default-popup-state" value="yes"> +<$set name="qualified-state" value=<>> +{{||$:/core/ui/Components/plugin-info}} + + + diff --git a/core/wiki/tags/MoreSideBar.tid b/core/wiki/tags/MoreSideBar.tid index b7f17dace..2dc0adb53 100644 --- a/core/wiki/tags/MoreSideBar.tid +++ b/core/wiki/tags/MoreSideBar.tid @@ -1,3 +1,3 @@ title: $:/tags/MoreSideBar -list: [[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]] +list: [[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]] [[$:/core/ui/MoreSideBar/Plugins]] diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index dff8c9bdc..78aae3b1f 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -88,11 +88,11 @@ canvas.tc-edit-bitmapeditor { <> } -.tc-more-sidebar .tc-tab-buttons button { +.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button { <> } -.tc-more-sidebar .tc-tab-buttons button.tc-tab-selected { +.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button.tc-tab-selected { <> } diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index c9ef62f87..dc6bb431d 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1707,7 +1707,7 @@ html body.tc-body.tc-single-tiddler-window { border-top: 1px solid <>; } -.tc-more-sidebar .tc-tab-buttons button { +.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button { display: block; width: 100%; background-color: <>; @@ -1718,7 +1718,7 @@ html body.tc-body.tc-single-tiddler-window { margin-bottom: inherit; } -.tc-more-sidebar .tc-tab-buttons button.tc-tab-selected { +.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button.tc-tab-selected { background-color: <>; border: none; }