From 530536a77b8d4a6383dae09ae4af44dfef8ccf4a Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 10 Apr 2021 13:11:37 +0300 Subject: [PATCH] dashboard: add ctrl+f support to config editor --- .../dashboard/GuildConfigEditor.vue | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/dashboard/src/components/dashboard/GuildConfigEditor.vue b/dashboard/src/components/dashboard/GuildConfigEditor.vue index 69b35058..f25be72f 100644 --- a/dashboard/src/components/dashboard/GuildConfigEditor.vue +++ b/dashboard/src/components/dashboard/GuildConfigEditor.vue @@ -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");