@@ -36,7 +36,9 @@
timeout: null,
platform: process.platform,
eventHandlers: {},
- keybindHandler: null
+ keybindHandler: null,
+ hideButton: false,
+ hideButtonToggleHandler: null
};
},
components: {
@@ -80,6 +82,10 @@
const menuKeybind = Settings.getSetting('core', 'default', 'menu-keybind');
menuKeybind.on('keybind-activated', this.keybindHandler = () => this.active = !this.active);
+
+ const hideButtonSetting = Settings.getSetting('ui', 'default', 'hide-button');
+ hideButtonSetting.on('setting-updated', this.hideButtonToggleHandler = event => this.hideButton = event.value);
+ this.hideButton = hideButtonSetting.value;
},
destroyed() {
for (let event in this.eventHandlers) Events.off(event, this.eventHandlers[event]);
@@ -89,7 +95,12 @@
if (this.keybindHandler) {
const menuKeybind = Settings.getSetting('core', 'default', 'menu-keybind');
- menuKeybind.removeListener('keybind-activated', this.keybindHandler = () => this.active = !this.active);
+ menuKeybind.removeListener('keybind-activated', this.keybindHandler);
+ }
+
+ if (this.hideButtonToggleHandler) {
+ const hideButtonSetting = Settings.getSetting('ui', 'default', 'hide-button');
+ hideButtonSetting.removeListener('setting-updated', this.hideButtonToggleHandler);
}
}
}
diff --git a/client/src/ui/components/bd/setting/Collection.vue b/client/src/ui/components/bd/setting/Collection.vue
new file mode 100644
index 00000000..5fa5ebf7
--- /dev/null
+++ b/client/src/ui/components/bd/setting/Collection.vue
@@ -0,0 +1,43 @@
+/**
+ * BetterDiscord Collection Setting 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.
+*/
+
+
+
+
+
+
diff --git a/client/src/ui/components/bd/setting/KeyValuePair.vue b/client/src/ui/components/bd/setting/KeyValuePair.vue
index e946c72a..67806e98 100644
--- a/client/src/ui/components/bd/setting/KeyValuePair.vue
+++ b/client/src/ui/components/bd/setting/KeyValuePair.vue
@@ -12,12 +12,11 @@
@@ -25,7 +24,13 @@
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..40d145d6
--- /dev/null
+++ b/client/src/ui/components/bd/setting/SecureKeyValuePair.vue
@@ -0,0 +1,57 @@
+/**
+ * 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.
+*/
+
+
+
+
+
+
diff --git a/client/src/ui/components/bd/setting/Setting.vue b/client/src/ui/components/bd/setting/Setting.vue
index 481e4ea0..107e6ee6 100644
--- a/client/src/ui/components/bd/setting/Setting.vue
+++ b/client/src/ui/components/bd/setting/Setting.vue
@@ -11,19 +11,21 @@
@@ -42,7 +44,9 @@
import FileSetting from './File.vue';
import GuildSetting from './Guild.vue';
import ArraySetting from './Array.vue';
+ import Collection from './Collection.vue';
import KeyValuePair from './KeyValuePair.vue';
+ import SecureKeyValuePair from './SecureKeyValuePair.vue';
import CustomSetting from './Custom.vue';
export default {
@@ -62,7 +66,9 @@
FileSetting,
GuildSetting,
ArraySetting,
+ Collection,
KeyValuePair,
+ SecureKeyValuePair,
CustomSetting
},
computed: {
diff --git a/client/src/ui/components/common/MaterialIcon.js b/client/src/ui/components/common/MaterialIcon.js
index c47eb91f..9840b262 100644
--- a/client/src/ui/components/common/MaterialIcon.js
+++ b/client/src/ui/components/common/MaterialIcon.js
@@ -18,3 +18,4 @@ export { default as MiInfo } from './materialicons/Info.vue';
export { default as MiWarning } from './materialicons/Warning.vue';
export { default as MiSuccess } from './materialicons/Success.vue';
export { default as AccountCircle } from './materialicons/AccountCircle.vue';
+export { default as MiLock } from './materialicons/Lock.vue';
diff --git a/client/src/ui/components/common/materialicons/Lock.vue b/client/src/ui/components/common/materialicons/Lock.vue
new file mode 100644
index 00000000..18ed6711
--- /dev/null
+++ b/client/src/ui/components/common/materialicons/Lock.vue
@@ -0,0 +1,27 @@
+/**
+ * BetterDiscord Material Design Icon
+ * 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.
+ *
+ * Material Design Icons
+ * Copyright (c) 2014 Google
+ * Apache 2.0 LICENSE
+ * https://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+
+
+
+
+
+
+
+
+
diff --git a/client/src/ui/components/sidebar/Button.vue b/client/src/ui/components/sidebar/Button.vue
index 5ec3c34b..0817a6de 100644
--- a/client/src/ui/components/sidebar/Button.vue
+++ b/client/src/ui/components/sidebar/Button.vue
@@ -9,13 +9,13 @@
*/
-
+
{{item.text}}
diff --git a/client/src/ui/components/sidebar/Item.vue b/client/src/ui/components/sidebar/Item.vue
index 64d3a170..df2d94d0 100644
--- a/client/src/ui/components/sidebar/Item.vue
+++ b/client/src/ui/components/sidebar/Item.vue
@@ -9,7 +9,7 @@
*/
-
+
@@ -18,7 +18,7 @@
import { SidebarHeader, SidebarButton } from './';
export default {
- props: ['item'],
+ props: ['item', 'active'],
components: {
SidebarHeader,
SidebarButton
diff --git a/client/src/ui/components/sidebar/index.js b/client/src/ui/components/sidebar/index.js
index cedb40f2..4a9b1685 100644
--- a/client/src/ui/components/sidebar/index.js
+++ b/client/src/ui/components/sidebar/index.js
@@ -3,4 +3,4 @@ export { default as Sidebar } from './Sidebar.vue';
export { default as SidebarHeader } from './Header.vue';
export { default as SidebarButton } from './Button.vue';
export { default as SidebarItem } from './Item.vue';
-export { default as ContentColumn } from './ContentColumn.vue';
\ No newline at end of file
+export { default as ContentColumn } from './ContentColumn.vue';
diff --git a/package-lock.json b/package-lock.json
index b78a6481..c939e1e3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,6 +55,12 @@
}
}
},
+ "aes256": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/aes256/-/aes256-1.0.4.tgz",
+ "integrity": "sha512-yuaKOdoKebChkP+uRsQovWsJYm6qf58cQTvXBu6MM0BMnrXZ9SXEiXREBuU513ZRr+Uo2qX/Ci6EODLUu/qiHA==",
+ "dev": true
+ },
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
diff --git a/package.json b/package.json
index b3b47fe0..03531f04 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"node-sass": "^4.9.2"
},
"devDependencies": {
+ "aes256": "^1.0.4",
"archiver": "^2.1.1",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",