From 1e606d2f268e796a3efd2a995713c70a000daf62 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 25 May 2020 03:14:41 +0300
Subject: split modal's content into another component, add lazy loading

---
 src/components/settings_modal/settings_modal.vue | 77 ++----------------------
 1 file changed, 4 insertions(+), 73 deletions(-)

(limited to 'src/components/settings_modal/settings_modal.vue')

diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue
index 741c15c4..b9c0689e 100644
--- a/src/components/settings_modal/settings_modal.vue
+++ b/src/components/settings_modal/settings_modal.vue
@@ -5,79 +5,10 @@
   :class="{ peek: modalPeeked }"
   :no-background="modalPeeked"
   >
-  <div class="settings-modal-panel panel">
-    <div class="panel-heading">
-      <span class="title">
-        {{ $t('settings.settings') }}
-      </span>
-      <button class="btn" @click="peekModal">
-        {{ $t('general.peek') }}
-      </button>
-      <button class="btn" @click="closeModal">
-        {{ $t('general.close') }}
-      </button>
-    </div>
-    <div class="panel-body">
-      <tab-switcher
-        class="settings_tab-switcher"
-        :sideTabBar="true"
-        :scrollableTabs="true"
-        ref="tabSwitcher"
-        >
-        <div
-          :label="$t('settings.general')"
-          >
-          <GeneralTab />
-        </div>
-        <div v-if="isLoggedIn"
-             :label="$t('settings.profile_tab')"
-             >
-          <ProfileTab />
-        </div>
-        <div
-          v-if="isLoggedIn"
-          :label="$t('settings.security_tab')"
-          >
-          <SecurityTab />
-        </div>
-        <div
-          :label="$t('settings.filtering')"
-          >
-          <FilteringTab />
-        </div>
-        <div
-          :label="$t('settings.theme')"
-          >
-          <ThemeTab />
-        </div>
-        <div
-          v-if="isLoggedIn"
-          :label="$t('settings.notifications')"
-          >
-          <NotificationsTab />
-        </div>
-        <div
-          v-if="isLoggedIn"
-          :label="$t('settings.data_import_export_tab')"
-          >
-          <DataImportExportTab />
-        </div>
-        <div
-          v-if="isLoggedIn"
-          :label="$t('settings.mutes_and_blocks')"
-          :fullHeight="true"
-          class="full-height"
-          >
-          <MutesAndBlocksTab />
-        </div>
-        <div
-          :label="$t('settings.version.title')"
-          >
-          <VersionTab />
-        </div>
-      </tab-switcher>
-    </div>
-  </div>
+  <SettingsModalContent
+    v-if="modalActivated"
+    class="modal-panel"
+    />
 </Modal>
 </template>
 
-- 
cgit v1.2.3-70-g09d2

