From 2a87e29180641621301a9e04bc2f493e01f4ca33 Mon Sep 17 00:00:00 2001
From: Ole Bertram <git@bertr.am>
Date: Wed, 4 Jul 2018 14:25:40 +0200
Subject: Add validation of the imported theme and the corresponding warning
 message

---
 src/components/style_switcher/style_switcher.vue | 6 ++++++
 1 file changed, 6 insertions(+)

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

diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue
index 0bc08bd7..1439763d 100644
--- a/src/components/style_switcher/style_switcher.vue
+++ b/src/components/style_switcher/style_switcher.vue
@@ -11,6 +11,7 @@
     <div>
       <button class="btn" @click="exportCurrentTheme">{{ $t('settings.export_theme') }}</button>
       <button class="btn" @click="importTheme">{{ $t('settings.import_theme') }}</button>
+      <p v-if="invalidThemeImported" class="import-warning">{{ $t('settings.invalid_theme_imported') }}</p>
     </div>
     <div class="color-container">
       <p>{{$t('settings.theme_help')}}</p>
@@ -135,6 +136,11 @@
   margin-right: 1em;
 }
 
+.import-warning {
+  color: $fallback--cRed;
+  color: var(--cRed, $fallback--cRed);
+}
+
 .radius-container,
 .color-container {
   display: flex;
-- 
cgit v1.2.3-70-g09d2

