diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index d9c535453e..3b70bb1e90 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -3974,7 +3974,9 @@ export default { authorizeHint: 'Get Refresh Token via OAuth2', oauthFieldsRequired: 'Please fill in Client ID and Client Secret first', oauthSuccess: 'Google Drive authorization successful', - oauthFailed: 'Google Drive authorization failed' + oauthFailed: 'Google Drive authorization failed', + closeWindow: 'This window will close automatically', + processing: 'Processing authorization...' } }, streamTimeout: { diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 8023666af6..a2ec660f70 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -4134,7 +4134,9 @@ export default { authorizeHint: '通过 OAuth2 获取 Refresh Token', oauthFieldsRequired: '请先填写 Client ID 和 Client Secret', oauthSuccess: 'Google Drive 授权成功', - oauthFailed: 'Google Drive 授权失败' + oauthFailed: 'Google Drive 授权失败', + closeWindow: '此窗口将自动关闭', + processing: '正在处理授权...' } }, streamTimeout: { diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index d235de517e..d8d17550c7 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -225,6 +225,17 @@ const routes: RouteRecordRaw[] = [ } }, + // ==================== Admin OAuth Callback Routes ==================== + { + path: '/admin/gdrive-oauth-callback', + name: 'GDriveOAuthCallback', + component: () => import('@/views/admin/GDriveOAuthCallbackView.vue'), + meta: { + requiresAuth: false, + title: 'Google Drive OAuth' + } + }, + // ==================== Admin Routes ==================== { path: '/admin', diff --git a/frontend/src/views/admin/GDriveOAuthCallbackView.vue b/frontend/src/views/admin/GDriveOAuthCallbackView.vue new file mode 100644 index 0000000000..f8f41c1fd6 --- /dev/null +++ b/frontend/src/views/admin/GDriveOAuthCallbackView.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ t('admin.settings.soraS3.gdrive.oauthFailed') }} + {{ error }} + {{ t('admin.settings.soraS3.gdrive.closeWindow') }} + + + + + + + + {{ t('admin.settings.soraS3.gdrive.oauthSuccess') }} + {{ t('admin.settings.soraS3.gdrive.closeWindow') }} + + + + {{ t('admin.settings.soraS3.gdrive.processing') }} + + + + + +
{{ error }}
{{ t('admin.settings.soraS3.gdrive.closeWindow') }}
{{ t('admin.settings.soraS3.gdrive.processing') }}