Ver Fonte

Мелкая поправка

Book Pauk há 6 anos atrás
pai
commit
015254ae40

+ 5 - 1
client/components/Reader/ServerStorage/ServerStorage.vue

@@ -21,7 +21,7 @@ export default @Component({
             this.serverStorageKeyChanged();
             this.serverStorageKeyChanged();
         },
         },
         settings: function() {
         settings: function() {
-            this.saveSettings();
+            this.debouncedSaveSettings();
         },
         },
         profiles: function() {
         profiles: function() {
             this.saveProfiles();
             this.saveProfiles();
@@ -37,6 +37,10 @@ class ServerStorage extends Vue {
         this.prevServerStorageKey = null;
         this.prevServerStorageKey = null;
         this.$root.$on('generateNewServerStorageKey', () => {this.generateNewServerStorageKey()});
         this.$root.$on('generateNewServerStorageKey', () => {this.generateNewServerStorageKey()});
 
 
+        this.debouncedSaveSettings = _.debounce(() => {
+            this.saveSettings();
+        }, 500);
+
         this.oldProfiles = {};
         this.oldProfiles = {};
         this.oldSettings = {};
         this.oldSettings = {};
     }
     }