correcting pixiv connection functionality
This commit is contained in:
@@ -165,9 +165,9 @@ function createPlatformCard(key, platform, status) {
|
||||
card.className = 'platform-card';
|
||||
card.dataset.platform = key;
|
||||
|
||||
// Discord is clickable if we have a token captured
|
||||
// Discord and Pixiv are clickable (Pixiv initiates OAuth if no token)
|
||||
// Other token-based platforms are disabled
|
||||
const isDisabled = platform.authType === 'token' && key !== 'discord';
|
||||
const isDisabled = platform.authType === 'token' && !['discord', 'pixiv'].includes(key);
|
||||
const isDiscordWithoutToken = key === 'discord' && !status.hasToken;
|
||||
|
||||
if (isDisabled || isDiscordWithoutToken) {
|
||||
@@ -236,6 +236,14 @@ function getStatusText(status, platform, key) {
|
||||
return 'Open Discord in browser to capture token';
|
||||
}
|
||||
|
||||
// Special handling for Pixiv OAuth
|
||||
if (key === 'pixiv') {
|
||||
if (status.hasToken) {
|
||||
return 'Token captured - ready to export';
|
||||
}
|
||||
return 'Click to authenticate with Pixiv';
|
||||
}
|
||||
|
||||
if (platform.authType === 'token') {
|
||||
return 'Manual token entry required';
|
||||
}
|
||||
@@ -261,6 +269,11 @@ function getStatusClass(status, platform, key) {
|
||||
return status.hasToken ? 'ready' : 'no-cookies';
|
||||
}
|
||||
|
||||
// Special handling for Pixiv
|
||||
if (key === 'pixiv') {
|
||||
return status.hasToken ? 'ready' : 'no-cookies';
|
||||
}
|
||||
|
||||
if (platform.authType === 'token') {
|
||||
return 'no-cookies';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user