├── Packaged └── trashbin.tid ├── README.md ├── archive ├── $__plugins_kookma_trashbin_sidebar-tab.tid ├── README.md ├── index.html └── trashbin-1.0.0.tid ├── docs └── index.html └── source └── trashbin ├── extra └── system │ ├── config │ └── EditToolbarButtons │ │ └── Visibility │ │ └── system │ │ └── core │ │ └── ui │ │ └── Buttons │ │ └── delete.tid │ └── language │ └── Buttons │ └── Trashbin │ ├── Caption │ ├── Move.tid │ └── Recycle.tid │ └── Hint │ ├── Move.tid │ └── Recycle.tid ├── history.tid ├── icon.svg ├── icon.svg.meta ├── images ├── recycle.tid ├── sort-alpha-down.tid ├── sort-alpha-up.tid ├── sort-numeric-down.tid ├── sort-numeric-up.tid ├── times.svg.tid └── trash-alt.tid ├── license.tid ├── macros ├── bulk-operation.tid ├── confirm-empty.tid ├── move-to-trashbin.tid ├── preview-option.tid ├── restore.tid └── sort.tid ├── plugin.info ├── readme.tid ├── restore-notification.tid ├── sidebar-tab.tid ├── styles ├── main.css.tid ├── show-trashed.tid ├── toolbar-buttons.css ├── toolbar-buttons.css.meta ├── trashed-item.css └── trashed-item.css.meta ├── templates ├── body.tid ├── subtitle.tid ├── tags.tid └── title.tid ├── ui ├── sidebar.tid └── toolbar-button.tid └── viewtemplate └── trash-item.tid /Packaged/trashbin.tid: -------------------------------------------------------------------------------- 1 | author: Mohammad Rahmani 2 | core-version: >= 5.1.22 3 | dependents: 4 | description: A trashbin mechanism for Tiddlywiki 5 | list: readme license history 6 | name: Trashbin 7 | packaged-by: Gatha on 16th February 2025, 23:41:16 8 | plugin-type: plugin 9 | source: https://github.com/kookma/TW-Trashbin 10 | stability: STABILITY_2_STABLE 11 | title: $:/plugins/kookma/trashbin 12 | type: application/json 13 | version: 1.3.5 14 | 15 | {"tiddlers":{"$:/plugins/kookma/trashbin/history":{"title":"$:/plugins/kookma/trashbin/history","type":"text/vnd.tiddlywiki","text":"Full change log https://kookma.github.io/TW-Trashbin/#ChangeLog\n\n* ''1.3.5'' -- 2024.05.17 -- update to TW 5.3.6 and some bug fixes\n* ''1.3.3'' -- 2024.05.17 -- update to TW 5.3.3 and some bug fixes\n* ''1.2.4'' -- 2022.12.02 -- update to TW 5.2.3 and minor bug fixes\n* ''1.2.3'' -- 2022.01.11 -- update to TW 5.2.1\n* ''1.2.2'' -- 2020.04.10 -- bug fix in remove draft tiddlers to trashbin\n* ''1.2.1'' -- 2020.03.30 -- bug fix and doc improvement and UI fade correction\n* ''1.1.2'' -- 2020.03.28 -- stable release with new features and bug fixes\n* ''0.1.0'' -- 2019.02.12 -- mature public release\n"},"$:/plugins/kookma/trashbin/icon":{"title":"$:/plugins/kookma/trashbin/icon","text":"","type":"image/svg+xml","tags":""},"$:/plugins/kookma/trashbin/images/recycle":{"title":"$:/plugins/kookma/trashbin/images/recycle","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/sort-alpha-down":{"title":"$:/plugins/kookma/trashbin/images/sort-alpha-down","caption":"sort-alpha-down","tags":"$:/tags/Image","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/sort-alpha-up":{"title":"$:/plugins/kookma/trashbin/images/sort-alpha-up","caption":"sort-alpha-up (Solid)","tags":"$:/tags/Image","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/sort-numeric-down":{"title":"$:/plugins/kookma/trashbin/images/sort-numeric-down","caption":"sort-numeric-down","tags":"$:/tags/Image","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/sort-numeric-up":{"title":"$:/plugins/kookma/trashbin/images/sort-numeric-up","caption":"sort-numeric-up (Solid)","tags":"$:/tags/Image","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/times.svg":{"title":"$:/plugins/kookma/trashbin/images/times.svg","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/trash-alt":{"title":"$:/plugins/kookma/trashbin/images/trash-alt","caption":"trash-alt","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/license":{"title":"$:/plugins/kookma/trashbin/license","type":"text/vnd.tiddlywiki","text":"Distributed under an MIT license.\n\nCopyright (c) 2019-2023 [[Mohammad Rahmani|https://github.com/kookma]]\n\n<<<\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n<<<"},"$:/plugins/kookma/trashbin/macros/bulk-operation":{"title":"$:/plugins/kookma/trashbin/macros/bulk-operation","type":"text/vnd.tiddlywiki","text":"\\define delete-trashed-tiddlers()\n<$list filter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]]\" variable=\"Item\">\n<$action-deletetiddler $tiddler=<> />\n\n\\end\n\n\\define trashbin-empty-bin()\n<$macrocall $name=\"trashbin-confirm-delete\"\nbtnLabel=\"Empty Trashbin\"\ncountFilter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]]\"\nactionMacro=<>\nstateTiddler=\"$:/state/trashbin/emptyTrashBin\"\n/>\n\\end\n\n\\define restore-all()\n<$button tooltip=\"Restore all\" class=\"tc-btn-invisible tc-tiddlylink\"> {{$:/plugins/kookma/trashbin/images/recycle}}\n<$list filter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]sort[]]\" variable=\"Item\">\n<$macrocall $name=\"restore\" tiddler=<> />\n\n\n\\end"},"$:/plugins/kookma/trashbin/macros/confirm-empty":{"title":"$:/plugins/kookma/trashbin/macros/confirm-empty","type":"text/vnd.tiddlywiki","text":"\\define trashbin-confirm-delete(\nbtnLabel:\"Delete these tiddlers\", \nconfirmMessage:\"Are you sure you wish to delete\", \nstateTiddler:\"\", \ncountFilter:\"\", \nactionMacro:\"\")\n\n<$button class=\"tc-btn-invisible tc-tiddlylink\" tooltip=\"Empty Trashbin\" popup=<> > {{$:/core/images/delete-button}}\n\n\n<$reveal state=<> type=\"popup\" position=\"belowleft\" animate=\"yes\">\n
\n
\n
\n<$set name=\"resultCount\" value=\"\"\"<$count filter=<<__countFilter__>> />\"\"\">\n$confirmMessage$ <> tiddler(s)?\n\n
\n
\n<$button class=\"tc-btn-invisible tc-tiddlylink\" tooltip=\"Empty archive\"\nactions=<<__actionMacro__>> > \n{{$:/core/images/delete-button}} Delete all?\n\n
\n
\n
\n\n\\end"},"$:/plugins/kookma/trashbin/macros/move-to-trashbin":{"title":"$:/plugins/kookma/trashbin/macros/move-to-trashbin","type":"text/vnd.tiddlywiki","text":"\\define trashTidName() <>\n\n\\define move-to-trashbin(tiddler)\n<$list filter=\"[<__tiddler__>has[title]]\" variable=ignore> \n<$vars trashTiddler={{{ [<__tiddler__>addprefix[$:/trashbin/]] }}}>\n<$wikify name=\"trashTid\" text=<> >\n<$list filter=\"[<__tiddler__>fields[]]\" variable=\"fieldName\">\n<$action-setfield \n $tiddler=<>\n $index=<>\n $value={{{[<__tiddler__>get] }}}\n/>\n\n<$action-setfield $tiddler=<> tags=\"$:/tags/trashbin\"/>\n\n<$action-sendmessage $message=\"tm-close-tiddler\" $param=<<__tiddler__>> />\n<$list filter=\"[<__tiddler__>has[draft.of]]\" variable=ignore emptyMessage=\"\"\"<$action-deletetiddler $tiddler=<<__tiddler__>> />\"\"\">\n<$action-deletetiddler $tiddler={{{[<__tiddler__>get[draft.of]]}}} />\n<$action-deletetiddler $tiddler=<<__tiddler__>> /> \n\n\n\n\\end\n"},"$:/plugins/kookma/trashbin/macros/preview-option":{"title":"$:/plugins/kookma/trashbin/macros/preview-option","type":"text/vnd.tiddlywiki","text":"\\define viewTemplateTid() $:/plugins/kookma/trashbin/viewtemplate/trash-item\n\\define styleTid() $:/plugins/kookma/trashbin/styles/show-trashed\n\n\\define preview-option()\n<$reveal type=\"nomatch\" stateTitle=<> stateField=\"tags\" text=\"$:/tags/ViewTemplate\" default=\"\">\n<$button setTitle=<> setField=\"tags\" setTo=\"$:/tags/ViewTemplate\" class=\"tc-btn-invisible\" tooltip=\"Show trash item preview\"> \n{{$:/core/images/preview-open}}\n<$action-setfield $tiddler=<> tags=\"$:/tags/Stylesheet\"/> \n\n\n<$reveal type=\"match\" stateTitle=<> stateField=\"tags\" text=\"$:/tags/ViewTemplate\" default=\"\">\n<$button setTitle=<> setField=\"tags\" setTo=\"\" class=\"tc-btn-invisible\" tooltip=\"Hide trash item preview\"> \n{{$:/core/images/preview-closed}}\n<$action-setfield $tiddler=<> tags=\"\"/> \n\n\n\\end\n\n<>"},"$:/plugins/kookma/trashbin/macros/restore":{"title":"$:/plugins/kookma/trashbin/macros/restore","type":"text/vnd.tiddlywiki","text":"\\define open-restoredTid-in-story-river()\n<$action-listops $tiddler=\"$:/StoryList\" $field='list' $subfilter=\"\"\"[[$(restoredTid)$]]+[putfirst[]]\"\"\"/>\n\\end\n\n\\define restoreTid(tiddler)\n<$list filter=\"[<__tiddler__>indexes[]] -title\" variable=\"fieldName\">\n <$action-setfield \n $tiddler=<> \n\t $field=<> \n\t $value={{{ [<__tiddler__>getindex] }}} \n />\n\n<$action-sendmessage $message=\"tm-close-tiddler\" $param=<<__tiddler__>> />\n<$action-deletetiddler $tiddler=<<__tiddler__>> />\n<$macrocall $name=\"open-restoredTid-in-story-river\" />\n\\end\n\n\n\\define restore(tiddler)\n<$vars \n restoredTid={{{ [<__tiddler__>getindex[title]] }}} \n isExisted= {{{ [<__tiddler__>getindex[title]has[title]] }}} \n >\n<$reveal type=\"nomatch\" text=<> default=<> >\n<$macrocall $name=\"restoreTid\" tiddler=<<__tiddler__>> />\n\n\n<$reveal type=\"match\" text=<> default=<> >\n <$action-sendmessage $message=\"tm-notify\" \n $param=\"$:/plugins/kookma/trashbin/restore-notification\" \n\t restoredTiddler=<>\n\t/>\n\n\n\n\\end"},"$:/plugins/kookma/trashbin/macros/sort":{"title":"$:/plugins/kookma/trashbin/macros/sort","type":"text/vnd.tiddlywiki","text":"\\define tempSortTid() $:/keepstate/trashbin/sort\n\n\\define show-icons()\n<$vars state-alpha-down=\"sortan[title]\" state-alpha-up=\"!sortan[title]\"\n state-numeric-down=\"sort[modified]\" state-numeric-up=\"!sort[modified]\" >\n<$list filter=\"[get[text]match]\">\n{{$:/plugins/kookma/trashbin/images/sort-alpha-down}}\n\n<$list filter=\"[get[text]match]\">\n{{$:/plugins/kookma/trashbin/images/sort-alpha-up}}\n\n<$list filter=\"[get[text]match]\">\n{{$:/plugins/kookma/trashbin/images/sort-numeric-down}}\n\n<$list filter=\"[get[text]match]\">\n{{$:/plugins/kookma/trashbin/images/sort-numeric-up}}\n\n<$list filter=\"[!has[title]]\">\nClick to sort\n\n\n\\end\n\n\n\\define trashbin-cycle(arraySet:\"\", stateTiddler:\"\", stateField:\"text\")\n<$vars array=<<__arraySet__>> currentItem={{{[<__stateTiddler__>get<__stateField__>]}}} \n tooltip={{{[get[text]]}}} >\n <$button tooltip=<> class=\"tc-btn-invisible\"> <>\n <$set\n filter='[enlistafter]'\n name=NextItem\n emptyValue={{{[enlistfirst[]]}}}\n >\n <$action-setfield\n $tiddler=<<__stateTiddler__>>\n $field=<<__stateField__>>\n $value=<> />\n \n \n\t\n\\end\n\n\\define sort-by()\n<$macrocall $name=\"trashbin-cycle\" \n arraySet=\"sortan[title] !sortan[title] sort[modified] !sort[modified]\" \n stateTiddler=<> />\n\\end"},"$:/plugins/kookma/trashbin/plugin.info":{"title":"$:/plugins/kookma/trashbin/plugin.info","type":"application/json","text":"{\n \"title\": \"$:/plugins/kookma/trashbin\",\n \"version\": \"1.3.5\",\n \"stability\": \"STABILITY_2_STABLE\",\n \"name\": \"Trashbin\",\n \"description\": \"A trashbin mechanism for Tiddlywiki\",\n \"author\": \"Mohammad Rahmani\",\n \"source\": \"https://github.com/kookma/TW-Trashbin\",\n \"list\": \"readme license history\",\n \"plugin-priority\": \"\",\n \"parent-plugin\": \"\",\n \"dependents\": \"\",\n \"plugin-type\": \"plugin\",\n \"core-version\": \">= 5.1.22\",\n \"packaged-by\": \"Gatha on 16th February 2025, 23:38:32\"\n}"},"$:/plugins/kookma/trashbin/readme":{"title":"$:/plugins/kookma/trashbin/readme","type":"text/vnd.tiddlywiki","text":"; Trashbin\nThe concept behind Trashbin plugin is to have a simple mechanism to move deleted tiddlers to Trashbin and be able to restore them later if required.\n\n; Code and demo\nFor learning plugin features, mechanism, terminology, syntax, tutorial and examples see the plugin demo and code pages\n\n* Demo: https://kookma.github.io/TW-Trashbin/\n* Code: https://github.com/kookma/TW-Trashbin\n"},"$:/plugins/kookma/trashbin/restore-notification":{"title":"$:/plugins/kookma/trashbin/restore-notification","type":"text/vnd.tiddlywiki","text":"{{$:/plugins/kookma/trashbin/images/recycle}} \n\n''Warning''
\nThe target tiddler <$text text=<>/> already exists.
\nIt cannot be overwritten!"},"$:/plugins/kookma/trashbin/sidebar-tab":{"title":"$:/plugins/kookma/trashbin/sidebar-tab","caption":"Trashbin","list-after":"","tags":"$:/tags/SideBar","type":"text/vnd.tiddlywiki","text":"{{$:/plugins/kookma/trashbin/ui/sidebar}}"},"$:/plugins/kookma/trashbin/styles/main.css":{"title":"$:/plugins/kookma/trashbin/styles/main.css","tags":"$:/tags/Stylesheet","type":"text/vnd.tiddlywiki","text":"/* trashbin main ui */\n.kk-trashbin-ui{\n\tmin-width:320px; /* controls the minimum width of whole ui */\n}\n\n.kk-trahbin-ui svg{\n fill:#aaaaaa;\n}\n\n.kk-trahbin-ui .kk-trahbin-ui-controls svg{\n width:1.2em;\n height:1.2em;\t\n}\n\n\n/* trashbin items list ui */\n.kk-trashbin-row{\n\tdisplay: flex;\t\n\twidth: 95%;\n\tflex-wrap: wrap;\n}\n\n.kk-trashbin-controls-row{\n\tmargin-bottom: 10px;\n}\n\n.kk-trashbin-row .kk-trashbin-delete,\n.kk-trashbin-row .kk-trashbin-restore {\n\tflex-grow:0; width:20px;\n\tmargin-left:5px;\n}\n\n.kk-trashbin-row .kk-trashbin-link{\n\tflex-grow:1; \n\twidth: calc(100% - 50px); \n\tpadding-right: 10px;\n}\n\n/* old: .kk-trashbin-row:hover { background-color: #f6f6f6; } */\n.kk-trashbin-row:hover { background-color: <>; }\n\n/* UI button fade-in*/\n.kk-trahbin-ui button:hover svg { fill: #000000; }\n.kk-trahbin-ui .kk-trashbin-ui-btn { opacity:0.5; }\n.kk-trahbin-ui .kk-trashbin-ui-btn:hover { opacity:1.0; }\n\n\n"},"$:/plugins/kookma/trashbin/styles/show-trashed":{"title":"$:/plugins/kookma/trashbin/styles/show-trashed","tags":"","type":"text/vnd.tiddlywiki","text":"[data-tags~=\"$:/tags/trashbin\"] .tc-tiddler-body,\n[data-tags~=\"$:/tags/trashbin\"] .tc-tags-wrapper\n{\n display:none;\n}\n"},"$:/plugins/kookma/trashbin/styles/toolbar-buttons":{"title":"$:/plugins/kookma/trashbin/styles/toolbar-buttons","text":"html body.tc-body .tc-tiddler-controls .tc-image-trash-alt {stroke: white;fill:#660000;}\nhtml body.tc-body .tc-tiddler-controls .tc-image-recycle {stroke: white;fill:#138808;}","type":"text/css"},"$:/plugins/kookma/trashbin/styles/trashed-item":{"title":"$:/plugins/kookma/trashbin/styles/trashed-item","text":"/* set style for trashed tiddlers */\n[data-tags ~=\"$:/tags/trashbin\"] { border: 1px solid crimson; }","tags":"$:/tags/Stylesheet","type":"text/css"},"$:/plugins/kookma/trashbin/templates/body":{"title":"$:/plugins/kookma/trashbin/templates/body","type":"text/vnd.tiddlywiki","text":"\\define show-plain() \n
\n
<$transclude index=\"text\" mode=\"block\"/>
\n
\n\\end\n\n\\define show() \n
\n<$transclude index=\"text\" mode=\"block\"/>\n
\n\\end\n\n\n\n<$list filter=\"[getindex[type]match[application/json]]\" variable=ignore>\n<$list filter=\"[getindex[plugin-type]]\" variable=ignore emptyMessage=<> >\n
\nThis tiddler contains plugin!\n
\n\n\n\n<$list filter=\"[getindex[type]match[application/x-tiddler-dictionary]]\n[getindex[type]match[text/plain]]\n[getindex[type]match[text/css]]\" variable=ignore>\n<>\n\n\n\n\n<$list filter=\"[getindex[type]]\" variable=type emptyMessage=<> >\n<$list filter=\"[match[text/vnd.tiddlywiki]]\" variable=ignore>\n<$transclude index=\"text\" mode=\"block\"/>\n\n<$list filter=\"[search:title[image]]\" variable=ignore>\n
\nThis tiddler contains image data!\n
\n\n"},"$:/plugins/kookma/trashbin/templates/subtitle":{"title":"$:/plugins/kookma/trashbin/templates/subtitle","type":"text/vnd.tiddlywiki","text":"
\n<$link to={{##modifier}}>\n<$view index=\"modifier\"/>\n <$view index=\"modified\" format=\"date\" template={{$:/language/Tiddler/DateFormat}}/>\n
"},"$:/plugins/kookma/trashbin/templates/tags":{"title":"$:/plugins/kookma/trashbin/templates/tags","type":"text/vnd.tiddlywiki","text":"
\n<$vars tagsIndex={{{[getindex[tags]]}}}>\n<$list filter=\"[enlist]\" template=\"$:/core/ui/TagTemplate\" storyview=\"pop\"/>\n\n
"},"$:/plugins/kookma/trashbin/templates/title":{"title":"$:/plugins/kookma/trashbin/templates/title","type":"text/vnd.tiddlywiki","text":"\\define title-styles()\nfill:$(foregroundColor)$;\n\\end\n
\n
\n<$set name=\"tv-wikilinks\" value={{$:/config/Tiddlers/TitleLinks}}>\n<$link>\n<$set name=\"foregroundColor\" value={{##color}}>\n>>\n<$transclude tiddler={{##icon}}>\n<$transclude tiddler={{$:/config/DefaultTiddlerIcon}}/>\n\n\n\n<$list filter=\"[{##title}removeprefix[$:/]]\">\n

\n$:/<$text text=<>/>\n

\n\n<$list filter=\"[{##title}!prefix[$:/]]\">\n

\n<$view field=\"title\"/>\n

\n\n\n\n
"},"$:/plugins/kookma/trashbin/ui/sidebar":{"title":"$:/plugins/kookma/trashbin/ui/sidebar","type":"text/vnd.tiddlywiki","text":"\\import $:/plugins/kookma/trashbin/macros/sort\n\\import $:/plugins/kookma/trashbin/macros/restore\n\\import $:/plugins/kookma/trashbin/macros/confirm-empty\n\\import $:/plugins/kookma/trashbin/macros/bulk-operation\n\\import $:/plugins/kookma/trashbin/macros/preview-option\n\n\\define show-link()\n<$link to=<> ><$text text={{{ [removeprefix[$:/trashbin/]] }}} />  <$view field=\"modified\" format=\"date\" template=\"0MM/0DD/YYYY 0hh:0mm AM\"/>\n\\end\n\n\\define recycle-button()\n{{||$:/plugins/kookma/trashbin/ui/toolbar-button}}\n\\end\n\n\\define delete-button()\n<$button class=\"tc-btn-invisible\" tooltip=\"Delete permanently\">\n{{$:/plugins/kookma/trashbin/images/times.svg}}\n<$list filter=\"[list[$:/StoryList]] +[field:title>]\" variable=ignore>\n<$action-sendmessage $message=\"tm-close-tiddler\" $param=<<> />\n\n<$action-deletetiddler $tiddler=<> />\n\n\\end\n\n\\define trashbin-siderbar-ui()\n
\n
\n\t\n\t<> <> <> <>\n\t \n\t\n\t<$list filter='[tag[$:/tags/trashbin]prefix[$:/trashbin/]limit[1]]' variable=null emptyMessage=\"Trash bin is empty\">\n\t<$count filter='[tag[$:/tags/trashbin]]'/> items in Trashbin\n\t\n\t\n
\n\n\n<$list filter=\"[tag[$:/tags/trashbin]prefix[$:/trashbin/]$(sortType)$]\">\n
\n\t
<>
\n\t
<>
\n\t
<>
\n
\n\n
\n\\end\n\n<$vars sortType={{{[get[text]] ~[[]] }}}>\n<>\n"},"$:/plugins/kookma/trashbin/ui/toolbar-button":{"title":"$:/plugins/kookma/trashbin/ui/toolbar-button","caption":"{{$:/plugins/kookma/trashbin/images/trash-alt}} {{$:/language/Buttons/Trashbin/Caption/Move}}","description":"<$list filter=\"[all[current]tag[$:/tags/trashbin]prefix[$:/trashbin/]]\" emptyMessage={{$:/language/Buttons/Trashbin/Hint/Move}}>{{$:/language/Buttons/Trashbin/Hint/Recycle}}","list-after":"$:/core/ui/Buttons/delete","tags":"$:/tags/ViewToolbar $:/tags/EditToolbar","type":"text/vnd.tiddlywiki","text":"\\import $:/plugins/kookma/trashbin/macros/move-to-trashbin\n\\import $:/plugins/kookma/trashbin/macros/restore\n\\whitespace trim\n\n<$list filter=\"[all[current]!tag[$:/tags/trashbin]!prefix[$:/trashbin/]]\"><$button \n aria-label={{$:/language/Buttons/Trashbin/Caption/Move}}\n tooltip={{$:/language/Buttons/Trashbin/Hint/Move}} class=<> >\n <$macrocall $name=\"move-to-trashbin\" tiddler=<> />\t\n <$list filter=\"[prefix[yes]]\">\n {{$:/plugins/kookma/trashbin/images/trash-alt}}\n <$list filter=\"[prefix[yes]]\">\n \n\t\t  <$text text={{$:/language/Buttons/Trashbin/Caption/Move}}/>\n \n <$list filter=\"[all[current]tag[$:/tags/trashbin]prefix[$:/trashbin/]]\"><$button\n aria-label={{$:/language/Buttons/Trashbin/Caption/Recycle}}\n tooltip={{$:/language/Buttons/Trashbin/Hint/Recycle}} class=<> >\n <$macrocall $name=\"restore\" tiddler=<> />\n <$list filter=\"[prefix[yes]]\">\n {{$:/plugins/kookma/trashbin/images/recycle}}\n <$list filter=\"[prefix[yes]]\">\n  \n <$text text={{$:/language/Buttons/Trashbin/Caption/Recycle}}/>\n \n "},"$:/plugins/kookma/trashbin/viewtemplate/trash-item":{"title":"$:/plugins/kookma/trashbin/viewtemplate/trash-item","tags":"","type":"text/vnd.tiddlywiki","text":"<$list filter=\"[all[current]tag[$:/tags/trashbin]prefix[$:/trashbin/]]\">\n
\n{{||$:/plugins/kookma/trashbin/templates/title}}\n{{||$:/plugins/kookma/trashbin/templates/subtitle}}\n{{||$:/plugins/kookma/trashbin/templates/tags}}\n{{||$:/plugins/kookma/trashbin/templates/body}}\n
\n
\n

Tiddler fields

\n<$list filter=\"[indexes[]] -title -tags -text -created -modified\" variable=idx>\n <$transclude index=<>/>
\n\n
\n\n"},"$:/language/Buttons/Trashbin/Hint/Recycle":{"title":"$:/language/Buttons/Trashbin/Hint/Recycle","tags":"","type":"text/vnd.tiddlywiki","text":"Recycle this tiddler from Trashbin"},"$:/language/Buttons/Trashbin/Hint/Move":{"title":"$:/language/Buttons/Trashbin/Hint/Move","tags":"","type":"text/vnd.tiddlywiki","text":"Move this tiddler to Trashbin"},"$:/language/Buttons/Trashbin/Caption/Recycle":{"title":"$:/language/Buttons/Trashbin/Caption/Recycle","tags":"","type":"text/vnd.tiddlywiki","text":"recycle"},"$:/language/Buttons/Trashbin/Caption/Move":{"title":"$:/language/Buttons/Trashbin/Caption/Move","tags":"","type":"text/vnd.tiddlywiki","text":"trashbin"},"$:/config/EditToolbarButtons/Visibility/$:/core/ui/Buttons/delete":{"title":"$:/config/EditToolbarButtons/Visibility/$:/core/ui/Buttons/delete","type":"text/vnd.tiddlywiki","text":"hide"}}} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kookma/TW-Trashbin/9b191a0835d7e53235c62e8dbbbeb313192341f8/README.md -------------------------------------------------------------------------------- /archive/$__plugins_kookma_trashbin_sidebar-tab.tid: -------------------------------------------------------------------------------- 1 | caption: Trashbin 2 | created: 20190613131234955 3 | creator: HC Haase 4 | modified: 20190918110704098 5 | modifier: HC Haase 6 | tags: $:/tags/MoreSideBar 7 | title: $:/plugins/kookma/trashbin/sidebar-tab 8 | type: text/vnd.tiddlywiki 9 | 10 | \define show-link() 11 | <$link to=<> ><$text text={{{ [removeprefix[$:/trashbin/]] }}} /> 12 | \end 13 | 14 | \define recycle-button() 15 | {{||$:/plugins/kookma/trashbin/viewtoolbar-button}} 16 | \end 17 | 18 | \define delete-button() 19 | <$button class="tc-btn-invisible" tooltip="Delete permanently"> 20 | {{$:/plugins/kookma/trashbin/images/times.svg}} 21 | <$action-deletetiddler $tiddler=<> /> 22 | 23 | \end 24 | 25 |
26 | 27 | 28 | <> <> 29 | 30 | 31 | <$list filter='[tag[$:/tags/trashbin]limit[1]]' variable=null> 32 | <$count filter='[tag[$:/tags/trashbin]]'/> items in trash. 33 | 34 | <$list filter="[tag[$:/tags/trashbin]search:title[$:/trashbin/]sortan[]]" emptyMessage="Trash bin is empty"> 35 |
36 | 37 |
<>
38 |
<>
39 |
40 | 41 | 42 |
43 | -------------------------------------------------------------------------------- /archive/README.md: -------------------------------------------------------------------------------- 1 | # TW-Trashbin 2 | Trash bin tools in Tiddlywiki. Delete tiddlers and restore them easily 3 | 4 | 5 | ## Mechanism 6 | Trash plugin has two parts 7 | 8 | * Move to trash bin 9 | * Restore from trash bin 10 | 11 | ### By moving a tiddler to trash bin it means 12 | 13 | * A new data tiddler created 14 | * The title of data tiddler is the title of objective tiddler prefixed with `$:/trashbin/` 15 | * All the fileds of objective tiddler is moved into a new data tiddler 16 | * The objective tiddler is deleted 17 | 18 | 19 | ### By restoring a tiddler from trash bin, it means 20 | * A new tiddler is created 21 | * Its title is taken from the title index in data tiddler 22 | * All other index/value are copied to newly created tiddler fields respectively. This means every index creates a field 23 | * The data tiddler is deleted 24 | -------------------------------------------------------------------------------- /archive/trashbin-1.0.0.tid: -------------------------------------------------------------------------------- 1 | author: Mohammad Rahmani 2 | core-version: >= 5.1.18 3 | created: 20190710023556241 4 | description: Trashbin 5 | list: readme history customization license 6 | modified: 20190724035859201 7 | plugin-type: plugin 8 | source: https://github.com/kookma/TW-Trashbin 9 | tags: 10 | title: $:/plugins/kookma/trashbin 11 | type: application/json 12 | version: 1.0.0 13 | 14 | {"tiddlers":{"$:/plugins/kookma/trashbin/images/trash-alt":{"title":"$:/plugins/kookma/trashbin/images/trash-alt","caption":"trash-alt (Regular)","created":"20190710102513532","modified":"20190711081546482","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/times.svg":{"title":"$:/plugins/kookma/trashbin/images/times.svg","created":"20190716033811299","modified":"20190723042051695","tags":"","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/images/recycle":{"title":"$:/plugins/kookma/trashbin/images/recycle","created":"20190723043410550","modified":"20190723050442840","tags":"","type":"text/vnd.tiddlywiki","text":""},"$:/plugins/kookma/trashbin/macros/move-to-trashbin":{"title":"$:/plugins/kookma/trashbin/macros/move-to-trashbin","created":"20190710071039480","modified":"20190723061249101","tags":"$:/tags/Macro","type":"text/vnd.tiddlywiki","text":"\\define trashTidName() <>\n\n\\define move-to-trashbin(tiddler)\n<$vars trashTiddler={{{ [<__tiddler__>addprefix[$:/trashbin/]] }}}>\n<$wikify name=\"trashTid\" text=<> >\n<$list filter=\"[<__tiddler__>fields[]]\" variable=\"fieldName\">\n<$action-setfield \n $tiddler=<>\n $index=<>\n $value={{{[<__tiddler__>get] }}}\n/>\n\n<$action-setfield $tiddler=<> tags=\"$:/tags/trashbin\"/>\n\n<$action-sendmessage $message=\"tm-close-tiddler\" $param=<<__tiddler__>> />\n<$action-deletetiddler $tiddler=<<__tiddler__>> />\n\n\\end\n"},"$:/plugins/kookma/trashbin/macros/restore":{"title":"$:/plugins/kookma/trashbin/macros/restore","created":"20190710105439064","modified":"20190723141729655","tags":"$:/tags/Macro","type":"text/vnd.tiddlywiki","text":"\\define restoreTid(tiddler)\n<$list filter=\"[<__tiddler__>indexes[]] -title\" variable=\"fieldName\">\n <$action-setfield \n $tiddler=<> \n\t $field=<> \n\t $value={{{ [<__tiddler__>getindex] }}} \n />\n\n<$action-sendmessage $message=\"tm-close-tiddler\" $param=<<__tiddler__>> />\n<$action-deletetiddler $tiddler=<<__tiddler__>> />\n\\end\n\n\n\\define restore(tiddler)\n<$vars \n restoredTid={{{ [<__tiddler__>getindex[title]] }}} \n isExisted= {{{ [<__tiddler__>getindex[title]has[title]] }}} \n >\n<$reveal type=\"nomatch\" text=<> default=<> >\n<$macrocall $name=\"restoreTid\" tiddler=<<__tiddler__>> />\n\n\n<$reveal type=\"match\" text=<> default=<> >\n <$action-sendmessage $message=\"tm-notify\" \n $param=\"$:/plugins/kookma/trashbin/restore-notification\" \n\t restoredTiddler=<>\n\t/>\n\n\n\n\\end"},"$:/plugins/kookma/trashbin/macros/bulk-operation":{"title":"$:/plugins/kookma/trashbin/macros/bulk-operation","created":"20190723115934925","modified":"20190724052253496","tags":"$:/tags/Macro","type":"text/vnd.tiddlywiki","text":"\\define delete-trashed-tiddlers()\n<$list filter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]]\" variable=\"Item\">\n<$action-deletetiddler $tiddler=<> />\n\n\\end\n\n\\define trashbin-empty-bin()\n<$macrocall $name=\"trashbin-confirm-delete\"\nbtnLabel=\"Empty Trashbin\"\ncountFilter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]]\"\nactionMacro=<>\nstateTiddler=\"$:/state/trashbin/emptyTrashBin\"\n/>\n\\end\n\n\\define restore-all()\n<$button tooltip=\"Restore all\" class=\"tc-btn-invisible tc-tiddlylink\"> {{$:/plugins/kookma/trashbin/images/recycle}}\n<$list filter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]sort[]]\" variable=\"Item\">\n<$macrocall $name=\"restore\" tiddler=<> />\n\n\n\\end"},"$:/plugins/kookma/trashbin/macros/confirm-empty":{"title":"$:/plugins/kookma/trashbin/macros/confirm-empty","created":"20190723114948285","creator":"Mohammad","modified":"20190724052214146","modifier":"Mohammad","tags":"$:/tags/Macro","type":"text/vnd.tiddlywiki","text":"\\define trashbin-confirm-delete(\nbtnLabel:\"Delete these tiddlers\", \nconfirmMessage:\"Are you sure you wish to delete\", \nstateTiddler:\"\", \ncountFilter:\"\", \nactionMacro:\"\")\n\n<$button class=\"tc-btn-invisible tc-tiddlylink\" tooltip=\"Empty Trashbin\" popup=<> > {{$:/core/images/delete-button}}\n\n\n<$reveal state=<> type=\"popup\" position=\"belowleft\" animate=\"yes\">\n
\n
\n
\n<$set name=\"resultCount\" value=\"\"\"<$count filter=<<__countFilter__>> />\"\"\">\n$confirmMessage$ <> tiddler(s)?\n\n
\n
\n<$button class=\"tc-btn-invisible tc-tiddlylink\" tooltip=\"Empty archive\"\nactions=<<__actionMacro__>> > \n{{$:/core/images/delete-button}} Delete all?\n\n
\n
\n
\n\n\\end"},"$:/plugins/kookma/trashbin/styles/main.css":{"title":"$:/plugins/kookma/trashbin/styles/main.css","created":"20190716040116074","modified":"20190723142907866","tags":"$:/tags/Stylesheet","type":"text/css","text":"/* trashbin main ui */\n.kk-trashbin-ui{\n\tmin-width:320px; /* controls the minimum width of whole ui */\n}\n\n.kk-trahbin-ui svg{\n fill:#aaaaaa;\n}\n\n.kk-trahbin-ui button:hover svg {\n fill: #000000; \n}\n\n.kk-trahbin-ui .kk-trahbin-ui-controls svg{\n width:1.2em;\n height:1.2em;\t\n}\n\n/* trashbin items ui */\n.kk-trashbin-row{\n\tdisplay: flex;\t\n\twidth: 95%;\n\tflex-wrap: wrap;\n}\n\n.kk-trashbin-row .kk-trashbin-delete,\n.kk-trashbin-row .kk-trashbin-restore {\n\tflex-grow:0; width:20px;\n\tmargin-left:5px;\n}\n\n.kk-trashbin-row .kk-trashbin-link{\n\tflex-grow:1; \n\twidth: calc(100% - 50px); \n\tpadding-right: 10px;\n}\n\n.kk-trashbin-row:hover {\n\tbackground-color: #f6f6f6;\n}\n\n/* set border for trashed tiddlers */\n[data-tags ~=\"$:/tags/trashbin\"] { border: 1px solid crimson; }"},"$:/plugins/kookma/trashbin/history":{"title":"$:/plugins/kookma/trashbin/history","created":"20190710025344738","modified":"20190724040554123","tags":"","type":"text/vnd.tiddlywiki","text":"* ''1.0.0'' -- final release\n<<<\n# [NEW] restore all button has been added\n# [NEW] delete button has been added for each tiddler in trashbin\n# [NEW] the tag for tiddlers moved to trashbin is `$:/tags/trashbin`\n# [NEW] tiddlers in trashbin have a pink boredr\n# [NEW] delete and restore all buttons have icons\n# [NEW] restoring tiddlers with repeated titles (have the same title) is based on their real title not incremented ones in trashbin\n# [FIXED] the colors of move to trash bin and restore have been set consistent with tiddler controls\n# [FIXED] documentation improved\n<<<\n\n* ''0.6.0'' -- release candidate\n<<<\n# [FIXED] the position of button on toolbar fixed using the list-after field\n# [FIXED] documentation improved\n<<<\n\n* ''0.5.0 beta'' -- optimized release\n<<<\n# [NEW] restore button in fronts of each trashed tiddler in Trash Bin sidebar tab\n# [NEW] prevent overwriting existing tiddlers when restoring from trash bin\n# [NEW] move to trash bin check for duplicate tiddlers in trash bin and prevent overwriting by making it unique with a numeric suffix \n<<<\n\n* ''0.1.0 beta'' -- initial release.\n<<<\n# Basics\n# Simple delete and restore\n<<<"},"$:/plugins/kookma/trashbin/license":{"title":"$:/plugins/kookma/trashbin/license","created":"20190710025344739","modified":"20190711081546473","tags":"","type":"text/vnd.tiddlywiki","text":"Distributed under an MIT license.\n\nCopyright (c) 2018-2019 [[Mohammad Rahmani|https://github.com/kookma]]\n\n<<<\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n<<<\n"},"$:/plugins/kookma/trashbin/readme":{"title":"$:/plugins/kookma/trashbin/readme","created":"20190710025344739","creator":"Mohammad","modified":"20190724045749200","modifier":"Mohammad","tags":"","type":"text/vnd.tiddlywiki","text":"The concept behind trash plugin is to have a simple mechanism to move tiddlers to Trashbin and be able to restore them later if required.\n\n!! Terminology\n<<<\n; Trashbin\n: i. a collection of data tiddlers holds the deleted tiddlers\n: ii. the name of plugin and the mechanism to delete tiddlers temporarily and restore them or delete them permanently later\n\n; Delete tiddler\n: the action to //move a tiddler to Trashbin//. This action removes tiddler from wiki, but it does not eliminate it permanently.\n\n; Deleted tiddler\n: a tiddler is removed from wiki and stored in Trashbin. This tiddler can be restored.\n\n; Delete permanently\n:the action to eliminate and destroy a tiddler such that it cannot be restored anymore. This action is performed on deleted tiddlers in Trashbin.\n<<<\n\n!! How to\n<<<\n* Every tiddler has a new button as <> and is called ''Move to Trashbin''\n\n* On clicking on ''Move to Trashbin'' the tiddler is deleted from wiki and moved to Trashbin (//it is not removed permanently//)\n\n* A sidebar tab called ''Trashbin'' shows what is existed in the Trashbin\n\n* In sidebar tab ''Trashbin'' there is //header// and a //list// of deleted tiddlers\n** Deleted tiddlers in Trashbin list are displayed in alphanumerical order.\n** Each tiddler in Trashbin list has a ''delete permanently'' button <> and a ''restore'' button <> individually and let you to remove or restore a single tiddler.\n** In the header, the <> lets you to remove all tiddlers from Trashbin and ''delete them permanently''.\n** In the header, the <> lets you to ''restore all'' tiddlers from Trashbin.\n\n* On clicking on every tiddler in Trashbin list it is opened in story river.\n\n* Every deleted tiddler opened in story river has colored borders, a restore button as <> which is called ''Restore''\n\n* On clicking on ''restore'' button <> the tiddler is restored.\n\n* It is possible to edit the deleted tiddler, for example change `title` or other fields (indexes) and restore a modified tiddler different from the original deleted one.\n<<<\n\n!! Impotent note\n<<<\nIf a tiddler is existed in Trashbin and another with the same title in TW:\n\n* when moving it to trash, a unique title is created by adding //numeric suffix//, so they never overwrite other tiddlers.\n\n* when restoring from Trashbin, a notification is appeared and notifies user and does not restore such tiddler. User needs to decide and rename the existing tiddler or modify the deleted tiddler title index in Trashbin before restoring.\n\n* Note that Trashbon title for deleting tiddlers (actually data tiddlers) does not change the real title of tiddlers which is stored in an index called `title`.\n<<<\n\n!! Install\n<<<\nSimply drag and drop $:/plugins/kookma/trashbin into your wiki, or download from [[source page|https://github.com/kookma/TW-Trashbin]]\n<<<\n\n!! Mechanism\n<<<\nTrash plugin has two parts\n\n* Move to Trashbin\n* Restore from Trashbin\n\n; By moving a tiddler to Trashbin it means\n\n# A new data tiddler created\n# The title of data tiddler is the title of objective tiddler prefixed with `$:/trashbin/`\n# All the fields of objective tiddler is moved into a new data tiddler\n# The objective tiddler is deleted\n\n\n; By restoring a tiddler from Trashbin, it means\n# A new tiddler is created\n# Its title is taken from the `title` index in data tiddler\n# All other index/value are copied to newly created tiddler fields respectively. This means every index creates a field\n# The data tiddler is deleted\n\n;Duplicates\n# Deleted tiddlers will get numeric suffix if another tiddler with same title is existed in Trashbin.\n# Tiddlers existed in wiki will never overwritten if a tiddler with the same title is tried to be restored. A notification will notify user and operation will be cancelled.\n# Note that, the real title of deleted tiddler is what stored in `title` index of data tiddler NOT the title of data tiddler itself which stores the deleted tiddler in Trashbin.\n<<<\n\n!! Project code and demo\n<<<\n* [[GitHub demo page|https://github.com/kookma/TW-Trashbin]]\n* [[GitHub code page|https://github.com/kookma/TW-Trashbin]]\n<<<"},"$:/plugins/kookma/trashbin/restore-notification":{"title":"$:/plugins/kookma/trashbin/restore-notification","created":"20190711130503628","modified":"20190723112206209","tags":"","type":"text/vnd.tiddlywiki","text":"{{$:/plugins/kookma/trashbin/images/recycle}} \n\n''Warning''
\nThe target tiddler <$text text=<>/> already exists.
\nIt cannot be overwritten!"},"$:/plugins/kookma/trashbin/sidebar-tab":{"title":"$:/plugins/kookma/trashbin/sidebar-tab","caption":"Trashbin","created":"20190613131234955","modified":"20190724052350143","tags":"$:/tags/SideBar","type":"text/vnd.tiddlywiki","text":"\\define show-link()\n<$link to=<> ><$text text={{{ [removeprefix[$:/trashbin/]] }}} /> \n\\end\n\n\\define recycle-button()\n{{||$:/plugins/kookma/trashbin/viewtoolbar-button}}\n\\end\n\n\\define delete-button()\n<$button class=\"tc-btn-invisible\" tooltip=\"Delete permanently\">\n{{$:/plugins/kookma/trashbin/images/times.svg}}\n<$action-deletetiddler $tiddler=<> />\n\n\\end\n\n
\n\n\n<> <>\n\n\n<$list filter=\"[tag[$:/tags/trashbin]search:title[$:/trashbin/]sortan[]]\" emptyMessage=\"Trash bin is empty\">\n
\n\t
<>
\n\t
<>
\n\t
<>
\n
\n\n\n
"},"$:/plugins/kookma/trashbin/viewtoolbar-button":{"title":"$:/plugins/kookma/trashbin/viewtoolbar-button","caption":"Trashbin","created":"20190623140751496","creator":"Mohammad","description":"move to trashbin / restore from trashbin","list-after":"$:/core/ui/Buttons/close-others","modified":"20190723061334812","modifier":"Mohammad","tags":"$:/tags/ViewToolbar","type":"text/vnd.tiddlywiki","text":"\\whitespace trim\n<$list filter=\"[all[current]!tag[$:/tags/trashbin]!search:title[$:/trashbin/]]\">\n<$button aria-label=\"to be added\" \n class=<>\n tooltip=\"Move to Trashbin\" >\n <$macrocall \n $name=\"move-to-trashbin\" \n\t tiddler=<>\n />\n\t\n<$list filter=\"[prefix[yes]]\">\n{{$:/plugins/kookma/trashbin/images/trash-alt}}\n\n<$list filter=\"[prefix[yes]]\">\n\n<$text text={{$:/plugins/kookma/trashbin/viewtoolbar-button!!caption}}/>\n\n\n\n\t\n\n\n<$list filter=\"[all[current]tag[$:/tags/trashbin]search:title[$:/trashbin/]]\">\n<$button aria-label=\"to be added\" \n class=<>\n tooltip=\"Restore\" >\n {{$:/plugins/kookma/trashbin/images/recycle}}\n <$macrocall \n $name=\"restore\" \n\t tiddler=<>\n />\n\n"},"$:/plugins/kookma/trashbin/customization":{"title":"$:/plugins/kookma/trashbin/customization","created":"20190723134934716","modified":"20190723135307162","tags":"","type":"text/vnd.tiddlywiki","text":"; Colorify button on tiddler toolbar\n: Create a tiddler and tag it with `$:/tags/Stylesheet` with below contents\n
\n\n```\nhtml body.tc-body .tc-tiddler-controls .tc-image-trash-alt {stroke: white;fill:#660000;}\nhtml body.tc-body .tc-tiddler-controls .tc-image-recycle {stroke: white;fill:#138808;}\n```\n
"}}} -------------------------------------------------------------------------------- /source/trashbin/extra/system/config/EditToolbarButtons/Visibility/system/core/ui/Buttons/delete.tid: -------------------------------------------------------------------------------- 1 | title: $:/config/EditToolbarButtons/Visibility/$:/core/ui/Buttons/delete 2 | type: text/vnd.tiddlywiki 3 | 4 | hide -------------------------------------------------------------------------------- /source/trashbin/extra/system/language/Buttons/Trashbin/Caption/Move.tid: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/language/Buttons/Trashbin/Caption/Move 3 | type: text/vnd.tiddlywiki 4 | 5 | trashbin -------------------------------------------------------------------------------- /source/trashbin/extra/system/language/Buttons/Trashbin/Caption/Recycle.tid: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/language/Buttons/Trashbin/Caption/Recycle 3 | type: text/vnd.tiddlywiki 4 | 5 | recycle -------------------------------------------------------------------------------- /source/trashbin/extra/system/language/Buttons/Trashbin/Hint/Move.tid: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/language/Buttons/Trashbin/Hint/Move 3 | type: text/vnd.tiddlywiki 4 | 5 | Move this tiddler to Trashbin -------------------------------------------------------------------------------- /source/trashbin/extra/system/language/Buttons/Trashbin/Hint/Recycle.tid: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/language/Buttons/Trashbin/Hint/Recycle 3 | type: text/vnd.tiddlywiki 4 | 5 | Recycle this tiddler from Trashbin -------------------------------------------------------------------------------- /source/trashbin/history.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/history 2 | type: text/vnd.tiddlywiki 3 | 4 | Full change log https://kookma.github.io/TW-Trashbin/#ChangeLog 5 | 6 | * ''1.3.5'' -- 2024.05.17 -- update to TW 5.3.6 and some bug fixes 7 | * ''1.3.3'' -- 2024.05.17 -- update to TW 5.3.3 and some bug fixes 8 | * ''1.2.4'' -- 2022.12.02 -- update to TW 5.2.3 and minor bug fixes 9 | * ''1.2.3'' -- 2022.01.11 -- update to TW 5.2.1 10 | * ''1.2.2'' -- 2020.04.10 -- bug fix in remove draft tiddlers to trashbin 11 | * ''1.2.1'' -- 2020.03.30 -- bug fix and doc improvement and UI fade correction 12 | * ''1.1.2'' -- 2020.03.28 -- stable release with new features and bug fixes 13 | * ''0.1.0'' -- 2019.02.12 -- mature public release 14 | -------------------------------------------------------------------------------- /source/trashbin/icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/trashbin/icon.svg.meta: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/plugins/kookma/trashbin/icon 3 | type: image/svg+xml -------------------------------------------------------------------------------- /source/trashbin/images/recycle.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/images/recycle 2 | type: text/vnd.tiddlywiki 3 | 4 | -------------------------------------------------------------------------------- /source/trashbin/images/sort-alpha-down.tid: -------------------------------------------------------------------------------- 1 | caption: sort-alpha-down 2 | tags: $:/tags/Image 3 | title: $:/plugins/kookma/trashbin/images/sort-alpha-down 4 | type: text/vnd.tiddlywiki 5 | 6 | -------------------------------------------------------------------------------- /source/trashbin/images/sort-alpha-up.tid: -------------------------------------------------------------------------------- 1 | caption: sort-alpha-up (Solid) 2 | tags: $:/tags/Image 3 | title: $:/plugins/kookma/trashbin/images/sort-alpha-up 4 | type: text/vnd.tiddlywiki 5 | 6 | -------------------------------------------------------------------------------- /source/trashbin/images/sort-numeric-down.tid: -------------------------------------------------------------------------------- 1 | caption: sort-numeric-down 2 | tags: $:/tags/Image 3 | title: $:/plugins/kookma/trashbin/images/sort-numeric-down 4 | type: text/vnd.tiddlywiki 5 | 6 | -------------------------------------------------------------------------------- /source/trashbin/images/sort-numeric-up.tid: -------------------------------------------------------------------------------- 1 | caption: sort-numeric-up (Solid) 2 | tags: $:/tags/Image 3 | title: $:/plugins/kookma/trashbin/images/sort-numeric-up 4 | type: text/vnd.tiddlywiki 5 | 6 | -------------------------------------------------------------------------------- /source/trashbin/images/times.svg.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/images/times.svg 2 | type: text/vnd.tiddlywiki 3 | 4 | -------------------------------------------------------------------------------- /source/trashbin/images/trash-alt.tid: -------------------------------------------------------------------------------- 1 | caption: trash-alt 2 | title: $:/plugins/kookma/trashbin/images/trash-alt 3 | type: text/vnd.tiddlywiki 4 | 5 | -------------------------------------------------------------------------------- /source/trashbin/license.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/license 2 | type: text/vnd.tiddlywiki 3 | 4 | Distributed under an MIT license. 5 | 6 | Copyright (c) 2019-2023 [[Mohammad Rahmani|https://github.com/kookma]] 7 | 8 | <<< 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | <<< -------------------------------------------------------------------------------- /source/trashbin/macros/bulk-operation.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/macros/bulk-operation 2 | type: text/vnd.tiddlywiki 3 | 4 | \define delete-trashed-tiddlers() 5 | <$list filter="[tag[$:/tags/trashbin]search:title[$:/trashbin/]]" variable="Item"> 6 | <$action-deletetiddler $tiddler=<> /> 7 | 8 | \end 9 | 10 | \define trashbin-empty-bin() 11 | <$macrocall $name="trashbin-confirm-delete" 12 | btnLabel="Empty Trashbin" 13 | countFilter="[tag[$:/tags/trashbin]search:title[$:/trashbin/]]" 14 | actionMacro=<> 15 | stateTiddler="$:/state/trashbin/emptyTrashBin" 16 | /> 17 | \end 18 | 19 | \define restore-all() 20 | <$button tooltip="Restore all" class="tc-btn-invisible tc-tiddlylink"> {{$:/plugins/kookma/trashbin/images/recycle}} 21 | <$list filter="[tag[$:/tags/trashbin]search:title[$:/trashbin/]sort[]]" variable="Item"> 22 | <$macrocall $name="restore" tiddler=<> /> 23 | 24 | 25 | \end -------------------------------------------------------------------------------- /source/trashbin/macros/confirm-empty.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/macros/confirm-empty 2 | type: text/vnd.tiddlywiki 3 | 4 | \define trashbin-confirm-delete( 5 | btnLabel:"Delete these tiddlers", 6 | confirmMessage:"Are you sure you wish to delete", 7 | stateTiddler:"", 8 | countFilter:"", 9 | actionMacro:"") 10 | 11 | <$button class="tc-btn-invisible tc-tiddlylink" tooltip="Empty Trashbin" popup=<> > {{$:/core/images/delete-button}} 12 | 13 | 14 | <$reveal state=<> type="popup" position="belowleft" animate="yes"> 15 |
16 |
17 |
18 | <$set name="resultCount" value="""<$count filter=<<__countFilter__>> />"""> 19 | $confirmMessage$ <> tiddler(s)? 20 | 21 |
22 |
23 | <$button class="tc-btn-invisible tc-tiddlylink" tooltip="Empty archive" 24 | actions=<<__actionMacro__>> > 25 | {{$:/core/images/delete-button}} Delete all? 26 | 27 |
28 |
29 |
30 | 31 | \end -------------------------------------------------------------------------------- /source/trashbin/macros/move-to-trashbin.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/macros/move-to-trashbin 2 | type: text/vnd.tiddlywiki 3 | 4 | \define trashTidName() <> 5 | 6 | \define move-to-trashbin(tiddler) 7 | <$list filter="[<__tiddler__>has[title]]" variable=ignore> 8 | <$vars trashTiddler={{{ [<__tiddler__>addprefix[$:/trashbin/]] }}}> 9 | <$wikify name="trashTid" text=<> > 10 | <$list filter="[<__tiddler__>fields[]]" variable="fieldName"> 11 | <$action-setfield 12 | $tiddler=<> 13 | $index=<> 14 | $value={{{[<__tiddler__>get] }}} 15 | /> 16 | 17 | <$action-setfield $tiddler=<> tags="$:/tags/trashbin"/> 18 | 19 | <$action-sendmessage $message="tm-close-tiddler" $param=<<__tiddler__>> /> 20 | <$list filter="[<__tiddler__>has[draft.of]]" variable=ignore emptyMessage="""<$action-deletetiddler $tiddler=<<__tiddler__>> />"""> 21 | <$action-deletetiddler $tiddler={{{[<__tiddler__>get[draft.of]]}}} /> 22 | <$action-deletetiddler $tiddler=<<__tiddler__>> /> 23 | 24 | 25 | 26 | \end 27 | -------------------------------------------------------------------------------- /source/trashbin/macros/preview-option.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/macros/preview-option 2 | type: text/vnd.tiddlywiki 3 | 4 | \define viewTemplateTid() $:/plugins/kookma/trashbin/viewtemplate/trash-item 5 | \define styleTid() $:/plugins/kookma/trashbin/styles/show-trashed 6 | 7 | \define preview-option() 8 | <$reveal type="nomatch" stateTitle=<> stateField="tags" text="$:/tags/ViewTemplate" default=""> 9 | <$button setTitle=<> setField="tags" setTo="$:/tags/ViewTemplate" class="tc-btn-invisible" tooltip="Show trash item preview"> 10 | {{$:/core/images/preview-open}} 11 | <$action-setfield $tiddler=<> tags="$:/tags/Stylesheet"/> 12 | 13 | 14 | <$reveal type="match" stateTitle=<> stateField="tags" text="$:/tags/ViewTemplate" default=""> 15 | <$button setTitle=<> setField="tags" setTo="" class="tc-btn-invisible" tooltip="Hide trash item preview"> 16 | {{$:/core/images/preview-closed}} 17 | <$action-setfield $tiddler=<> tags=""/> 18 | 19 | 20 | \end 21 | 22 | <> -------------------------------------------------------------------------------- /source/trashbin/macros/restore.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/macros/restore 2 | type: text/vnd.tiddlywiki 3 | 4 | \define open-restoredTid-in-story-river() 5 | <$action-listops $tiddler="$:/StoryList" $field='list' $subfilter="""[[$(restoredTid)$]]+[putfirst[]]"""/> 6 | \end 7 | 8 | \define restoreTid(tiddler) 9 | <$list filter="[<__tiddler__>indexes[]] -title" variable="fieldName"> 10 | <$action-setfield 11 | $tiddler=<> 12 | $field=<> 13 | $value={{{ [<__tiddler__>getindex] }}} 14 | /> 15 | 16 | <$action-sendmessage $message="tm-close-tiddler" $param=<<__tiddler__>> /> 17 | <$action-deletetiddler $tiddler=<<__tiddler__>> /> 18 | <$macrocall $name="open-restoredTid-in-story-river" /> 19 | \end 20 | 21 | 22 | \define restore(tiddler) 23 | <$vars 24 | restoredTid={{{ [<__tiddler__>getindex[title]] }}} 25 | isExisted= {{{ [<__tiddler__>getindex[title]has[title]] }}} 26 | > 27 | <$reveal type="nomatch" text=<> default=<> > 28 | <$macrocall $name="restoreTid" tiddler=<<__tiddler__>> /> 29 | 30 | 31 | <$reveal type="match" text=<> default=<> > 32 | <$action-sendmessage $message="tm-notify" 33 | $param="$:/plugins/kookma/trashbin/restore-notification" 34 | restoredTiddler=<> 35 | /> 36 | 37 | 38 | 39 | \end -------------------------------------------------------------------------------- /source/trashbin/macros/sort.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/macros/sort 2 | type: text/vnd.tiddlywiki 3 | 4 | \define tempSortTid() $:/keepstate/trashbin/sort 5 | 6 | \define show-icons() 7 | <$vars state-alpha-down="sortan[title]" state-alpha-up="!sortan[title]" 8 | state-numeric-down="sort[modified]" state-numeric-up="!sort[modified]" > 9 | <$list filter="[get[text]match]"> 10 | {{$:/plugins/kookma/trashbin/images/sort-alpha-down}} 11 | 12 | <$list filter="[get[text]match]"> 13 | {{$:/plugins/kookma/trashbin/images/sort-alpha-up}} 14 | 15 | <$list filter="[get[text]match]"> 16 | {{$:/plugins/kookma/trashbin/images/sort-numeric-down}} 17 | 18 | <$list filter="[get[text]match]"> 19 | {{$:/plugins/kookma/trashbin/images/sort-numeric-up}} 20 | 21 | <$list filter="[!has[title]]"> 22 | Click to sort 23 | 24 | 25 | \end 26 | 27 | 28 | \define trashbin-cycle(arraySet:"", stateTiddler:"", stateField:"text") 29 | <$vars array=<<__arraySet__>> currentItem={{{[<__stateTiddler__>get<__stateField__>]}}} 30 | tooltip={{{[get[text]]}}} > 31 | <$button tooltip=<> class="tc-btn-invisible"> <> 32 | <$set 33 | filter='[enlistafter]' 34 | name=NextItem 35 | emptyValue={{{[enlistfirst[]]}}} 36 | > 37 | <$action-setfield 38 | $tiddler=<<__stateTiddler__>> 39 | $field=<<__stateField__>> 40 | $value=<> /> 41 | 42 | 43 | 44 | \end 45 | 46 | \define sort-by() 47 | <$macrocall $name="trashbin-cycle" 48 | arraySet="sortan[title] !sortan[title] sort[modified] !sort[modified]" 49 | stateTiddler=<> /> 50 | \end -------------------------------------------------------------------------------- /source/trashbin/plugin.info: -------------------------------------------------------------------------------- 1 | { 2 | "title": "$:/plugins/kookma/trashbin", 3 | "version": "1.3.5", 4 | "stability": "STABILITY_2_STABLE", 5 | "name": "Trashbin", 6 | "description": "A trashbin mechanism for Tiddlywiki", 7 | "author": "Mohammad Rahmani", 8 | "source": "https://github.com/kookma/TW-Trashbin", 9 | "list": "readme license history", 10 | "plugin-priority": "", 11 | "parent-plugin": "", 12 | "dependents": "", 13 | "plugin-type": "plugin", 14 | "core-version": ">= 5.1.22", 15 | "packaged-by": "Gatha on 16th February 2025, 23:38:32" 16 | } 17 | -------------------------------------------------------------------------------- /source/trashbin/readme.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/readme 2 | type: text/vnd.tiddlywiki 3 | 4 | ; Trashbin 5 | The concept behind Trashbin plugin is to have a simple mechanism to move deleted tiddlers to Trashbin and be able to restore them later if required. 6 | 7 | ; Code and demo 8 | For learning plugin features, mechanism, terminology, syntax, tutorial and examples see the plugin demo and code pages 9 | 10 | * Demo: https://kookma.github.io/TW-Trashbin/ 11 | * Code: https://github.com/kookma/TW-Trashbin 12 | -------------------------------------------------------------------------------- /source/trashbin/restore-notification.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/restore-notification 2 | type: text/vnd.tiddlywiki 3 | 4 | {{$:/plugins/kookma/trashbin/images/recycle}} 5 | 6 | ''Warning''
7 | The target tiddler <$text text=<>/> already exists.
8 | It cannot be overwritten! -------------------------------------------------------------------------------- /source/trashbin/sidebar-tab.tid: -------------------------------------------------------------------------------- 1 | caption: Trashbin 2 | list-after: 3 | tags: $:/tags/SideBar 4 | title: $:/plugins/kookma/trashbin/sidebar-tab 5 | type: text/vnd.tiddlywiki 6 | 7 | {{$:/plugins/kookma/trashbin/ui/sidebar}} -------------------------------------------------------------------------------- /source/trashbin/styles/main.css.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Stylesheet 2 | title: $:/plugins/kookma/trashbin/styles/main.css 3 | type: text/vnd.tiddlywiki 4 | 5 | /* trashbin main ui */ 6 | .kk-trashbin-ui{ 7 | min-width:320px; /* controls the minimum width of whole ui */ 8 | } 9 | 10 | .kk-trahbin-ui svg{ 11 | fill:#aaaaaa; 12 | } 13 | 14 | .kk-trahbin-ui .kk-trahbin-ui-controls svg{ 15 | width:1.2em; 16 | height:1.2em; 17 | } 18 | 19 | 20 | /* trashbin items list ui */ 21 | .kk-trashbin-row{ 22 | display: flex; 23 | width: 95%; 24 | flex-wrap: wrap; 25 | } 26 | 27 | .kk-trashbin-controls-row{ 28 | margin-bottom: 10px; 29 | } 30 | 31 | .kk-trashbin-row .kk-trashbin-delete, 32 | .kk-trashbin-row .kk-trashbin-restore { 33 | flex-grow:0; width:20px; 34 | margin-left:5px; 35 | } 36 | 37 | .kk-trashbin-row .kk-trashbin-link{ 38 | flex-grow:1; 39 | width: calc(100% - 50px); 40 | padding-right: 10px; 41 | } 42 | 43 | /* old: .kk-trashbin-row:hover { background-color: #f6f6f6; } */ 44 | .kk-trashbin-row:hover { background-color: <>; } 45 | 46 | /* UI button fade-in*/ 47 | .kk-trahbin-ui button:hover svg { fill: #000000; } 48 | .kk-trahbin-ui .kk-trashbin-ui-btn { opacity:0.5; } 49 | .kk-trahbin-ui .kk-trashbin-ui-btn:hover { opacity:1.0; } 50 | 51 | 52 | -------------------------------------------------------------------------------- /source/trashbin/styles/show-trashed.tid: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/plugins/kookma/trashbin/styles/show-trashed 3 | type: text/vnd.tiddlywiki 4 | 5 | [data-tags~="$:/tags/trashbin"] .tc-tiddler-body, 6 | [data-tags~="$:/tags/trashbin"] .tc-tags-wrapper 7 | { 8 | display:none; 9 | } 10 | -------------------------------------------------------------------------------- /source/trashbin/styles/toolbar-buttons.css: -------------------------------------------------------------------------------- 1 | html body.tc-body .tc-tiddler-controls .tc-image-trash-alt {stroke: white;fill:#660000;} 2 | html body.tc-body .tc-tiddler-controls .tc-image-recycle {stroke: white;fill:#138808;} -------------------------------------------------------------------------------- /source/trashbin/styles/toolbar-buttons.css.meta: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/styles/toolbar-buttons 2 | type: text/css -------------------------------------------------------------------------------- /source/trashbin/styles/trashed-item.css: -------------------------------------------------------------------------------- 1 | /* set style for trashed tiddlers */ 2 | [data-tags ~="$:/tags/trashbin"] { border: 1px solid crimson; } -------------------------------------------------------------------------------- /source/trashbin/styles/trashed-item.css.meta: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Stylesheet 2 | title: $:/plugins/kookma/trashbin/styles/trashed-item 3 | type: text/css -------------------------------------------------------------------------------- /source/trashbin/templates/body.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/templates/body 2 | type: text/vnd.tiddlywiki 3 | 4 | \define show-plain() 5 |
6 |
<$transclude index="text" mode="block"/>
7 |
8 | \end 9 | 10 | \define show() 11 |
12 | <$transclude index="text" mode="block"/> 13 |
14 | \end 15 | 16 | 17 | 18 | <$list filter="[getindex[type]match[application/json]]" variable=ignore> 19 | <$list filter="[getindex[plugin-type]]" variable=ignore emptyMessage=<> > 20 |
21 | This tiddler contains plugin! 22 |
23 | 24 | 25 | 26 | <$list filter="[getindex[type]match[application/x-tiddler-dictionary]] 27 | [getindex[type]match[text/plain]] 28 | [getindex[type]match[text/css]]" variable=ignore> 29 | <> 30 | 31 | 32 | 33 | 34 | <$list filter="[getindex[type]]" variable=type emptyMessage=<> > 35 | <$list filter="[match[text/vnd.tiddlywiki]]" variable=ignore> 36 | <$transclude index="text" mode="block"/> 37 | 38 | <$list filter="[search:title[image]]" variable=ignore> 39 |
40 | This tiddler contains image data! 41 |
42 | 43 | -------------------------------------------------------------------------------- /source/trashbin/templates/subtitle.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/templates/subtitle 2 | type: text/vnd.tiddlywiki 3 | 4 |
5 | <$link to={{##modifier}}> 6 | <$view index="modifier"/> 7 | <$view index="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/> 8 |
-------------------------------------------------------------------------------- /source/trashbin/templates/tags.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/templates/tags 2 | type: text/vnd.tiddlywiki 3 | 4 |
5 | <$vars tagsIndex={{{[getindex[tags]]}}}> 6 | <$list filter="[enlist]" template="$:/core/ui/TagTemplate" storyview="pop"/> 7 | 8 |
-------------------------------------------------------------------------------- /source/trashbin/templates/title.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/templates/title 2 | type: text/vnd.tiddlywiki 3 | 4 | \define title-styles() 5 | fill:$(foregroundColor)$; 6 | \end 7 |
8 |
9 | <$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}> 10 | <$link> 11 | <$set name="foregroundColor" value={{##color}}> 12 | >> 13 | <$transclude tiddler={{##icon}}> 14 | <$transclude tiddler={{$:/config/DefaultTiddlerIcon}}/> 15 | 16 | 17 | 18 | <$list filter="[{##title}removeprefix[$:/]]"> 19 |

20 | $:/<$text text=<>/> 21 |

22 | 23 | <$list filter="[{##title}!prefix[$:/]]"> 24 |

25 | <$view field="title"/> 26 |

27 | 28 | 29 | 30 |
-------------------------------------------------------------------------------- /source/trashbin/ui/sidebar.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/kookma/trashbin/ui/sidebar 2 | type: text/vnd.tiddlywiki 3 | 4 | \import $:/plugins/kookma/trashbin/macros/sort 5 | \import $:/plugins/kookma/trashbin/macros/restore 6 | \import $:/plugins/kookma/trashbin/macros/confirm-empty 7 | \import $:/plugins/kookma/trashbin/macros/bulk-operation 8 | \import $:/plugins/kookma/trashbin/macros/preview-option 9 | 10 | \define show-link() 11 | <$link to=<> ><$text text={{{ [removeprefix[$:/trashbin/]] }}} />  <$view field="modified" format="date" template="0MM/0DD/YYYY 0hh:0mm AM"/> 12 | \end 13 | 14 | \define recycle-button() 15 | {{||$:/plugins/kookma/trashbin/ui/toolbar-button}} 16 | \end 17 | 18 | \define delete-button() 19 | <$button class="tc-btn-invisible" tooltip="Delete permanently"> 20 | {{$:/plugins/kookma/trashbin/images/times.svg}} 21 | <$list filter="[list[$:/StoryList]] +[field:title>]" variable=ignore> 22 | <$action-sendmessage $message="tm-close-tiddler" $param=<<> /> 23 | 24 | <$action-deletetiddler $tiddler=<> /> 25 | 26 | \end 27 | 28 | \define trashbin-siderbar-ui() 29 |
30 |
31 | 32 | <> <> <> <> 33 |   34 | 35 | <$list filter='[tag[$:/tags/trashbin]prefix[$:/trashbin/]limit[1]]' variable=null emptyMessage="Trash bin is empty"> 36 | <$count filter='[tag[$:/tags/trashbin]]'/> items in Trashbin 37 | 38 | 39 |
40 | 41 | 42 | <$list filter="[tag[$:/tags/trashbin]prefix[$:/trashbin/]$(sortType)$]"> 43 |
44 | 45 |
<>
46 |
<>
47 |
48 | 49 |
50 | \end 51 | 52 | <$vars sortType={{{[get[text]] ~[[]] }}}> 53 | <> 54 | -------------------------------------------------------------------------------- /source/trashbin/ui/toolbar-button.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/plugins/kookma/trashbin/images/trash-alt}} {{$:/language/Buttons/Trashbin/Caption/Move}} 2 | description: <$list filter="[all[current]tag[$:/tags/trashbin]prefix[$:/trashbin/]]" emptyMessage={{$:/language/Buttons/Trashbin/Hint/Move}}>{{$:/language/Buttons/Trashbin/Hint/Recycle}} 3 | list-after: $:/core/ui/Buttons/delete 4 | tags: $:/tags/ViewToolbar $:/tags/EditToolbar 5 | title: $:/plugins/kookma/trashbin/ui/toolbar-button 6 | type: text/vnd.tiddlywiki 7 | 8 | \import $:/plugins/kookma/trashbin/macros/move-to-trashbin 9 | \import $:/plugins/kookma/trashbin/macros/restore 10 | \whitespace trim 11 | 12 | <$list filter="[all[current]!tag[$:/tags/trashbin]!prefix[$:/trashbin/]]"><$button 13 | aria-label={{$:/language/Buttons/Trashbin/Caption/Move}} 14 | tooltip={{$:/language/Buttons/Trashbin/Hint/Move}} class=<> > 15 | <$macrocall $name="move-to-trashbin" tiddler=<> /> 16 | <$list filter="[prefix[yes]]"> 17 | {{$:/plugins/kookma/trashbin/images/trash-alt}} 18 | <$list filter="[prefix[yes]]"> 19 | 20 |  <$text text={{$:/language/Buttons/Trashbin/Caption/Move}}/> 21 | 22 | <$list filter="[all[current]tag[$:/tags/trashbin]prefix[$:/trashbin/]]"><$button 23 | aria-label={{$:/language/Buttons/Trashbin/Caption/Recycle}} 24 | tooltip={{$:/language/Buttons/Trashbin/Hint/Recycle}} class=<> > 25 | <$macrocall $name="restore" tiddler=<> /> 26 | <$list filter="[prefix[yes]]"> 27 | {{$:/plugins/kookma/trashbin/images/recycle}} 28 | <$list filter="[prefix[yes]]"> 29 |   30 | <$text text={{$:/language/Buttons/Trashbin/Caption/Recycle}}/> 31 | 32 | -------------------------------------------------------------------------------- /source/trashbin/viewtemplate/trash-item.tid: -------------------------------------------------------------------------------- 1 | tags: 2 | title: $:/plugins/kookma/trashbin/viewtemplate/trash-item 3 | type: text/vnd.tiddlywiki 4 | 5 | <$list filter="[all[current]tag[$:/tags/trashbin]prefix[$:/trashbin/]]"> 6 |
7 | {{||$:/plugins/kookma/trashbin/templates/title}} 8 | {{||$:/plugins/kookma/trashbin/templates/subtitle}} 9 | {{||$:/plugins/kookma/trashbin/templates/tags}} 10 | {{||$:/plugins/kookma/trashbin/templates/body}} 11 |
12 |
13 |

Tiddler fields

14 | <$list filter="[indexes[]] -title -tags -text -created -modified" variable=idx> 15 | <$transclude index=<>/>
16 | 17 |
18 | 19 | --------------------------------------------------------------------------------