bug fix, update screenshots
1
.gitignore
vendored
|
@ -3,4 +3,3 @@
|
|||
database.db
|
||||
tmp
|
||||
node_modules
|
||||
dist
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 @@
|
|||
{"version":"0.1.0","build_id":16}
|
||||
{"version":"0.1.0","build_id":18}
|
BIN
screenshots/config-edit.png
Normal file
After Width: | Height: | Size: 290 KiB |
BIN
screenshots/config-list.png
Normal file
After Width: | Height: | Size: 235 KiB |
Before Width: | Height: | Size: 244 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 220 KiB |
BIN
screenshots/domain-edit.png
Normal file
After Width: | Height: | Size: 326 KiB |
BIN
screenshots/domain-list.png
Normal file
After Width: | Height: | Size: 246 KiB |
Before Width: | Height: | Size: 239 KiB |
BIN
screenshots/login.png
Normal file
After Width: | Height: | Size: 204 KiB |