From 5f8f70d739a67a9c3277e3d6bc426a0367c16ce1 Mon Sep 17 00:00:00 2001 From: mymindstorm Date: Mon, 9 Jul 2018 14:28:56 -0500 Subject: [PATCH 01/29] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d9db3f865..d18a6b5ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ jobs: - stage: deploy # release tagging script: bash ci/tag.sh - if: branch = release + if: branch = release AND type != pull_request From 8a7453938699bbfc55f1adbd5ad32c2040ee6ce1 Mon Sep 17 00:00:00 2001 From: Li Zhe Date: Tue, 10 Jul 2018 23:53:30 +0800 Subject: [PATCH 02/29] use svg sector --- css/popup.css | 22 ++++++++++++++++++++++ src/ui/entry.ts | 28 ++++++++-------------------- view/popup.html | 6 +++++- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/css/popup.css b/css/popup.css index 77261e423..1c3051577 100644 --- a/css/popup.css +++ b/css/popup.css @@ -563,6 +563,28 @@ body { bottom: 10px; } +@keyframes timer { + to { + stroke-dashoffset: -25.12; + } +} + +.sector svg { + width: 16px; + height: 16px; + margin: 2px; +} + +.sector circle { + fill: none; + transform: rotate(-90deg); + transform-origin: 50% 50%; + stroke: gray; + stroke-width: 8px; + stroke-dasharray: 25.12; + animation: 30s linear infinite timer; +} + #codes.edit .sector, #codes.edit .counter { display: none; diff --git a/src/ui/entry.ts b/src/ui/entry.ts index c252567d5..38be4a35e 100644 --- a/src/ui/entry.ts +++ b/src/ui/entry.ts @@ -14,10 +14,15 @@ async function getEntries(encryption: Encryption) { async function updateCode(app: any) { let second = new Date().getSeconds(); if (localStorage.offset) { + // prevent second from negative second += Number(localStorage.offset) + 30; } second = second % 30; - app.sector = getSector(second); + if (!app.sectorStart) { + app.sectorStart = true; + app.sectorOffset = -second; + } + if (second > 25) { app.class.timeout = true; } else { @@ -34,25 +39,6 @@ async function updateCode(app: any) { } } -function getSector(second: number) { - const canvas = document.createElement('canvas'); - canvas.width = 40; - canvas.height = 40; - const ctx = canvas.getContext('2d'); - if (!ctx) { - return; - } - ctx.fillStyle = '#888'; - ctx.beginPath(); - ctx.moveTo(20, 20); - ctx.arc( - 20, 20, 16, second / 30 * Math.PI * 2 - Math.PI / 2, Math.PI * 3 / 2, - false); - ctx.fill(); - const url = canvas.toDataURL(); - return `url(${url}) center / 20px 20px`; -} - function getBackupFile(entryData: {[hash: string]: OTPStorage}) { let json = JSON.stringify(entryData, null, 2); // for windows notepad @@ -231,6 +217,8 @@ async function entry(_ui: UI) { exportEncryptedFile, getFilePassphrase: false, sector: '', + sectorStart: false, + sectorOffset: 0, notification: '', notificationTimeout: 0, filter: true, diff --git a/view/popup.html b/view/popup.html index c13a9395b..1295210ba 100644 --- a/view/popup.html +++ b/view/popup.html @@ -43,7 +43,11 @@
-
+
+ + + +
{{ entry.issuer.split('::')[0] }}
From 84e0ac4753abcef48c566b245e83d3373e8206c1 Mon Sep 17 00:00:00 2001 From: Li Zhe Date: Wed, 11 Jul 2018 00:03:43 +0800 Subject: [PATCH 03/29] fix css timer issue --- css/popup.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/css/popup.css b/css/popup.css index 1c3051577..dedcd8a2e 100644 --- a/css/popup.css +++ b/css/popup.css @@ -212,7 +212,12 @@ body { #codes.filter .entry[filtered], #codes.search .entry[notSearched] { - display: none; + height: 0; + margin: 0; + padding: 0; + opacity: 0; + border: none; + overflow: hidden; } #filter, From 25d67424a189b60a6f872ebffab92482eed43f29 Mon Sep 17 00:00:00 2001 From: mymindstorm Date: Tue, 10 Jul 2018 18:45:41 -0500 Subject: [PATCH 04/29] Update about page --- view/popup.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/view/popup.html b/view/popup.html index c13a9395b..058821536 100644 --- a/view/popup.html +++ b/view/popup.html @@ -93,16 +93,17 @@
-

Authenticator for Google™ Authenticator,
© 2018 Authenticator Extension. Released under the MIT License.

-

Google™ is Google's trademark, Google Authenticator is Google’s trade name, those rights of ownership belong with Google Inc.

+

Authenticator © 2018 Authenticator Extension. Released under the MIT License.

+

Google is a trademark of Google LLC.

jsqrcode Copyright jsqrcode authors. Licensed under the Apache License.

ZXing Copyright ZXing authors. Licensed under the Apache License.

-

totp.js Copyright its author. Licensed under the MIT License.

-

jsSHA Copyright jsSHA authors. Licensed under the BSD License.

-

qrcode.js Copyright qrcode.js author. Licensed under the MIT License.

-

crypto-js Copyright crypto-js author. Licensed under the BSD License.

-

Droid Sans Mono Copyright Steve Matteson. Licensed under the Apache License.

+

totp.js Copyright Russ Sayers. Licensed under the MIT License.

+

jsSHA Copyright Brian Turek. Licensed under the BSD License.

+

qrcode.js Copyright Shim Sangmin. Licensed under the MIT License.

+

crypto-js Copyright Jeff Mott. Licensed under the BSD License.

+

Droid Sans Mono Copyright Steve Matteson. Licensed under the Apache License.

Font Awesome Copyright Dave Gandy. Licensed under the SIL OFL License 1.1.

+

vue.js Copyright Evan You. Licensed under the MIT License.

Thanks to Mike Robinson <3

QR Debugging

From 13f17f4fd4456e334c51c00fcdbc902de2e547e6 Mon Sep 17 00:00:00 2001 From: mymindstorm Date: Tue, 10 Jul 2018 18:48:49 -0500 Subject: [PATCH 05/29] Sort about page alphabetically --- view/popup.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/view/popup.html b/view/popup.html index 058821536..b8410b819 100644 --- a/view/popup.html +++ b/view/popup.html @@ -94,16 +94,16 @@

Authenticator © 2018 Authenticator Extension. Released under the MIT License.

+

crypto-js Copyright Jeff Mott. Licensed under the BSD License.

+

Droid Sans Mono Copyright Steve Matteson. Licensed under the Apache License.

+

Font Awesome Copyright Dave Gandy. Licensed under the SIL OFL License 1.1.

Google is a trademark of Google LLC.

jsqrcode Copyright jsqrcode authors. Licensed under the Apache License.

-

ZXing Copyright ZXing authors. Licensed under the Apache License.

-

totp.js Copyright Russ Sayers. Licensed under the MIT License.

jsSHA Copyright Brian Turek. Licensed under the BSD License.

qrcode.js Copyright Shim Sangmin. Licensed under the MIT License.

-

crypto-js Copyright Jeff Mott. Licensed under the BSD License.

-

Droid Sans Mono Copyright Steve Matteson. Licensed under the Apache License.

-

Font Awesome Copyright Dave Gandy. Licensed under the SIL OFL License 1.1.

+

totp.js Copyright Russ Sayers. Licensed under the MIT License.

vue.js Copyright Evan You. Licensed under the MIT License.

+

ZXing Copyright ZXing authors. Licensed under the Apache License.

Thanks to Mike Robinson <3

QR Debugging

From 98959a8d973582b562d901bc23ac6e97ec80d623 Mon Sep 17 00:00:00 2001 From: mymindstorm Date: Tue, 10 Jul 2018 19:10:55 -0500 Subject: [PATCH 06/29] Add new dependencies to about page --- view/popup.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/view/popup.html b/view/popup.html index b8410b819..acb8cff00 100644 --- a/view/popup.html +++ b/view/popup.html @@ -94,15 +94,19 @@

Authenticator © 2018 Authenticator Extension. Released under the MIT License.

+

Google is a trademark of Google LLC.

crypto-js Copyright Jeff Mott. Licensed under the BSD License.

Droid Sans Mono Copyright Steve Matteson. Licensed under the Apache License.

Font Awesome Copyright Dave Gandy. Licensed under the SIL OFL License 1.1.

-

Google is a trademark of Google LLC.

-

jsqrcode Copyright jsqrcode authors. Licensed under the Apache License.

+

fs-extra Copyright JP Richardson. Licensed under the MIT License.

+

jsqrcode Copyright Lazar Laszlo. Licensed under the Apache License.

jsSHA Copyright Brian Turek. Licensed under the BSD License.

qrcode.js Copyright Shim Sangmin. Licensed under the MIT License.

totp.js Copyright Russ Sayers. Licensed under the MIT License.

+

ts-style Copyright Google Inc. Licensed under the Apache License.

+

TypeScript Copyright Microsoft Corporation. Licensed under the Apache License.

vue.js Copyright Evan You. Licensed under the MIT License.

+

vue-dragula Copyright Yichang Liu. Licensed under the MIT License.

ZXing Copyright ZXing authors. Licensed under the Apache License.

Thanks to Mike Robinson <3

QR Debugging

From 30bd18969a4c7edb7f34d96a32d030f0d2fb0876 Mon Sep 17 00:00:00 2001 From: Zhe Li Date: Wed, 11 Jul 2018 17:58:06 +0800 Subject: [PATCH 07/29] fix margin issue --- css/popup.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/popup.css b/css/popup.css index dedcd8a2e..ea41190db 100644 --- a/css/popup.css +++ b/css/popup.css @@ -218,6 +218,7 @@ body { opacity: 0; border: none; overflow: hidden; + position: absolute; } #filter, From af8e52a10a658fdca3772f0c40222c44d27343fe Mon Sep 17 00:00:00 2001 From: mymindstorm Date: Mon, 16 Jul 2018 14:19:25 -0500 Subject: [PATCH 08/29] Fix issue with search not updating in some cases --- view/popup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/popup.html b/view/popup.html index d01760521..f2fcfff45 100644 --- a/view/popup.html +++ b/view/popup.html @@ -32,7 +32,7 @@
{{ i18n.show_all_entries }}