Skip to content

Commit cb29e32

Browse files
authored
5.0.1
5.0.1
2 parents 6001640 + 6eef3ee commit cb29e32

File tree

12 files changed

+256
-47
lines changed

12 files changed

+256
-47
lines changed

_locales/en/messages.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
"message": "Account",
6060
"description": "Account."
6161
},
62+
"accountName": {
63+
"message": "Account name",
64+
"description": "Account Name."
65+
},
66+
"username": {
67+
"message": "Username",
68+
"description": "Username."
69+
},
6270
"secret": {
6371
"message": "Secret",
6472
"description": "Secret."
@@ -196,9 +204,17 @@
196204
"description": "Download backup file."
197205
},
198206
"import_backup": {
207+
"message": "Import Backup",
208+
"description": "Import backup."
209+
},
210+
"import_backup_file": {
199211
"message": "Import Backup File",
200212
"description": "Import backup file."
201213
},
214+
"import_backup_code": {
215+
"message": "Import Backup Code",
216+
"description": "Import backup code."
217+
},
202218
"dropbox_backup": {
203219
"message": "Auto Backup to Dropbox",
204220
"description": "Auto backup to Dropbox."
@@ -220,7 +236,7 @@
220236
"description": "Show all entries."
221237
},
222238
"dropbox_risk": {
223-
"message": "Backups saved in Dropbox are unencrypted (even if you have set a passphrase), use it at your own risk.",
239+
"message": "Warning: backups saved in Dropbox are unencrypted. Use at your own risk.",
224240
"description": "Dropbox backup risk warning."
225241
}
226242
}

_locales/zh_CN/messages.json

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"extName": {
33
"message": "身份验证器",
44
"description": "Extension Name."
@@ -24,7 +24,7 @@
2424
"description": "Secret Error."
2525
},
2626
"info": {
27-
"message": "<p><strong>Authenticator</strong> for Google&trade; Authenticator,<br/>&copy; 2018 <a target='_blank' href='https://github.com/Authenticator-Extension'>Authenticator Extension</a>. Released under the MIT License.</p><p>Google&trade;是Google的商标,Google Authenticator是Google的商品名,以上所有权归Google公司所有。</p><p><a target='_blank' href='https://github.com/LazarSoft/jsqrcode'>jsqrcode</a>的所有权归jsqrcode的作者所有。以Apache协议授权。</p><p><a target='_blank' href='https://github.com/zxing/zxing'>ZXing</a>的所有权归ZXing的作者所有。以Apache协议授权。</p><p><a target='_blank' href='http://blog.tinisles.com/2011/10/google-authenticator-one-time-password-algorithm-in-javascript/'>totp.js</a>的所有权归其作者所有。以MIT协议授权。</p><p><a target='_blank' href='http://caligatio.github.com/jsSHA/'>jsSHA</a>的所有权归jsSHA的作者所有。以BSD协议授权。</p><p><a target='_blank' href='http://davidshimjs.github.io/qrcodejs/'>qrcode.js</a>的所有权归qrcode.js作者所有。以MIT协议授权。</p><p><a target='_blank' href='https://code.google.com/p/crypto-js/'>crypto-js</a>的所有权归crypto-js作者所有。以BSD协议授权。</p><p><a target='_blank' href='https://www.google.com/fonts/specimen/Droid+Sans+Mono'>Droid Sans Mono</a>的所有权归Steve Matteson所有。以Apache协议授权。</p><p><a target='_blank' href='http://fontawesome.io'>Font Awesome</a>的所有权归Dave Gandy所有。以SIL OFL协议1.1授权。</p><p>感谢 <a target='_blank' href='https://github.com/multiwebinc'>Mike Robinson</a> &lt;3</p>",
27+
"message": "<p><strong>Authenticator<\/strong> for Google&trade; Authenticator,<br\/>&copy; 2018 <a target='_blank' href='https:\/\/github.com\/Authenticator-Extension'>Authenticator Extension<\/a>. Released under the MIT License.<\/p><p>Google&trade;是Google的商标,Google Authenticator是Google的商品名,以上所有权归Google公司所有。<\/p><p><a target='_blank' href='https:\/\/github.com\/LazarSoft\/jsqrcode'>jsqrcode<\/a>的所有权归jsqrcode的作者所有。以Apache协议授权。<\/p><p><a target='_blank' href='https:\/\/github.com\/zxing\/zxing'>ZXing<\/a>的所有权归ZXing的作者所有。以Apache协议授权。<\/p><p><a target='_blank' href='http:\/\/blog.tinisles.com\/2011\/10\/google-authenticator-one-time-password-algorithm-in-javascript\/'>totp.js<\/a>的所有权归其作者所有。以MIT协议授权。<\/p><p><a target='_blank' href='http:\/\/caligatio.github.com\/jsSHA\/'>jsSHA<\/a>的所有权归jsSHA的作者所有。以BSD协议授权。<\/p><p><a target='_blank' href='http:\/\/davidshimjs.github.io\/qrcodejs\/'>qrcode.js<\/a>的所有权归qrcode.js作者所有。以MIT协议授权。<\/p><p><a target='_blank' href='https:\/\/code.google.com\/p\/crypto-js\/'>crypto-js<\/a>的所有权归crypto-js作者所有。以BSD协议授权。<\/p><p><a target='_blank' href='https:\/\/www.google.com\/fonts\/specimen\/Droid+Sans+Mono'>Droid Sans Mono<\/a>的所有权归Steve Matteson所有。以Apache协议授权。<\/p><p><a target='_blank' href='http:\/\/fontawesome.io'>Font Awesome<\/a>的所有权归Dave Gandy所有。以SIL OFL协议1.1授权。<\/p><p>感谢 <a target='_blank' href='https:\/\/github.com\/multiwebinc'>Mike Robinson<\/a> &lt;3<\/p>",
2828
"description": "Information."
2929
},
3030
"add_qr": {
@@ -44,8 +44,8 @@
4444
"description": "OK."
4545
},
4646
"yes": {
47-
"message": "",
48-
"description": "Yes."
47+
"message": "",
48+
"description": "Yes."
4949
},
5050
"no": {
5151
"message": "",
@@ -59,6 +59,14 @@
5959
"message": "账户",
6060
"description": "Account."
6161
},
62+
"accountName": {
63+
"message": "账户名称",
64+
"description": "Account Name."
65+
},
66+
"username": {
67+
"message": "用户名",
68+
"description": "Username."
69+
},
6270
"secret": {
6371
"message": "密钥",
6472
"description": "Secret."
@@ -76,7 +84,7 @@
7684
"description": "About."
7785
},
7886
"export_import": {
79-
"message": "导出 / 导入",
87+
"message": "导出 \/ 导入",
8088
"description": "Export and Import."
8189
},
8290
"settings": {
@@ -89,39 +97,39 @@
8997
},
9098
"current_phrase": {
9199
"message": "当前密码",
92-
"description": "Current Phrase."
100+
"description": "Current Passphrase."
93101
},
94102
"new_phrase": {
95103
"message": "新密码",
96-
"description": "New Phrase."
104+
"description": "New Passphrase."
97105
},
98106
"phrase": {
99107
"message": "密码",
100-
"description": "Phrase."
108+
"description": "Passphrase."
101109
},
102110
"confirm_phrase": {
103111
"message": "确认密码",
104-
"description": "Confirmm Phrase."
112+
"description": "Confirmm Passphrase."
105113
},
106-
"confirm_delete" : {
107-
"message": "您确定要删除此密钥吗?您无法找回已删除的密钥。此操作无法撤销。",
114+
"confirm_delete": {
115+
"message": "您确定要删除此密钥吗?此操作无法撤销。",
108116
"description": "Remove entry confirmation"
109117
},
110118
"security_warning": {
111119
"message": "您的密钥将使用此密码进行加密。如果您忘记了密码没有人能够提供帮助。",
112-
"description": "Phrase Warning."
120+
"description": "Passphrase Warning."
113121
},
114122
"update": {
115123
"message": "更新",
116124
"description": "Update."
117125
},
118126
"phrase_incorrect": {
119127
"message": "部分账户与密码不匹配,您无法添加新账户、导出账户数据或者更改密码。请提供正确的密码后重试。",
120-
"description": "Phrase Incorrect."
128+
"description": "Passphrase Incorrect."
121129
},
122130
"phrase_not_match": {
123131
"message": "两次密码不一致。",
124-
"description": "Phrase Not Match."
132+
"description": "Passphrase Not Match."
125133
},
126134
"encrypted": {
127135
"message": "已加密",
@@ -160,7 +168,7 @@
160168
"description": "Local Time is Too Far Off"
161169
},
162170
"remind_backup": {
163-
"message": "您是否为密钥创建了备份?请注意,没有人可以帮助您找回被锁定的账户,不要等到为时已晚。我们将在30天后再次提醒您进行备份",
171+
"message": "您是否为密钥创建了备份?不要等到为时已晚。",
164172
"description": "Remind Backup"
165173
},
166174
"capture_failed": {
@@ -196,9 +204,17 @@
196204
"description": "Download backup file."
197205
},
198206
"import_backup": {
207+
"message": "导入备份",
208+
"description": "Import backup."
209+
},
210+
"import_backup_file": {
199211
"message": "导入备份文件",
200212
"description": "Import backup file."
201213
},
214+
"import_backup_code": {
215+
"message": "导入备份代码",
216+
"description": "Import backup code."
217+
},
202218
"dropbox_backup": {
203219
"message": "自动备份至Dropbox",
204220
"description": "Auto backup to Dropbox."
@@ -220,7 +236,7 @@
220236
"description": "Show all entries."
221237
},
222238
"dropbox_risk": {
223-
"message": "保存至Dropbox的备份没有加密(即使您已设置了密码),使用此功能需要您自担风险",
239+
"message": "警告:保存至Dropbox的备份均未备份,您需自担风险",
224240
"description": "Dropbox backup risk warning."
225241
}
226-
}
242+
}

css/import.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[v-cloak] { display: none }
2+
3+
#authenticator {
4+
width: 600px;
5+
position: relative;
6+
margin: 0 auto;
7+
}
8+
9+
.import_tab {
10+
text-align: center;
11+
font-size: 0;
12+
}
13+
14+
.import_tab input {
15+
display: none;
16+
}
17+
18+
.import_tab label {
19+
width: 250px;
20+
height: 50px;
21+
line-height: 50px;
22+
font-size: 18px;
23+
text-align: center;
24+
display: inline-block;
25+
margin: 20px;
26+
cursor: pointer;
27+
border-radius: 2px;
28+
}
29+
30+
.import_tab input:checked + label,
31+
.import_tab label:hover {
32+
background: #eee;
33+
}
34+
35+
.import_file {
36+
text-align: center;
37+
}
38+
39+
.import_file input {
40+
display: none;
41+
}
42+
43+
button,
44+
.import_file label {
45+
display: inline-block;
46+
width: 260px;
47+
height: 60px;
48+
line-height: 60px;
49+
border: #CCC 1px solid;
50+
background: white;
51+
border-radius: 2px;
52+
position: relative;
53+
text-align: center;
54+
font-size: 16px;
55+
color: gray;
56+
cursor: pointer;
57+
outline: none;
58+
}
59+
60+
button:hover,
61+
.import_file label:hover {
62+
color: black;
63+
}
64+
65+
.import_encrypted {
66+
margin-bottom: 20px;
67+
}
68+
69+
.import_encrypted input {
70+
margin-left: 0;
71+
}
72+
73+
.import_code {
74+
float: left;
75+
margin-left: 30px;
76+
margin-right: 40px;
77+
}
78+
79+
.import_code textarea {
80+
width: 250px;
81+
height: 400px;
82+
padding: 10px;
83+
outline: none;
84+
resize: none;
85+
box-sizing: border-box;
86+
}
87+
88+
.import_passphrase input {
89+
padding: 10px;
90+
margin-bottom: 20px;
91+
width: 250px;
92+
border: #CCC 1px solid;
93+
background: white;
94+
outline: none;
95+
}

css/popup.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ body {
132132
text-align: center;
133133
font-size: 16px;
134134
border-bottom: #CCC 1px solid;
135+
user-select: none;
136+
-moz-user-select: none;
135137
}
136138

137139
#notification {
@@ -346,6 +348,7 @@ body {
346348
#add_secret,
347349
#add_button,
348350
#download_backup,
351+
#import_backup,
349352
#upload_backup,
350353
#security_save,
351354
#passphrase_ok,
@@ -549,9 +552,6 @@ body {
549552
color: black;
550553
}
551554

552-
#menu .menuList p:hover:after {
553-
color: black;
554-
}
555555

556556
#menu .menuList p:last-child {
557557
border-bottom: none;
@@ -625,6 +625,7 @@ body {
625625
#add_qr:hover,
626626
#upload_backup:hover,
627627
#download_backup:hover,
628+
#import_backup:hover,
628629
#editAction:hover,
629630
#infoAction:hover,
630631
#scan:hover,
@@ -638,7 +639,12 @@ body {
638639
#dropbox_ok:hover,
639640
#export:hover,
640641
#resizeClose:hover,
641-
#resize_save:hover {
642+
#resize_save:hover,
643+
#confirm_cancel:hover,
644+
#confirm_ok:hover,
645+
#menu .menuList p:hover:after,
646+
.entry:hover .movehandle,
647+
.showqr:hover {
642648
color: black;
643649
}
644650

@@ -762,7 +768,8 @@ body {
762768
z-index: 1000;
763769
}
764770

765-
#download_backup {
771+
#download_backup,
772+
#import_backup {
766773
text-decoration: none;
767774
color: gray;
768775
display: block;

import.html

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<html>
22
<head>
33
<meta charset="utf-8"/>
4-
<title>Import Backup</title>
4+
<title> </title>
5+
<script src="js/import.js"></script>
6+
<link rel="stylesheet" href="css/import.css" type="text/css" charset="utf-8">
57
<script src="js/vue.min.js"></script>
68
<script src="js/vue-dragula.js"></script>
79
<script src="js/md5.js"></script>
@@ -16,8 +18,31 @@
1618
<script src="build/models/dropbox.js"></script>
1719
</head>
1820
<body>
19-
<div id="authenticator">
20-
<input id="import_file" type="file" v-on:change="importFile($event, true)" accept="application/json"></input>
21+
<div id="authenticator" v-cloak>
22+
<div class="import_tab">
23+
<input type="radio" id="import_file_radio" value="import_file" v-model="importType">
24+
<label for="import_file_radio">{{ i18n.import_backup_file }}</label>
25+
<input type="radio" id="import_code_radio" value="import_code" v-model="importType">
26+
<label for="import_code_radio">{{ i18n.import_backup_code }}</label>
27+
</div>
28+
<div class="import_file" v-show="importType === 'import_file'">
29+
<label for="import_file">{{ i18n.import_backup_file }}</label>
30+
<input id="import_file" type="file" v-on:change="importFile($event, true)" accept="application/json"></input>
31+
</div>
32+
<div v-show="importType === 'import_code'">
33+
<div class="import_code">
34+
<textarea spellcheck="false" v-model="importCode"></textarea>
35+
</div>
36+
<div class="import_encrypted">
37+
<input type="checkbox" id="encryptedCode" v-model="importEncrypted">
38+
<label for="encryptedCode">{{ i18n.encrypted }}</label>
39+
</div>
40+
<div class="import_passphrase" v-show="importEncrypted">
41+
<label for="import_passphrase">{{ i18n.phrase }}</label>
42+
<input id="import_passphrase" type="password" v-model="importPassphrase">
43+
</div>
44+
<button v-on:click="importBackupCode()">{{ i18n.import_backup_code }}</button>
45+
</div>
2146
</div>
2247
<script src="build/ui/add-account.js"></script>
2348
<script src="build/ui/class.js"></script>

js/import.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
document.title = chrome.i18n.getMessage('import_backup');

manifest-chrome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "__MSG_extName__",
44
"short_name": "__MSG_extShortName__",
5-
"version": "5.0",
5+
"version": "5.0.1",
66
"default_locale": "en",
77
"description": "__MSG_extDesc__",
88
"icons": {

0 commit comments

Comments
 (0)