diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index df93f46d..1f87bfc4 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -418,6 +418,10 @@ class UiWebsocketPlugin(object): <li> <a href='#Save' class='button' id='button-settings'>{_[Save site settings]}</a> </li> + + <li> + <a href='#Directory' class='button' id='button-directory'>{_[Open site directory]}</a> + </li> """)) def sidebarRenderContents(self, body, site): diff --git a/plugins/Sidebar/media/Sidebar.coffee b/plugins/Sidebar/media/Sidebar.coffee index 2f2b3747..6efa0928 100644 --- a/plugins/Sidebar/media/Sidebar.coffee +++ b/plugins/Sidebar/media/Sidebar.coffee @@ -352,6 +352,10 @@ class Sidebar extends Class @updateHtmlTag() return false + # Open site directory + @tag.find("#button-directory").off("click touchend").on "click touchend", => + @wrapper.ws.cmd "serverShowdirectory", ["site", @wrapper.site_info.address] + # Sign and publish content.json $(document).on "click touchend", => @tag?.find("#button-sign-publish-menu").removeClass("visible") diff --git a/plugins/Sidebar/media/all.js b/plugins/Sidebar/media/all.js index 391a0a1d..4486bfdf 100644 --- a/plugins/Sidebar/media/all.js +++ b/plugins/Sidebar/media/all.js @@ -691,6 +691,11 @@ window.initScrollable = function () { return false; }; })(this)); + this.tag.find("#button-directory").off("click touchend").on("click touchend", (function(_this) { + return function() { + return _this.wrapper.ws.cmd("serverShowdirectory", ["site", _this.wrapper.site_info.address]); + }; + })(this)); $(document).on("click touchend", (function(_this) { return function() { var ref, ref1;