1
0
mirror of https://github.com/MatMoul/quickdial-webext.git synced 2025-01-12 23:45:21 +00:00

Data: Version upgrade

This commit is contained in:
MatMoul 2017-11-11 15:10:58 +01:00
parent 827680c906
commit 2a12e35320

View File

@ -181,21 +181,23 @@ app.Settings.init = function(callback){ // Load settings and nodes
app.Settings.save(); app.Settings.save();
}); });
} }
if(!data.settings.backgroundMode) data.settings.backgroundMode = 0; if(data.version == 3){ // Upgrade Data Version
if(!data.settings.grid.backIconMode) data.settings.grid.backIconMode = 3; data.version = 4;
if(!data.settings.grid.folderIconMode) data.settings.grid.folderIconMode = 0; data.settings.backgroundMode = 0;
if(!data.settings.grid.cells.opacity) data.settings.grid.cells.opacity = 1; data.settings.grid.backIconMode = 3;
if(!data.settings.grid.cells.opacityHover) data.settings.grid.cells.opacityHover = 1; data.settings.grid.folderIconMode = 0;
if(!data.settings.grid.cells.borderSize) data.settings.grid.cells.borderSize = 1; data.settings.grid.cells.opacity = 1;
if(!data.settings.grid.cells.borderSizeHover) data.settings.grid.cells.borderSizeHover = data.settings.grid.cells.borderSize; data.settings.grid.cells.opacityHover = 1;
if(!data.settings.grid.cells.titleHover) data.settings.grid.cells.titleHover = data.settings.grid.cells.title; data.settings.grid.cells.borderSize = 1;
if(!data.settings.grid.cells.titleHeightHover){ data.settings.grid.cells.borderSizeHover = data.settings.grid.cells.borderSize;
data.settings.grid.cells.titleHover = data.settings.grid.cells.title;
data.settings.grid.cells.titleHeight -= 1; data.settings.grid.cells.titleHeight -= 1;
data.settings.grid.cells.titleHeightHover = data.settings.grid.cells.titleHeight; data.settings.grid.cells.titleHeightHover = data.settings.grid.cells.titleHeight;
data.settings.grid.cells.titleFontSizeHover = data.settings.grid.cells.titleFontSize;
data.settings.grid.cells.titleBorderSize = 1;
data.settings.grid.cells.titleBorderSizeHover = data.settings.grid.cells.titleBorderSize;
app.Settings.save();
} }
if(!data.settings.grid.cells.titleFontSizeHover) data.settings.grid.cells.titleFontSizeHover = data.settings.grid.cells.titleFontSize;
if(!data.settings.grid.cells.titleBorderSize) data.settings.grid.cells.titleBorderSize = 1;
if(!data.settings.grid.cells.titleBorderSizeHover) data.settings.grid.cells.titleBorderSizeHover = data.settings.grid.cells.titleBorderSize;
app.settings = data.settings; app.settings = data.settings;
app.node = data.node; app.node = data.node;
if(callback) callback(); if(callback) callback();