Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8850 relocate Manage ACL button #8852

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions core/modules/widgets/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;

})();
2 changes: 2 additions & 0 deletions editions/multiwikiserver/tiddlers/$__StoryList_1.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
list: GettingStarted
title: $:/StoryList
16 changes: 0 additions & 16 deletions plugins/tiddlywiki/multiwikiclient/manage-acl.tid

This file was deleted.

81 changes: 67 additions & 14 deletions plugins/tiddlywiki/multiwikiserver/templates/get-index.tid
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ title: $:/plugins/tiddlywiki/multiwikiserver/templates/get-index
<$text text={{{ [<recipe-info>jsonget[description]] }}}/>
</div>
</div>
<div class="mws-wiki-card-actions">
<$set name="last-bag" value={{{ [<recipe-info>jsonget[bag_names]last[]] }}}>
<a
href={{{ [<recipe-name>addprefix[/admin/acl/]addsuffix[/]addsuffix<last-bag>] }}}
class="mws-wiki-card-action"
title="Manage ACL"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
</svg>
</a>
</$set>
</div>
</div>
</$let>
</li>
Expand Down Expand Up @@ -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;
}
</style>
Loading