From 6fbe83d98234dbfb5d56a35755ac42f437fa31f2 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Sun, 1 Feb 2026 15:34:02 -0800 Subject: [PATCH] Show cancelled state in auth window When the user clicks Cancel in the authorization window, the code now disables action buttons and replaces the window body with a cancellation UI (header with icon, title, description and a message). Added corresponding English i18n keys (authorization_cancelled, authorization_cancelled_desc, authorization_cancelled_message) to provide localized text for the new cancelled state. --- src/gui/src/UI/UIWindowAuthMe.js | 42 +++++++++++++++++++++++++++-- src/gui/src/i18n/translations/en.js | 3 +++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/gui/src/UI/UIWindowAuthMe.js b/src/gui/src/UI/UIWindowAuthMe.js index 9cca76845..f1cfcc410 100644 --- a/src/gui/src/UI/UIWindowAuthMe.js +++ b/src/gui/src/UI/UIWindowAuthMe.js @@ -186,8 +186,46 @@ async function UIWindowAuthMe (options = {}) { $(el_window).find('.authme-cancel').on('click', function () { $(this).addClass('disabled'); - $(el_window).close(); - resolve(false); + $(el_window).find('.authme-approve').addClass('disabled'); + + // Show cancelled state + let cancelledHtml = ''; + + // Header with icon + cancelledHtml += `
`; + cancelledHtml += `
`; + cancelledHtml += ` + + + + `; + cancelledHtml += '
'; + cancelledHtml += `

${i18n('authorization_cancelled')}

`; + cancelledHtml += `

${i18n('authorization_cancelled_desc')}

`; + cancelledHtml += '
'; + + // Content area + cancelledHtml += '
'; + cancelledHtml += `

${i18n('authorization_cancelled_message')}

`; + cancelledHtml += '
'; + + $(el_window).find('.window-body').html(cancelledHtml); }); $(el_window).on('close', () => { diff --git a/src/gui/src/i18n/translations/en.js b/src/gui/src/i18n/translations/en.js index 69eb15a45..e5c8f30ec 100644 --- a/src/gui/src/i18n/translations/en.js +++ b/src/gui/src/i18n/translations/en.js @@ -566,6 +566,9 @@ const en = { redirect_destination: 'Redirect Destination', will_be_shared: 'Will be shared', your_auth_token: 'Your authentication token', + authorization_cancelled: 'Authorization Cancelled', + authorization_cancelled_desc: 'You have declined the authorization request.', + authorization_cancelled_message: 'The app will not receive access to your account. You can close this window safely.', }, };