dashboard: add ctrl+f support to config editor

This commit is contained in:
Dragory 2021-04-10 13:11:37 +03:00
parent 186ac65924
commit 530536a77b
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -41,22 +41,22 @@
AceEditor,
},
async mounted() {
try {
await this.$store.dispatch("guilds/loadGuild", this.$route.params.guildId);
} catch (err) {
if (err instanceof ApiError) {
this.$router.push('/dashboard');
return;
}
throw err;
}
if (this.guild == null) {
try {
await this.$store.dispatch("guilds/loadGuild", this.$route.params.guildId);
} catch (err) {
if (err instanceof ApiError) {
this.$router.push('/dashboard');
return;
}
throw err;
}
if (this.guild == null) {
this.$router.push('/dashboard');
return;
}
await this.$store.dispatch("guilds/loadConfig", this.$route.params.guildId);
this.editableConfig = this.config || "";
this.loading = false;
@ -86,6 +86,7 @@
methods: {
editorInit() {
require("brace/ext/language_tools");
require('brace/ext/searchbox');
require("brace/mode/yaml");
require("brace/theme/tomorrow_night");