diff --git a/client/src/builtin/E2EE.js b/client/src/builtin/E2EE.js index 8efeb151..a56d58e0 100644 --- a/client/src/builtin/E2EE.js +++ b/client/src/builtin/E2EE.js @@ -11,7 +11,7 @@ import BuiltinModule from './BuiltinModule'; import { WebpackModules, ReactComponents, MonkeyPatch, Patcher } from 'modules'; import { VueInjector, Reflection } from 'ui'; -import EmoteComponent from './EmoteComponent.vue'; +import E2EEComponent from './E2EEComponent.vue'; import aes256 from 'aes256'; export default new class E2EE extends BuiltinModule { @@ -30,11 +30,7 @@ export default new class E2EE extends BuiltinModule { if (!(retVal.props.children instanceof Array)) retVal.props.children = [retVal.props.children]; const inner = retVal.props.children.find(child => child.props.className && child.props.className.includes('inner')); - inner.props.children.splice(0, 0, VueInjector.createReactElement(EmoteComponent, { - src: 'https://static-cdn.jtvnw.net/emoticons/v1/354/1.0', - name: '4Head', - hasWrapper: false - }, true)); + inner.props.children.splice(0, 0, VueInjector.createReactElement(E2EEComponent, {}, true)); } handleSubmit(component, args, retVal) { diff --git a/client/src/builtin/E2EEComponent.vue b/client/src/builtin/E2EEComponent.vue new file mode 100644 index 00000000..21660241 --- /dev/null +++ b/client/src/builtin/E2EEComponent.vue @@ -0,0 +1,29 @@ +/** + * BetterDiscord E2EE 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/styles/partials/bdsettings/e2ee.scss b/client/src/styles/partials/bdsettings/e2ee.scss new file mode 100644 index 00000000..3fd121fe --- /dev/null +++ b/client/src/styles/partials/bdsettings/e2ee.scss @@ -0,0 +1,24 @@ +.bd-e2eeTaContainer { + display: flex; + + .bd-e2eeTaBtn { + padding: 10px; + display: flex; + flex: 1 1 auto; + flex-direction: row; + cursor: pointer; + + &.bd-e2eeLock { + fill: #cc3e3e; + } + } + + .bd-taDivider { + background-color: hsla(0,0%,100%,.1); + box-sizing: border-box; + height: 80%; + position: relative; + top: 10%; + width: 1px; + } +} diff --git a/client/src/styles/partials/bdsettings/index.scss b/client/src/styles/partials/bdsettings/index.scss index fbadb580..69a04481 100644 --- a/client/src/styles/partials/bdsettings/index.scss +++ b/client/src/styles/partials/bdsettings/index.scss @@ -9,3 +9,4 @@ @import './window-preferences'; @import './kvp'; @import './collection'; +@import './e2ee'; 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 +*/ + + +