Browse Source

bug fix, update screenshots

Jacky 4 years ago
parent
commit
87c2fa520c

+ 0 - 1
.gitignore

@@ -3,4 +3,3 @@
 database.db
 tmp
 node_modules
-dist

+ 12 - 0
nginx-ui-frontend/src/layouts/HeaderLayout.vue

@@ -7,6 +7,10 @@
             <a href="/index.html">
                 <a-icon type="home"/>
             </a>
+
+            <a @click="logout" style="margin-left: 20px">
+                <a-icon type="logout"/>
+            </a>
         </div>
     </div>
 </template>
@@ -15,6 +19,14 @@
 export default {
     name: 'HeaderComponent',
     components: {},
+    methods: {
+        logout() {
+            this.$api.auth.logout().then(() => {
+                this.$message.success('注销成功')
+                this.$router.push('/login')
+            })
+        }
+    }
 }
 </script>
 

+ 3 - 3
nginx-ui-frontend/src/views/ConfigEdit.vue

@@ -1,5 +1,5 @@
 <template>
-    <a-card title="配置文件实时编辑">
+    <a-card title="配置文件编辑">
         <vue-itextarea v-model="configText"/>
         <footer-tool-bar>
             <a-button type="primary" @click="save">保存</a-button>
@@ -9,11 +9,11 @@
 
 <script>
 import FooterToolBar from "@/components/FooterToolbar/FooterToolBar"
-
+import VueItextarea from "@/components/VueItextarea/VueItextarea"
 
 export default {
     name: "DomainEdit",
-    components: {FooterToolBar},
+    components: {FooterToolBar, VueItextarea},
     data() {
         return {
             name: this.$route.params.name,

+ 0 - 31
nginx-ui-frontend/src/views/DomainEdit.vue

@@ -263,37 +263,6 @@ export default {
                 }
             }
 
-        },
-        pressTab(event) {
-            let target = event.target
-            let value = target.value
-            let start = target.selectionStart;
-            let end = target.selectionEnd;
-            if (event) {
-                value = value.substring(0, start) + '\t' + value.substring(end);
-                event.target.value = value;
-                setTimeout(() => target.selectionStart = target.selectionEnd = start + 1, 0);
-            }
-        },
-        pressEnter(event) {
-            let target = event.target
-            let value = target.value
-            let start = target.selectionStart
-            let end = target.selectionEnd
-
-            if (event.key === 'Enter') {
-                let current_line = value.substr(0, start).split("\n").pop(); // line, we are currently on
-                if (current_line && current_line.startsWith('\t')) { // type tab
-                    event.preventDefault();
-                    // detect how many tabs in the begining and apply
-                    let spaces_count = current_line.search(/\S|$/); // position of first non white-space character
-                    let tabs_count = spaces_count ? spaces_count / this.TAB_SIZE : 0
-                    value = value.substring(0, start) + '\n' + '\t'.repeat(tabs_count) + value.substring(end)
-                    event.target.value = value
-                    setTimeout(() => target.selectionStart = target.selectionEnd =
-                        start + this.TAB_SIZE * tabs_count + 1, 0)
-                }
-            }
         }
     }
 }

+ 1 - 1
nginx-ui-frontend/version.json

@@ -1 +1 @@
-{"version":"0.1.0","build_id":16}
+{"version":"0.1.0","build_id":18}

BIN
screenshots/config-edit.png


BIN
screenshots/config-list.png


BIN
screenshots/config_page.png


BIN
screenshots/dashboard.png


BIN
screenshots/domain-edit.png


BIN
screenshots/domain-list.png


BIN
screenshots/domain_list.png


BIN
screenshots/login.png