Skip to content

Commit d2de46e

Browse files
committed
fix: increase QR code size
1 parent 04432df commit d2de46e

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/UI/UIDesktop.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,10 @@ $(document).on('contextmenu taphold', '.taskbar', function(event){
10721072
})
10731073

10741074
$(document).on('click', '.qr-btn', async function (e) {
1075-
UIWindowQR();
1075+
UIWindowQR({
1076+
message_i18n_key: 'scan_qr_c2a',
1077+
text: window.gui_origin + '?auth_token=' + window.auth_token,
1078+
});
10761079
})
10771080

10781081
$(document).on('click', '.user-options-menu-btn', async function(e){

src/UI/UIWindowQR.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ async function UIWindowQR(options){
2727
// close button containing the multiplication sign
2828
h += `<div class="qr-code-window-close-btn generic-close-window-button"> &times; </div>`;
2929
h += `<div class="otp-qr-code">`;
30-
h += `<h1 style="text-align: center; font-size: 16px; padding: 10px; font-weight: 400; margin: -10px 10px 20px 10px; -webkit-font-smoothing: antialiased; color: #5f626d;">${i18n('scan_qr_c2a')}</h1>`;
30+
h += `<h1 style="text-align: center; font-size: 16px; padding: 10px; font-weight: 400; margin: -10px 10px 20px 10px; -webkit-font-smoothing: antialiased; color: #5f626d;">${
31+
i18n(options.message_i18n_key || 'scan_qr_generic')
32+
}</h1>`;
3133
h += `</div>`;
3234

3335
const el_window = await UIWindow({
@@ -47,7 +49,7 @@ async function UIWindowQR(options){
4749
allow_native_ctxmenu: false,
4850
allow_user_select: false,
4951
backdrop: true,
50-
width: 350,
52+
width: 550,
5153
height: 'auto',
5254
dominant: true,
5355
show_in_taskbar: false,
@@ -65,9 +67,9 @@ async function UIWindowQR(options){
6567

6668
// generate auth token QR code
6769
new QRCode($(el_window).find('.otp-qr-code').get(0), {
68-
text: window.gui_origin + '?auth_token=' + window.auth_token,
69-
width: 155,
70-
height: 155,
70+
text: options.text,
71+
width: 455,
72+
height: 455,
7173
colorDark : "#000000",
7274
colorLight : "#ffffff",
7375
correctLevel : QRCode.CorrectLevel.H

src/css/style.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -2590,11 +2590,11 @@ label {
25902590
justify-content: center;
25912591
flex-direction: column;
25922592
align-items: center;
2593-
height: 320px;
2593+
height: 520px;
25942594
}
25952595

25962596
.otp-qr-code img {
2597-
width: 155px;
2597+
width: 355px;
25982598
}
25992599

26002600
.perm-title {

src/i18n/translations/en.js

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const en = {
201201
save_session: 'Save session',
202202
save_session_c2a: 'Create an account to save your current session and avoid losing your work.',
203203
scan_qr_c2a: 'Scan the code below to log into this session from other devices',
204+
scan_qr_generic: 'Scan this QR code using your phone or another device',
204205
seconds: 'seconds',
205206
select: "Select",
206207
selected: 'selected',

0 commit comments

Comments
 (0)