v2.2.16: Astra Office UI Overhaul & Operations Floor
This commit is contained in:
+41
-19
@@ -1049,25 +1049,47 @@ async function runConnectGoogleCalendarOAuth(context: vscode.ExtensionContext) {
|
||||
}
|
||||
}
|
||||
|
||||
const clientId = await vscode.window.showInputBox({
|
||||
title: 'Google OAuth Client ID',
|
||||
prompt: 'Credentials 페이지에서 복사한 Client ID',
|
||||
placeHolder: 'xxxxxxxx.apps.googleusercontent.com',
|
||||
value: cur.clientId,
|
||||
ignoreFocusOut: true,
|
||||
validateInput: (v) => (v || '').trim() ? null : '비어있어요',
|
||||
});
|
||||
if (!clientId) return;
|
||||
const clientSecret = await vscode.window.showInputBox({
|
||||
title: 'Google OAuth Client Secret',
|
||||
prompt: '같은 화면의 Client Secret',
|
||||
placeHolder: 'GOCSPX-...',
|
||||
value: cur.clientSecret,
|
||||
password: true,
|
||||
ignoreFocusOut: true,
|
||||
validateInput: (v) => (v || '').trim() ? null : '비어있어요',
|
||||
});
|
||||
if (!clientSecret) return;
|
||||
// Settings 에 이미 채워져 있으면 그대로 쓰겠냐고 물어봄 — 매번 똑같은 값 다시 입력하기 귀찮음.
|
||||
const haveBoth = !!(cur.clientId && cur.clientSecret);
|
||||
let clientId: string | undefined = cur.clientId;
|
||||
let clientSecret: string | undefined = cur.clientSecret;
|
||||
if (haveBoth) {
|
||||
const useExisting = await vscode.window.showInformationMessage(
|
||||
`Settings (g1nation.google) 에 이미 Client ID/Secret 이 있습니다.\nID: ${cur.clientId!.slice(0, 20)}…\n\n이 값으로 OAuth 진행할까요?`,
|
||||
{ modal: false },
|
||||
'예 (Settings 값 사용)',
|
||||
'아니오 (새로 입력)',
|
||||
'취소',
|
||||
);
|
||||
if (useExisting === '취소' || !useExisting) return;
|
||||
if (useExisting === '아니오 (새로 입력)') {
|
||||
clientId = undefined;
|
||||
clientSecret = undefined;
|
||||
}
|
||||
}
|
||||
if (!clientId) {
|
||||
clientId = await vscode.window.showInputBox({
|
||||
title: 'Google OAuth Client ID',
|
||||
prompt: 'Credentials 페이지에서 복사한 Client ID — 자동으로 Settings(g1nation.google.clientId)에 저장됨',
|
||||
placeHolder: 'xxxxxxxx.apps.googleusercontent.com',
|
||||
value: cur.clientId,
|
||||
ignoreFocusOut: true,
|
||||
validateInput: (v) => (v || '').trim() ? null : '비어있어요',
|
||||
});
|
||||
if (!clientId) return;
|
||||
}
|
||||
if (!clientSecret) {
|
||||
clientSecret = await vscode.window.showInputBox({
|
||||
title: 'Google OAuth Client Secret',
|
||||
prompt: '같은 화면의 Client Secret — Settings(g1nation.google.clientSecret)에 저장됨',
|
||||
placeHolder: 'GOCSPX-...',
|
||||
value: cur.clientSecret,
|
||||
password: true,
|
||||
ignoreFocusOut: true,
|
||||
validateInput: (v) => (v || '').trim() ? null : '비어있어요',
|
||||
});
|
||||
if (!clientSecret) return;
|
||||
}
|
||||
|
||||
await vscode.window.withProgress({
|
||||
location: vscode.ProgressLocation.Notification,
|
||||
|
||||
Reference in New Issue
Block a user