From c122457565540482a104f97d8c150c9fcbb3f72e Mon Sep 17 00:00:00 2001 From: Mega-Mewthree Date: Sat, 11 Aug 2018 10:11:56 -0700 Subject: [PATCH] Style the lock context menu. --- client/src/builtin/E2EEComponent.vue | 18 ++++++++------- .../src/styles/partials/bdsettings/e2ee.scss | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/client/src/builtin/E2EEComponent.vue b/client/src/builtin/E2EEComponent.vue index bc5dd14a..dde55fbd 100644 --- a/client/src/builtin/E2EEComponent.vue +++ b/client/src/builtin/E2EEComponent.vue @@ -9,7 +9,7 @@ */ @@ -48,10 +48,12 @@ } function computeSharedSecret() { - const userID = location.pathname.split("/")[3]; - const otherPublicKey = document.getElementsByClassName("da-textArea")[0].value; - const secret = E2EE.computeSecret(userID, otherPublicKey); - clipboard.writeText(secret); + try { + const userID = location.pathname.split("/")[3]; + const otherPublicKey = document.getElementsByClassName("da-textArea")[0].value; + const secret = E2EE.computeSecret(userID, otherPublicKey); + clipboard.writeText(secret); + } catch (e) {} } export default { diff --git a/client/src/styles/partials/bdsettings/e2ee.scss b/client/src/styles/partials/bdsettings/e2ee.scss index b0aaba54..d7166fa3 100644 --- a/client/src/styles/partials/bdsettings/e2ee.scss +++ b/client/src/styles/partials/bdsettings/e2ee.scss @@ -39,6 +39,29 @@ height: 37px; margin-top: 5px; } + + .bd-e2eeLockContextMenu { + + border: none; + + .ctx-menu { + background: #23272A; + border-radius: 4px; + box-shadow: none; + padding: 0; + + .bd-e2eeLockContextMenuOption { + background: #23272A; + color: #99AAB5; + padding: 5px 5px; + cursor: default; + + &:hover { + background: #000000; + } + } + } + } } .bd-e2eeMdContainer {