diff options
| author | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-23 22:52:50 +0300 |
|---|---|---|
| committer | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-23 22:52:50 +0300 |
| commit | 5ef8a5a37ec7e6b7df710fa61b0324ab5a6617ab (patch) | |
| tree | 8356d79072560de703f6dbc1d26fa5d51a6d5ac1 /web/html/xui/common_sider.html | |
| parent | c49a9e877cb8481a98564b45f3462f8f73189f6e (diff) | |
old designv1.0.9
Diffstat (limited to 'web/html/xui/common_sider.html')
| -rw-r--r-- | web/html/xui/common_sider.html | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html index 13c24c34..66e48d6e 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> @@ -41,7 +41,7 @@ <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" + <a-switch size="small" :default-checked="siderDrawer.isDarkTheme" checked-children="☀" un-checked-children="🌙" @change="siderDrawer.changeTheme()"></a-switch> @@ -55,12 +55,11 @@ <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 :theme="siderDrawer.theme" mode="inline" selected-keys=""> + <a-menu mode="inline" selected-keys=""> <a-menu-item mode="inline"> <a-icon type="bg-colors"></a-icon> <a-switch :default-checked="siderDrawer.isDarkTheme" @@ -69,17 +68,19 @@ @change="siderDrawer.changeTheme()"></a-switch> </a-menu-item> </a-menu> - <a-menu :theme="siderDrawer.theme" mode="inline" :selected-keys="['{{ .request_uri }}']" + <a-menu 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; @@ -89,7 +90,7 @@ }, change() { this.visible = !this.visible; - }, + }, toggleCollapsed() { this.collapsed = !this.collapsed; }, |
