Update KOReader Sync settings (#1030)
* feat(settings): refactor and implement KOReader Sync settings page Refactors the KOReader Sync settings section into its own dedicated page and implements the full connection and configuration flow. The previous implementation in the main server settings was outdated and incomplete. This change aligns the frontend with the latest backend logic and provides a complete user experience. Key changes include: - Separated the UI into two states: a login form for initial connection and a configuration panel for existing connections. - Implemented `connectKoSyncAccount` and `logoutKoSyncAccount` mutations to handle authentication with the KOReader Sync server. - Updated the `SERVER_SETTINGS` GraphQL fragment to use the new `koreaderSyncStrategyForward` and `koreaderSyncStrategyBackward` fields, removing the deprecated `koreaderSyncStrategy`. - Moved all KOReader Sync settings from the generic Server Settings page to a dedicated route at `/settings/koreader-sync`. - Restructured and improved i18n keys for better clarity and consistency. Ran `yarn gql:codegen` to regenerate GraphQL types and helpers. * Extract credentials login into component * Update to server changes and cleanup --------- Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
This commit is contained in:
@@ -471,6 +471,7 @@
|
||||
"load_in_progress": "Still loading required data…",
|
||||
"loading": "Loading…",
|
||||
"logged_in": "Logged in",
|
||||
"logged_out": "Logged out",
|
||||
"medium": "Medium",
|
||||
"menu": "Menu",
|
||||
"mobile": "Mobile",
|
||||
@@ -1424,25 +1425,40 @@
|
||||
"check_sum_method": {
|
||||
"binary": "Binary",
|
||||
"filename": "Filename",
|
||||
"title": "Check sum method"
|
||||
"title": "Document matching method"
|
||||
},
|
||||
"connection": {
|
||||
"connect": "Connect to KOReader Sync server",
|
||||
"connected": "Connected as {{username}} to {{serverAddress}}",
|
||||
"disconnect": "Disconnect from KOReader Sync server",
|
||||
"disconnected": "Disconnected",
|
||||
"message": {
|
||||
"connect_error": "Failed to connect to KOReader Sync server.",
|
||||
"connect_success": "Successfully connected to KOReader Sync server.",
|
||||
"disconnect_error": "Failed to disconnect from KOReader Sync server.",
|
||||
"disconnect_success": "Successfully disconnected from KOReader Sync server."
|
||||
},
|
||||
"status": "Sync status"
|
||||
},
|
||||
"description": "Synchronize reading progress with KOReader devices.",
|
||||
"device_id": "Device ID",
|
||||
"server_address": "Server url",
|
||||
"device_name": "Device Name",
|
||||
"server_address": "Server address",
|
||||
"strategy": {
|
||||
"disabled": "Disabled",
|
||||
"prompt": "Prompt",
|
||||
"receive": "Receive",
|
||||
"send": "Send",
|
||||
"silent": "Silent",
|
||||
"title": "Sync strategy"
|
||||
"backward_title": "Sync to an older state",
|
||||
"forward_title": "Sync to a newer state",
|
||||
"option": {
|
||||
"disabled": "Disabled",
|
||||
"keep_local": "Keep local",
|
||||
"keep_remote": "Keep remote",
|
||||
"prompt": "Prompt"
|
||||
}
|
||||
},
|
||||
"title": "KOReader sync",
|
||||
"title": "KOReader Sync",
|
||||
"tolerance": {
|
||||
"description": "Absolute tolerance for progress comparison",
|
||||
"title": "Tolerance"
|
||||
},
|
||||
"user_key": "User key",
|
||||
"username": "$t(global.label.username)"
|
||||
"description": "Sync will not be triggered if the progress difference is within this tolerance.",
|
||||
"title": "Percentage Tolerance"
|
||||
}
|
||||
}
|
||||
},
|
||||
"local_source": {
|
||||
|
||||
Reference in New Issue
Block a user