diff --git a/css/common.css b/css/common.css index b5019c47..2dc3072b 100644 --- a/css/common.css +++ b/css/common.css @@ -105,3 +105,55 @@ background-color: #fd8; transition: background-color 0.2s ease-in; } + +::-ms-reveal { + display: none; +} + +.password-peek-container { + position: relative; +} + +button.toggle-password { + position: absolute; + top: 3px; + right: 4px; + z-index: 9; + width: 2rem; + height: 2rem; + background: 0; + border: 0; +} + +button.toggle-password:active, +button.toggle-password:focus, +button.toggle-password:hover { + cursor: pointer; +} + +button.toggle-password:focus { + outline: none !important; +} + +.input-password { + padding-right: calc(1.5em + 0.75rem); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.input-password[type=text] { + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z'/%3E%3Cpath d='M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z'/%3E%3Cpath d='M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709z'/%3E%3Cpath fill-rule='evenodd' d='M13.646 14.354l-12-12 .708-.708 12 12-.708.708z'/%3E%3C/svg%3E") !important; +} + +.input-password[type=password] { + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.134 13.134 0 0 0 1.66 2.043C4.12 11.332 5.88 12.5 8 12.5c2.12 0 3.879-1.168 5.168-2.457A13.134 13.134 0 0 0 14.828 8a13.133 13.133 0 0 0-1.66-2.043C11.879 4.668 10.119 3.5 8 3.5c-2.12 0-3.879 1.168-5.168 2.457A13.133 13.133 0 0 0 1.172 8z'/%3E%3Cpath fill-rule='evenodd' d='M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z'/%3E%3C/svg%3E") !important; +} + +[data-bs-theme=dark] .input-password[type=text] { + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23adb5bd' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z'/%3E%3Cpath d='M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z'/%3E%3Cpath d='M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709z'/%3E%3Cpath fill-rule='evenodd' d='M13.646 14.354l-12-12 .708-.708 12 12-.708.708z'/%3E%3C/svg%3E") !important; +} + +[data-bs-theme=dark] .input-password[type=password] { + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23adb5bd' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.134 13.134 0 0 0 1.66 2.043C4.12 11.332 5.88 12.5 8 12.5c2.12 0 3.879-1.168 5.168-2.457A13.134 13.134 0 0 0 14.828 8a13.133 13.133 0 0 0-1.66-2.043C11.879 4.668 10.119 3.5 8 3.5c-2.12 0-3.879 1.168-5.168 2.457A13.133 13.133 0 0 0 1.172 8z'/%3E%3Cpath fill-rule='evenodd' d='M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z'/%3E%3C/svg%3E") !important; +} diff --git a/i18n/ar.json b/i18n/ar.json index 1ba7dc63..5802ca54 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "نُسخ الرابط إلى الحافظة", "Document text": "لصق النص", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "مفتاح التبويب يعمل كشخصية (انقر Ctrl+m أو Esc للتبديل)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "السمة" } diff --git a/i18n/bg.json b/i18n/bg.json index 5aa0b00d..00a88cef 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/ca.json b/i18n/ca.json index 5c3c6073..bf25cea8 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/co.json b/i18n/co.json index b029068e..092f2f33 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "U liame hè statu cupiatu in u preme’papei", "Document text": "Testu di u ducumentu", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "U tastu di tabulazione ghjova cum’è un caratteru (Appughjate nant’à Ctrl+m o Scapp per scambià)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Tema" } diff --git a/i18n/cs.json b/i18n/cs.json index 3dfa081c..9dfcfc44 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Odkaz zkopírován do schránky", "Document text": "Text dokumentu", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulátor funguje jako znak (pro přepnutí stiskněte Ctrl+m nebo Esc)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Vzhled" } diff --git a/i18n/de.json b/i18n/de.json index c4ed5739..2746d07a 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Verknüpfung wurde in die Zwischenablage kopiert.", "Document text": "Text des Dokuments", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulatortaste als Zeichen interpretieren (Umschalten durch Strg+m oder Esc)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Design" } diff --git a/i18n/el.json b/i18n/el.json index 0be86a5c..ab6ad752 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/en.json b/i18n/en.json index c0d21fca..d6dc4ff3 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/es.json b/i18n/es.json index a792b5ab..6362e9e5 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/et.json b/i18n/et.json index dfa643e3..9b9a1242 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link kopeeriti lõikelauale", "Document text": "Kleebi tekst", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Teema" } diff --git a/i18n/fi.json b/i18n/fi.json index 185db758..4e1a1c77 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Linkki kopioitu leikepöydälle", "Document text": "Liitä teksti", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulaattori toimii merkkinä (Paina Ctrl+m tai Esc vaihtaaksesi)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Teema" } diff --git a/i18n/fr.json b/i18n/fr.json index 17b93f7a..180cb00e 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Lien copié dans le presse-papier", "Document text": "Texte du document", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "La touche de tabulation sert de caractère (Presser Ctrl+m ou Esc pour basculer)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Thème" } diff --git a/i18n/he.json b/i18n/he.json index 31d2afd9..2d3711fe 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "הקישור הועתק ללוח", "Document text": "הדבק טקסט", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "משטח ה-tab פועל כמקש תו (לחץ על Ctrl+m או Esc להחלפה)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "נושא" } diff --git a/i18n/hi.json b/i18n/hi.json index c0d21fca..d6dc4ff3 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/hu.json b/i18n/hu.json index b451a789..34f8a98b 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/id.json b/i18n/id.json index 89212292..44905fa8 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/it.json b/i18n/it.json index 1d91186c..2d0903da 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Testo del messaggio", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/ja.json b/i18n/ja.json index 54650f04..bda7740e 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/jbo.json b/i18n/jbo.json index 90160ecf..6bea3625 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/ko.json b/i18n/ko.json index c0d21fca..d6dc4ff3 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/ku.json b/i18n/ku.json index e72469d0..ba62f343 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/la.json b/i18n/la.json index 081d551f..51dc6e7d 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/lt.json b/i18n/lt.json index 02253d08..317c36b1 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/nl.json b/i18n/nl.json index 220ff9db..291a32b0 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link gekopieerd naar klembord", "Document text": "Tekst plakken", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulatortoets dient als teken (gebruik Ctrl+m of Esc om te schakelen)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Thema" } diff --git a/i18n/no.json b/i18n/no.json index 538364ec..5a01ae39 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/oc.json b/i18n/oc.json index 5ba5af14..fc813b72 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/pl.json b/i18n/pl.json index 68fcf2c6..9706fc47 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link został skopiowany do schowka", "Document text": "Tekst dokumentu", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Klawisz Tabulatora służy jako znak (przytrzymaj Ctrl+m lub Esc aby przełączać)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Motyw" } diff --git a/i18n/pt.json b/i18n/pt.json index 91d8ea4b..355fb1a2 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/ro.json b/i18n/ro.json index aaf35e0d..fed550da 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/ru.json b/i18n/ru.json index ee4c4013..6dbdac64 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Ссылка скопирована в буфер обмена", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Тема" } diff --git a/i18n/sk.json b/i18n/sk.json index 95dae475..df8cc16a 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Odkaz vložený do schránky", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/sl.json b/i18n/sl.json index 8098381b..9bfeb32e 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/sv.json b/i18n/sv.json index 8e9ac275..8eac7396 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/th.json b/i18n/th.json index d7d2a133..b8933015 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "คัดลอกลิงก์ไปที่คลิปบอร์ดแล้ว", "Document text": "ฝากข้อความ", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "ปุ่ม Tabulator ใช้เป็นอักขระ (กด Ctrl+m หรือ Esc เพื่อสลับ)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "ธีม" } diff --git a/i18n/tr.json b/i18n/tr.json index c5f6ab21..a499c420 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/uk.json b/i18n/uk.json index efdbc89e..218929de 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "Link copied to clipboard", "Document text": "Document text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "Theme" } diff --git a/i18n/zh.json b/i18n/zh.json index 12aa7d71..d667ed1d 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -229,5 +229,7 @@ "Link copied to clipboard": "链接已复制到剪贴板", "Document text": "粘贴文本", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tab 键可作为字符(按 Ctrl+mEsc 切换开关)", + "Show password as plain text. Warning: this will display your password on the screen.": "Show password as plain text. Warning: this will display your password on the screen.", + "Hide password": "Hide password", "Theme": "主题" } diff --git a/js/privatebin.js b/js/privatebin.js index 2ee9ad7e..bb67d99e 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2132,7 +2132,7 @@ jQuery.PrivateBin = (function($) { // if so, we send the link to the shortener // we do not remove the button, in case shortener fails sendToShortener(); - } + } } /** @@ -5674,6 +5674,48 @@ jQuery.PrivateBin = (function($) { return me; })(); + /** + * + * @name PasswordPeek + * @class + */ + const PasswordPeek = (function () { + const me = {}; + + /** + * Switch between visible and hidden password + * + * @name PasswordPeek.handleRevealButtonClick + * @private + * @function + */ + function handleRevealButtonClick() { + const passwordInput = $(this).siblings('.input-password'); + const isHidden = passwordInput.attr('type') === 'password'; + + passwordInput.attr('type', isHidden ? 'text' : 'password'); + + const tooltip = I18n._(isHidden ? 'Hide password' : 'Show password as plain text. Warning: this will display your password on the screen.'); + + $(this).attr('title', tooltip); + $(this).attr('aria-label', tooltip); + } + + /** + * Initialize + * + * @name PasswordPeek.init + * @function + */ + me.init = function() { + const revealButton = $('.toggle-password'); + + revealButton.click(handleRevealButtonClick); + }; + + return me; + })(); + /** * (controller) main PrivateBin logic * @@ -5922,6 +5964,7 @@ jQuery.PrivateBin = (function($) { TopNav.init(); UiHelper.init(); CopyToClipboard.init(); + PasswordPeek.init(); // check for legacy browsers before going any further if (!Legacy.Check.getInit()) { @@ -5981,6 +6024,7 @@ jQuery.PrivateBin = (function($) { ServerInteraction: ServerInteraction, PasteEncrypter: PasteEncrypter, PasteDecrypter: PasteDecrypter, + PasswordPeek: PasswordPeek, CopyToClipboard: CopyToClipboard, Controller: Controller }; diff --git a/lib/Configuration.php b/lib/Configuration.php index b139903e..63e1f16f 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -121,7 +121,7 @@ class Configuration 'js/kjua-0.10.0.js' => 'sha512-BYj4xggowR7QD150VLSTRlzH62YPfhpIM+b/1EUEr7RQpdWAGKulxWnOvjFx1FUlba4m6ihpNYuQab51H6XlYg==', 'js/legacy.js' => 'sha512-08+subq1Lo+r+la5ENqeXiMgNJcVaaTtBIFGkrjziSpvtgCId3Jtin4/OkSdHYSoeztwwIab8uvCzPKHta6puQ==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-Cor4acli/veLhX81YVTGQNkQ+poXsz0gRQUmLeJ6WebIXUlUi7ZQZ6lk1oIYesnBG3cV/stVT07cdVsByXoaJA==', + 'js/privatebin.js' => 'sha512-WUwQX00pq9GWmMcB+umoiizpmlfGz9LjxAlUXzsNxjPh8vEcuy0gQ0lolidPmBPeNVBDzeh0DOmZ+h4gSH6ekw==', 'js/purify-3.2.6.js' => 'sha512-zqwL4OoBLFx89QPewkz4Lz5CSA2ktU+f31fuECkF0iK3Id5qd3Zpq5dMby8KwHjIEpsUgOqwF58cnmcaNem0EA==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', 'js/zlib-1.3.1-1.js' => 'sha512-5bU9IIP4PgBrOKLZvGWJD4kgfQrkTz8Z3Iqeu058mbQzW3mCumOU6M3UVbVZU9rrVoVwaW4cZK8U8h5xjF88eQ==', diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 099b2558..b57dc40e 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -109,7 +109,13 @@ if (count($class)) {
- +
+ + +
@@ -368,7 +374,13 @@ if ($PASSWORD) : ?>
  • - + @@ -243,7 +249,13 @@ if ($PASSWORD) : ?>