Browse Source

Добавлена подсказка в сообщение об ошибке

Book Pauk 4 years ago
parent
commit
07444bc7c2
1 changed files with 9 additions and 2 deletions
  1. 9 2
      client/components/Reader/ServerStorage/ServerStorage.vue

+ 9 - 2
client/components/Reader/ServerStorage/ServerStorage.vue

@@ -216,8 +216,15 @@ class ServerStorage extends Vue {
     }
 
     error(message) {
-        if (this.showServerStorageMessages && !this.offlineModeActive)
-            this.$root.notify.error(message);
+        if (this.showServerStorageMessages && !this.offlineModeActive) {
+            this.errorMessageCounter = (this.errorMessageCounter ? this.errorMessageCounter + 1 : 1);
+            const hint = (this.errorMessageCounter < 2 ? '' :
+                '<div><br>Надоело это сообщение? Добавьте в настройках кнопку "Автономный режим" ' +
+                '<i class="la la-unlink" style="font-size: 20px; color: white"></i> на панель инструментов и активируйте ее.</div>'
+            );
+
+            this.$root.notify.error(message + hint);
+        }
     }
 
     async loadSettings(force = false, doNotifySuccess = true) {