From 673bd490951612568cd48af2f7c3b89accd64ac9 Mon Sep 17 00:00:00 2001 From: djmaze Date: Thu, 25 Mar 2021 10:08:29 +0100 Subject: [PATCH] Improvements for #62 --- dev/External/ko.js | 12 +---------- .../app/templates/Views/Admin/AdminLogin.html | 2 +- .../0.0.0/app/templates/Views/User/Login.html | 17 +++++++--------- .../templates/Views/User/MailFolderList.html | 6 +++--- .../templates/Views/User/MailMessageList.html | 18 ++++++++--------- .../templates/Views/User/MailMessageView.html | 20 +++++++++---------- .../templates/Views/User/PopupsCompose.html | 8 ++++---- .../templates/Views/User/PopupsContacts.html | 8 ++++---- .../Views/User/PopupsSieveScript.html | 3 +-- .../User/PopupsTwoFactorConfiguration.html | 2 +- .../Views/User/SettingsFolderItem.html | 6 +++--- .../templates/Views/User/SettingsOpenPGP.html | 2 +- 12 files changed, 45 insertions(+), 59 deletions(-) diff --git a/dev/External/ko.js b/dev/External/ko.js index 92bd36173..b776995b1 100644 --- a/dev/External/ko.js +++ b/dev/External/ko.js @@ -1,4 +1,4 @@ -import { i18n, i18nToNodes, trigger } from 'Common/Translator'; +import { i18nToNodes } from 'Common/Translator'; import { doc, createElement } from 'Common/Globals'; import { SaveSettingsStep } from 'Common/Enums'; import { isNonEmptyArray, isFunction } from 'Common/Utils'; @@ -6,16 +6,6 @@ import { isNonEmptyArray, isFunction } from 'Common/Utils'; const koValue = value => !ko.isObservable(value) && isFunction(value) ? value() : ko.unwrap(value); -ko.bindingHandlers.tooltip = { - init: (element, fValueAccessor) => { - const sValue = koValue(fValueAccessor()); - element.title = i18n(sValue); - trigger.subscribe(() => element.title = i18n(sValue)); - }, - update: (element, fValueAccessor) => - element.title = i18n(koValue(fValueAccessor())) -}; - ko.bindingHandlers.tooltipErrorTip = { init: element => { doc.addEventListener('click', () => element.removeAttribute('data-rainloopErrorTip')); diff --git a/snappymail/v/0.0.0/app/templates/Views/Admin/AdminLogin.html b/snappymail/v/0.0.0/app/templates/Views/Admin/AdminLogin.html index 301d427fc..7b3a51ab1 100644 --- a/snappymail/v/0.0.0/app/templates/Views/Admin/AdminLogin.html +++ b/snappymail/v/0.0.0/app/templates/Views/Admin/AdminLogin.html @@ -23,7 +23,7 @@ autocomplete="current-password" autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD" data-bind="textInput: password, disable: submitRequest" /> - + 🔑 diff --git a/snappymail/v/0.0.0/app/templates/Views/User/Login.html b/snappymail/v/0.0.0/app/templates/Views/User/Login.html index b2707d124..1c6ba6e93 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/Login.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/Login.html @@ -1,7 +1,6 @@