diff --git a/package.json b/package.json
index a3c16b2..86a779a 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,8 @@
"name": "yutent",
"email": "yutent.io@gmail.com"
},
- "devDependencies": {},
+ "devDependencies": {
+ "@bytedo/vue-live": "0.0.5"
+ },
"dependencies": {}
}
diff --git a/src/app.vue b/src/app.vue
index 307189a..adc6f3c 100644
--- a/src/app.vue
+++ b/src/app.vue
@@ -1,9 +1,11 @@
-
- hello vue-live!
+
+
diff --git a/src/css/app.scss b/src/assets/app.scss
similarity index 100%
rename from src/css/app.scss
rename to src/assets/app.scss
diff --git a/src/components/sidebar.vue b/src/components/sidebar.vue
index a74816a..8ac7358 100644
--- a/src/components/sidebar.vue
+++ b/src/components/sidebar.vue
@@ -5,10 +5,11 @@
@@ -22,14 +23,21 @@
export default {
data() {
return {
- navs: ['代理', '规则', '连接', '订阅', '设置'],
- tab: +localStorage.getItem('tab') || 0
+ navs: [
+ { title: '代理', path: '/proxies' },
+ { title: '规则', path: '/rules' },
+ { title: '连接', path: '/connects' },
+ { title: '订阅', path: '/remote' },
+ { title: '设置', path: '/config' }
+ ],
+ tab: localStorage.getItem('tab') || '/proxies'
}
},
methods: {
- changeTab(idx) {
- this.tab = idx
- localStorage.setItem('tab', idx)
+ changeTab(it) {
+ this.tab = it.path
+ localStorage.setItem('tab', it.path)
+ this.$router.push(it.path)
}
}
}
diff --git a/src/css/app.css b/src/css/app.css
deleted file mode 100644
index 50aac0f..0000000
--- a/src/css/app.css
+++ /dev/null
@@ -1 +0,0 @@
-.tab-content{flex:1;flex-shrink:0;display:flex;flex-direction:column;height:540px;padding:16px}.tab-content .field{display:flex;align-items:center;width:100%;height:36px;margin-top:12px}.tab-content .field .label{width:128px;font-weight:bold;color:var(--color-grey-3)}.tab-content .field .full{flex:1}.tab-content.configs{width:49%;margin-left:1%}.tab-content.remote wc-button,.tab-content.rules wc-button{width:64px;min-width:64px;margin-left:16px}.tab-content.remote .scroll,.tab-content.rules .scroll{overflow:hidden;flex:1;margin-top:24px}.tab-content.remote .card,.tab-content.rules .card{margin:0 auto}.tab-content.remote .list,.tab-content.rules .list{word-break:break-all}.tab-content.remote .list .item,.tab-content.rules .list .item{display:flex;align-items:center;justify-content:space-between;height:36px;padding:0 16px;border-bottom:1px solid var(--color-plain-1);font-family:Menlo,"Courier New",Courier,monospace;transition:background .2s linear}.tab-content.remote .list .item:hover,.tab-content.rules .list .item:hover{background-color:var(--color-plain-1)}.tab-content.remote .list span.type,.tab-content.rules .list span.type{padding:2px 3px;border-radius:2px;background-color:var(--color-blue-1);color:#fff}.card{flex:1;flex-shrink:0;display:flex;flex-direction:column;flex-wrap:wrap;width:100%;max-height:100%;padding:12px;margin:0 auto 24px;border:0;border-radius:4px;background-color:#fff;box-shadow:0 0 8px rgba(0,0,0,.075)}.card legend{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--color-blue-1);font-weight:bold}
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
index 9e56542..6445fdb 100644
--- a/src/index.html
+++ b/src/index.html
@@ -29,97 +29,9 @@
{{version}}
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+