From ddfc8c469cc350247c1aa930351973bbf3310d34 Mon Sep 17 00:00:00 2001 From: webplusai Date: Mon, 23 Dec 2024 10:25:33 +0000 Subject: [PATCH] #8850 relocate Manage ACL button (#8852) --- core/modules/widgets/navigator.js | 11 +-- .../tiddlers/$__StoryList_1.tid | 2 + .../tiddlywiki/multiwikiclient/manage-acl.tid | 16 ---- .../multiwikiserver/templates/get-index.tid | 81 +++++++++++++++---- 4 files changed, 70 insertions(+), 40 deletions(-) create mode 100644 editions/multiwikiserver/tiddlers/$__StoryList_1.tid delete mode 100644 plugins/tiddlywiki/multiwikiclient/manage-acl.tid diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index ce0688ad6..205db4c91 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -44,8 +44,7 @@ NavigatorWidget.prototype.render = function(parent,nextSibling) { {type: "tm-fold-tiddler", handler: "handleFoldTiddlerEvent"}, {type: "tm-fold-other-tiddlers", handler: "handleFoldOtherTiddlersEvent"}, {type: "tm-fold-all-tiddlers", handler: "handleFoldAllTiddlersEvent"}, - {type: "tm-unfold-all-tiddlers", handler: "handleUnfoldAllTiddlersEvent"}, - {type: "tm-manage-acl", handler: "handleManageACLTiddlersEvent"} + {type: "tm-unfold-all-tiddlers", handler: "handleUnfoldAllTiddlersEvent"} ]); this.parentDomNode = parent; this.computeAttributes(); @@ -639,14 +638,6 @@ NavigatorWidget.prototype.handleUnfoldAllTiddlersEvent = function(event) { }); }; -NavigatorWidget.prototype.handleManageACLTiddlersEvent = function() { - var pathname = window.location.pathname; - var paths = pathname.split("/"); - var recipeName = paths[paths.length - 1]; - var bagName = document.querySelector("h1.tc-site-title").innerHTML; - window.location.href = "/admin/acl/"+recipeName+"/"+bagName -}; - exports.navigator = NavigatorWidget; })(); diff --git a/editions/multiwikiserver/tiddlers/$__StoryList_1.tid b/editions/multiwikiserver/tiddlers/$__StoryList_1.tid new file mode 100644 index 000000000..28aae8c87 --- /dev/null +++ b/editions/multiwikiserver/tiddlers/$__StoryList_1.tid @@ -0,0 +1,2 @@ +list: GettingStarted +title: $:/StoryList \ No newline at end of file diff --git a/plugins/tiddlywiki/multiwikiclient/manage-acl.tid b/plugins/tiddlywiki/multiwikiclient/manage-acl.tid deleted file mode 100644 index bf158a4e4..000000000 --- a/plugins/tiddlywiki/multiwikiclient/manage-acl.tid +++ /dev/null @@ -1,16 +0,0 @@ -title: $:/core/ui/Buttons/manage-acl -tags: $:/tags/PageControls -caption: {{$:/core/images/globe}} manage access control -description: Manage access control configuration for this wiki -list-after: $:/core/ui/Buttons/encryption - -\whitespace trim -<$button tooltip="Manage access control configuration for this wiki" aria-label="manage access control" class=<>> -<$action-managetiddler tiddler=<>/> -{{$:/core/images/globe}} -<%if [match[yes]] %> - -<$text text={{$:/language/Buttons/ManageACL/Caption}}/> - -<%endif%> - diff --git a/plugins/tiddlywiki/multiwikiserver/templates/get-index.tid b/plugins/tiddlywiki/multiwikiserver/templates/get-index.tid index 742e6aaf6..1df7e7d75 100644 --- a/plugins/tiddlywiki/multiwikiserver/templates/get-index.tid +++ b/plugins/tiddlywiki/multiwikiserver/templates/get-index.tid @@ -88,6 +88,20 @@ title: $:/plugins/tiddlywiki/multiwikiserver/templates/get-index <$text text={{{ [jsonget[description]] }}}/> + @@ -320,34 +334,73 @@ title: $:/plugins/tiddlywiki/multiwikiserver/templates/get-index } .mws-config-button:hover { - background-color: #45a049; + background-color: #45a049; } .mws-modal-content { - padding: 20px; + padding: 20px; } .mws-modal-section { - margin-bottom: 15px; + margin-bottom: 15px; } .mws-modal-buttons { - display: flex; - gap: 10px; - justify-content: flex-end; - margin-top: 20px; + display: flex; + gap: 10px; + justify-content: flex-end; + margin-top: 20px; } .mws-modal-button-primary { - background-color: #4CAF50; - color: white; - padding: 8px 16px; - border: none; - border-radius: 4px; - cursor: pointer; + background-color: #4CAF50; + color: white; + padding: 8px 16px; + border: none; + border-radius: 4px; + cursor: pointer; } .mws-modal-button-primary:hover { - background-color: #45a049; + background-color: #45a049; +} + +.mws-wiki-card { + display: flex; + flex-direction: row; +} + +.mws-wiki-card-content { +} + +.mws-wiki-card-actions { + padding: 10px; + display: flex; + justify-content: flex-end; + margin-left: auto; + height: 50px; + width: 50px; +} + +.mws-wiki-card-action { + display: inline-flex; + align-items: center; + padding: 8px 16px; + background-color: white; + border-radius: 6px; + text-decoration: none; + color: #333; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: all 0.2s ease; +} + +.mws-wiki-card-action:hover { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); + transform: translateY(-1px); +} + +.mws-wiki-card-action svg { + width: 16px; + height: 16px; }