From cc21a33a31456d866c6ed59e2710bfd95ed7c175 Mon Sep 17 00:00:00 2001 From: jelveh Date: Tue, 28 Apr 2026 09:57:14 -0700 Subject: [PATCH] Make copy-token window responsive and closable --- src/gui/src/UI/Dashboard/TabAccount.js | 1 + src/gui/src/UI/UIWindowCopyToken.js | 5 ++++- src/gui/src/css/style.css | 27 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/gui/src/UI/Dashboard/TabAccount.js b/src/gui/src/UI/Dashboard/TabAccount.js index 2ead7327f..b5a135597 100644 --- a/src/gui/src/UI/Dashboard/TabAccount.js +++ b/src/gui/src/UI/Dashboard/TabAccount.js @@ -173,6 +173,7 @@ const TabAccount = { }); $el_window.find('.dashboard-section-account .copy-auth-token').on('click', function (e) { UIWindowCopyToken({ + show_close_button: true, show_header: true, window_options: { parent_uuid: $el_window.attr('data-element_uuid'), diff --git a/src/gui/src/UI/UIWindowCopyToken.js b/src/gui/src/UI/UIWindowCopyToken.js index 5d5f0e616..34d07813c 100644 --- a/src/gui/src/UI/UIWindowCopyToken.js +++ b/src/gui/src/UI/UIWindowCopyToken.js @@ -55,6 +55,9 @@ function UIWindowCopyToken (options = {}) { if ( ! options.show_header ) { h += `
${i18n('copy_token_message')}
`; } + if ( options.show_close_button ) { + h += '
×
'; + } h += `
`; h += ``; h += ``; @@ -85,7 +88,7 @@ function UIWindowCopyToken (options = {}) { height: 'auto', dominant: true, show_in_taskbar: false, - window_class: 'window-publishWebsite', + window_class: 'window-copy-auth-token', body_css: { width: 'initial', height: '100%', diff --git a/src/gui/src/css/style.css b/src/gui/src/css/style.css index 6e3ccef40..550e9d5a9 100644 --- a/src/gui/src/css/style.css +++ b/src/gui/src/css/style.css @@ -3036,6 +3036,22 @@ label { } @media screen and (max-width: 768px) { + .window-copy-auth-token { + width: 100% !important; + max-width: none !important; + max-height: 100vh !important; + height: 100vh !important; + top:0 !important; + left: 0 !important; + border-radius: 0 !important; + } + + .window-copy-auth-token .window-body { + box-sizing: border-box !important; + display: flex; + flex-direction: column; + justify-content: center; + } .taskbar { justify-content: center; @@ -4490,6 +4506,17 @@ fieldset[name=number-code] { } @media (max-width:480px) { + .window-copy-auth-token { + width: 100% !important; + max-width: none !important; + height: 100% !important; + top:0 !important; + left: 0 !important; + border-radius: 0 !important; + } + .window-copy-auth-token .window-body { + box-sizing: border-box !important; + } .puter-auth-dialog-content { padding: 50px 20px; }