diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-03-17 19:07:49 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-03-17 19:07:49 +0300 |
| commit | 96786c94189f3d2f3f04c1915529c786228bdf42 (patch) | |
| tree | 879085e09a3cd485f3246f46be907fe77eb84a1a /web/html/xui/common_sider.html | |
| parent | bc56e637376142c370c31b17558fc3778a863bd2 (diff) | |
alireza
Diffstat (limited to 'web/html/xui/common_sider.html')
| -rw-r--r-- | web/html/xui/common_sider.html | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html index 9de00175..13c24c34 100644 --- a/web/html/xui/common_sider.html +++ b/web/html/xui/common_sider.html @@ -13,14 +13,14 @@ </a-menu-item> <!--<a-menu-item key="{{ .base_path }}xui/clients">--> <!-- <a-icon type="laptop"></a-icon>--> -<!-- <span>client</span>--> +<!-- <span>Client</span>--> <!--</a-menu-item>--> <a-sub-menu> <template slot="title"> <a-icon type="link"></a-icon> <span>{{ i18n "menu.link"}}</span> </template> - <a-menu-item key="https://github.com/mhsanaei/3x-ui/"> + <a-menu-item key="https://github.com/mhsanaei/3x-ui/"> <a-icon type="github"></a-icon> <span>Github</span> </a-menu-item> @@ -55,11 +55,12 @@ <a-drawer id="sider-drawer" placement="left" :closable="false" @close="siderDrawer.close()" :visible="siderDrawer.visible" + :wrap-class-name="siderDrawer.isDarkTheme ? 'ant-drawer-dark' : ''" :wrap-style="{ padding: 0 }"> <div class="drawer-handle" @click="siderDrawer.change()" slot="handle"> <a-icon :type="siderDrawer.visible ? 'close' : 'menu-fold'"></a-icon> </div> - <a-menu mode="inline" selected-keys=""> + <a-menu :theme="siderDrawer.theme" mode="inline" selected-keys=""> <a-menu-item mode="inline"> <a-icon type="bg-colors"></a-icon> <a-switch :default-checked="siderDrawer.isDarkTheme" @@ -68,19 +69,17 @@ @change="siderDrawer.changeTheme()"></a-switch> </a-menu-item> </a-menu> - <a-menu mode="inline" :selected-keys="['{{ .request_uri }}']" + <a-menu :theme="siderDrawer.theme" mode="inline" :selected-keys="['{{ .request_uri }}']" @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key"> {{template "menuItems" .}} </a-menu> </a-drawer> <script> - - const darkClass = "ant-card-dark"; const bgDarkStyle = "background-color: #242c3a"; const siderDrawer = { visible: false, - collapsed: false, + collapsed: false, isDarkTheme: localStorage.getItem("dark-mode") === 'true' ? true : false, show() { this.visible = true; @@ -90,7 +89,7 @@ }, change() { this.visible = !this.visible; - }, + }, toggleCollapsed() { this.collapsed = !this.collapsed; }, |
