dashboard: add ctrl+f support to config editor
This commit is contained in:
parent
186ac65924
commit
530536a77b
1 changed files with 13 additions and 12 deletions
|
@ -41,22 +41,22 @@
|
||||||
AceEditor,
|
AceEditor,
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch("guilds/loadGuild", this.$route.params.guildId);
|
await this.$store.dispatch("guilds/loadGuild", this.$route.params.guildId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof ApiError) {
|
if (err instanceof ApiError) {
|
||||||
this.$router.push('/dashboard');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild == null) {
|
|
||||||
this.$router.push('/dashboard');
|
this.$router.push('/dashboard');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.guild == null) {
|
||||||
|
this.$router.push('/dashboard');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await this.$store.dispatch("guilds/loadConfig", this.$route.params.guildId);
|
await this.$store.dispatch("guilds/loadConfig", this.$route.params.guildId);
|
||||||
this.editableConfig = this.config || "";
|
this.editableConfig = this.config || "";
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -86,6 +86,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
editorInit() {
|
editorInit() {
|
||||||
require("brace/ext/language_tools");
|
require("brace/ext/language_tools");
|
||||||
|
require('brace/ext/searchbox');
|
||||||
require("brace/mode/yaml");
|
require("brace/mode/yaml");
|
||||||
require("brace/theme/tomorrow_night");
|
require("brace/theme/tomorrow_night");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue