refactor: Streamline EPUB handling with new split modes and improved error management
Build and Push Reader Image / docker (push) Successful in 1m32s
Build and Push Reader Image / docker (push) Successful in 1m32s
- Removed legacy AI Tool references and unnecessary fields from the README and various components. - Introduced new EPUB split modes (toc, regex, tag) to enhance flexibility in chapter extraction. - Updated import and chapter management components to utilize the new EPUB split functionality. - Improved error handling in the login API route for better user feedback. - Cleaned up unused files and optimized the overall code structure for maintainability.
This commit is contained in:
@@ -68,6 +68,9 @@ async function initializeGoogleIdentity(clientId: string): Promise<void> {
|
||||
|
||||
if (googleInitializedClientId === clientId) return
|
||||
|
||||
const hostname = typeof window !== "undefined" ? window.location.hostname : ""
|
||||
const isLocalHost = hostname === "localhost" || hostname === "127.0.0.1"
|
||||
|
||||
// Re-initialize with new clientId (or first time)
|
||||
googleApi.initialize({
|
||||
client_id: clientId,
|
||||
@@ -86,7 +89,8 @@ async function initializeGoogleIdentity(clientId: string): Promise<void> {
|
||||
},
|
||||
auto_select: false,
|
||||
cancel_on_tap_outside: true,
|
||||
use_fedcm_for_prompt: true,
|
||||
// FedCM on localhost often yields tokens backend cannot verify; production keeps FedCM.
|
||||
use_fedcm_for_prompt: !isLocalHost,
|
||||
})
|
||||
|
||||
googleInitializedClientId = clientId
|
||||
|
||||
Reference in New Issue
Block a user