Skip to content

Commit

Permalink
Main process deprecate old encryption #154
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Nov 17, 2021
1 parent cd6f318 commit 2445187
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 73 deletions.
1 change: 0 additions & 1 deletion lib/typedef.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
* @property {Object} security - Security
* @property {Null|Boolean} security.require_password - Requires password
* @property {Null|String} security.password - Password
* @property {Null|Boolean} security.new_encryption - New encryption mode
* @property {Null|String} security.key - Encryption key
*
* @property {Object} shortcuts - Shortcuts
Expand Down
73 changes: 1 addition & 72 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ const settings = `{
"security": {
"require_password": null,
"password": null,
"new_encryption": null,
"key": null
},
"shortcuts": {
Expand All @@ -211,7 +210,7 @@ const settings = `{
"settings": "CmdOrCtrl+Shift+s",
"exit": "CmdOrCtrl+Shift+d"
},
"quick_shortcuts:": {},
"quick_shortcuts": {},
"search_history": {
"latest": null
},
Expand All @@ -233,76 +232,6 @@ if (!fs.existsSync(path.join(file_path, "settings.json"))) {
*/
let file = JSON.parse(fs.readFileSync(path.join(file_path, "settings.json"), "utf-8"))

// settings compatibility
if (file.experimental === undefined) {
file.experimental = {
sort: null,
}

saveSettings()
}

if (file.quick_shortcuts === undefined) {
file.quick_shortcuts = {}

saveSettings()
}

if (file.settings.search_bar_filter === undefined) {
file.settings.search_bar_filter = {
name: true,
description: false,
}

saveSettings()
}

if (file.experimental.webcam === undefined) {
file.experimental.webcam = null

saveSettings()
}

if (file.shortcuts.edit === undefined) {
file.shortcuts.edit = "CmdOrCtrl+t"

saveSettings()
}

if (file.shortcuts.support === undefined) {
file.shortcuts.support = "CmdOrCtrl+p"

saveSettings()
}

if (file.settings.disable_window_capture === undefined) {
file.settings.disable_window_capture = true

saveSettings()
}

if (file.statistics === undefined) {
file.statistics = {
opens: 0,
rated: null,
feedback: null,
}

saveSettings()
}

if (file.settings.disable_hardware_acceleration === undefined) {
file.settings.disable_hardware_acceleration = false

saveSettings()
}

if (file.shortcuts.zoom_reset === undefined) {
file.shortcuts.zoom_reset = "CmdOrCtrl+0"
file.shortcuts.zoom_in = "CmdOrCtrl+1"
file.shortcuts.zoom_out = "CmdOrCtrl+2"
}

// ? force dark mode
nativeTheme.themeSource = "dark"

Expand Down

0 comments on commit 2445187

Please sign in to comment.