fix: WebDAV sync — Onyx subfolder, timeouts, error display, light theme
This commit is contained in:
parent
12afc91110
commit
2a2e362a8f
37
.claude/settings.local.json
Normal file
37
.claude/settings.local.json
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"hooks": {
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Edit|MultiEdit|Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "but claude pre-tool"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Edit|MultiEdit|Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "but claude post-tool"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stop": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "but claude stop"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
18
Cargo.lock
generated
18
Cargo.lock
generated
|
|
@ -1144,7 +1144,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.60.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1304,9 +1304,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.1"
|
||||
version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
||||
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
|
|
@ -1347,9 +1347,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.103.9"
|
||||
version = "0.103.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
|
||||
checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
|
|
@ -2335,18 +2335,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.42"
|
||||
version = "0.8.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3"
|
||||
checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.42"
|
||||
version = "0.8.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f"
|
||||
checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
|||
|
|
@ -71,6 +71,21 @@ body {
|
|||
|
||||
/* ── Theme overrides ─────────────────────────────────────────────── */
|
||||
|
||||
[data-theme="light"] {
|
||||
--color-primary: #2d87b8;
|
||||
--color-primary-hover: #2474a0;
|
||||
--color-surface-light: #ffffff;
|
||||
--color-surface-dark: #ffffff;
|
||||
--color-card-light: #f9fafb;
|
||||
--color-card-dark: #f9fafb;
|
||||
--color-text-light: #1f2937;
|
||||
--color-text-dark: #1f2937;
|
||||
--color-text-secondary-light: #6b7280;
|
||||
--color-text-secondary-dark: #6b7280;
|
||||
--color-border-light: #e5e7eb;
|
||||
--color-border-dark: #e5e7eb;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
--color-primary: #2d87b8;
|
||||
--color-primary-hover: #2474a0;
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@
|
|||
{app.syncing ? "Syncing..." : "Sync Now"}
|
||||
</button>
|
||||
</div>
|
||||
{#if app.error}
|
||||
<p class="mt-1.5 text-xs text-danger">{app.error}</p>
|
||||
{/if}
|
||||
{#if ws?.last_sync}
|
||||
{@const lastSync = new Date(ws.last_sync)}
|
||||
{@const secsAgo = Math.floor((Date.now() - lastSync.getTime()) / 1000)}
|
||||
|
|
|
|||
|
|
@ -282,30 +282,17 @@ async function setGroupByDueDate(listId: string, enabled: boolean) {
|
|||
|
||||
async function triggerSync() {
|
||||
if (!config?.current_workspace) return;
|
||||
const workspaceName = config.current_workspace;
|
||||
const ws = config.workspaces[workspaceName];
|
||||
if (!ws?.webdav_url) {
|
||||
error = "No WebDAV URL configured";
|
||||
return;
|
||||
}
|
||||
syncing = true;
|
||||
error = null;
|
||||
try {
|
||||
const domain = new URL(ws.webdav_url).hostname;
|
||||
const [username, password] = await invoke<[string, string]>("load_credentials", { domain });
|
||||
const result = await invoke<SyncResult>("sync_workspace", {
|
||||
workspaceName,
|
||||
workspacePath: ws.path,
|
||||
webdavUrl: ws.webdav_url,
|
||||
username,
|
||||
password,
|
||||
workspaceName: config.current_workspace,
|
||||
mode: syncMode,
|
||||
});
|
||||
lastSyncResult = result;
|
||||
if (result.errors.length > 0) {
|
||||
error = result.errors.join("; ");
|
||||
}
|
||||
// Reload config to pick up updated last_sync timestamp
|
||||
config = await invoke<AppConfig>("get_config");
|
||||
await loadLists();
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue