π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:fire: Replaces old export code, with new export modal
Alicia Sykes287635729762
diff --git a/src/components/Configuration/ConfigContainer.vue b/src/components/Configuration/ConfigContainer.vueindex 782cc256..3ee00cec 100644--- a/src/components/Configuration/ConfigContainer.vue+++ b/src/components/Configuration/ConfigContainer.vue@@ -4,7 +4,7 @@<div class="main-options-container"><div class="config-buttons"><h2>Configuration Options</h2>- <a class="hyperlink-wrapper" @click="downloadConfigFile('conf.yml', yaml)">+ <a class="hyperlink-wrapper" @click="openExportConfigModal()"><button class="config-button center"><DownloadIcon class="button-icon"/>{{ $t('config.download-config-button') }}@@ -134,9 +134,8 @@ export default {openLanguageSwitchModal() {this.$modal.show(modalNames.LANG_SWITCHER);},- copyConfigToClipboard() {- navigator.clipboard.writeText(this.jsonParser(this.config));- this.$toasted.show(this.$t('config.data-copied-msg'));+ openExportConfigModal() {+ this.$modal.show(modalNames.EXPORT_CONFIG_MENU);},/* Checks that the user is sure, then resets site-wide local storage, and reloads page */resetLocalSettings() {@@ -151,16 +150,6 @@ export default {}, 1900);}},- /* Generates a new file, with the YAML contents, and triggers a download */- downloadConfigFile(filename, filecontents) {- const element = document.createElement('a');- element.setAttribute('href', `data:text/plain;charset=utf-8, ${encodeURIComponent(filecontents)}`);- element.setAttribute('download', filename);- element.style.display = 'none';- document.body.appendChild(element);- element.click();- document.body.removeChild(element);- },getLanguage() {const lang = getUsersLanguage();return lang ? `${lang.flag} ${lang.name}` : '';