diff --git a/client/src/data/user.settings.default.json b/client/src/data/user.settings.default.json
index 29137e6d..2ca31ad6 100644
--- a/client/src/data/user.settings.default.json
+++ b/client/src/data/user.settings.default.json
@@ -172,7 +172,7 @@
"settings": [
{
"id": "e2ekvps",
- "type": ["kvp"],
+ "type": [ "securekvp" ],
"value": []
}
]
diff --git a/client/src/structs/settings/setting.js b/client/src/structs/settings/setting.js
index 618596ce..fe2b4e5a 100644
--- a/client/src/structs/settings/setting.js
+++ b/client/src/structs/settings/setting.js
@@ -21,6 +21,7 @@ import GuildSetting from './types/guild';
import ArraySetting from './types/array';
import CollectionSetting from './types/collection';
import KvpSetting from './types/kvp';
+import SecureKvpSetting from './types/securekvp';
import CustomSetting from './types/custom';
export default class Setting {
@@ -44,6 +45,7 @@ export default class Setting {
else if (args.type === 'array') return new ArraySetting(args, ...merge);
else if (args.type === 'collection') return new CollectionSetting(args, ...merge);
else if (args.type === 'kvp') return new KvpSetting(args, ...merge);
+ else if (args.type === 'securekvp') return new SecureKvpSetting(args, ...merge);
else if (args.type === 'custom') return new CustomSetting(args, ...merge);
else throw {message: `Setting type ${args.type} unknown`};
}
diff --git a/client/src/structs/settings/types/securekvp.js b/client/src/structs/settings/types/securekvp.js
new file mode 100644
index 00000000..bb6c4990
--- /dev/null
+++ b/client/src/structs/settings/types/securekvp.js
@@ -0,0 +1,26 @@
+/**
+ * BetterDiscord Secure Key Value Pair Setting Struct
+ * Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
+ * All rights reserved.
+ * https://betterdiscord.net
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import Kvp from './kvp';
+
+export default class SecureKvpSetting extends Kvp {
+
+ constructor(args, ...merge) {
+ super(args, ...merge);
+ window.skvp = this;
+ }
+
+ /**
+ * The value to use when the setting doesn't have a value.
+ */
+ get defaultValue() {
+ return { key: 'Key', value: '**********' };
+ }
+}
diff --git a/client/src/ui/components/bd/setting/SecureKeyValuePair.vue b/client/src/ui/components/bd/setting/SecureKeyValuePair.vue
new file mode 100644
index 00000000..cb5f3249
--- /dev/null
+++ b/client/src/ui/components/bd/setting/SecureKeyValuePair.vue
@@ -0,0 +1,58 @@
+/**
+ * BetterDiscord Setting Secure Key Value Pair Component
+ * Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
+ * All rights reserved.
+ * https://betterdiscord.net
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+*/
+
+
+