You've already forked obsidian-livesync
mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-07-16 00:14:19 +02:00
Minor fix and refine the readme
This commit is contained in:
25
README.md
25
README.md
@ -59,14 +59,23 @@ Synchronization status is shown in statusbar.
|
|||||||
|
|
||||||
- Status
|
- Status
|
||||||
- ⏹️ Stopped
|
- ⏹️ Stopped
|
||||||
- 💤 LiveSync enabled. Waiting for changes.
|
- 💤 LiveSync enabled. Waiting for changes
|
||||||
- ⚡️ Synchronization in progress.
|
- ⚡️ Synchronization in progress
|
||||||
- ⚠ An error occurred.
|
- ⚠ An error occurred
|
||||||
- ↑ Uploaded chunks and metadata
|
- Statistical indicator
|
||||||
- ↓ Downloaded chunks and metadata
|
- ↑ Uploaded chunks and metadata
|
||||||
- ⏳ Number of pending processes
|
- ↓ Downloaded chunks and metadata
|
||||||
- 🧩 Number of files waiting for their chunks.
|
- Progress indicator
|
||||||
If you have deleted or renamed files, please wait until ⏳ icon disappears.
|
- 📥 Unprocessed transferred items
|
||||||
|
- 📄 Working database operation
|
||||||
|
- 💾 Working write storage processes
|
||||||
|
- ⏳ Working read storage processes
|
||||||
|
- 🛫 Pending read storage processes
|
||||||
|
- ⚙️ Working or pending storage processes of hidden files
|
||||||
|
- 🧩 Waiting chunks
|
||||||
|
- 🔌 Working Customisation items (Configuration, snippets and plug-ins)
|
||||||
|
|
||||||
|
To prevent file and database corruption, please wait until all progress indicators have disappeared. Especially in case of if you have deleted or renamed files.
|
||||||
|
|
||||||
|
|
||||||
## Hints
|
## Hints
|
||||||
|
44
src/main.ts
44
src/main.ts
@ -1537,46 +1537,20 @@ Note: We can always able to read V1 format. It will be progressively converted.
|
|||||||
const queueCountLabel = reactive(() => {
|
const queueCountLabel = reactive(() => {
|
||||||
const dbCount = this.databaseQueueCount.value;
|
const dbCount = this.databaseQueueCount.value;
|
||||||
const replicationCount = this.replicationResultCount.value;
|
const replicationCount = this.replicationResultCount.value;
|
||||||
const storageApplingCount = this.storageApplyingCount.value;
|
const storageApplyingCount = this.storageApplyingCount.value;
|
||||||
const chunkCount = collectingChunks.value;
|
const chunkCount = collectingChunks.value;
|
||||||
const pluginScanCount = pluginScanningCount.value;
|
const pluginScanCount = pluginScanningCount.value;
|
||||||
const hiddenFilesCount = hiddenFilesEventCount.value + hiddenFilesProcessingCount.value;
|
const hiddenFilesCount = hiddenFilesEventCount.value + hiddenFilesProcessingCount.value;
|
||||||
const labelReplication = replicationCount ? `📥 ${replicationCount} ` : "";
|
const labelReplication = replicationCount ? `📥 ${replicationCount} ` : "";
|
||||||
const labelDBCount = dbCount ? `📄 ${dbCount} ` : "";
|
const labelDBCount = dbCount ? `📄 ${dbCount} ` : "";
|
||||||
const labelStorageCount = storageApplingCount ? `💾 ${storageApplingCount}` : "";
|
const labelStorageCount = storageApplyingCount ? `💾 ${storageApplyingCount}` : "";
|
||||||
const labelChunkCount = chunkCount ? `🧩${chunkCount} ` : "";
|
const labelChunkCount = chunkCount ? `🧩${chunkCount} ` : "";
|
||||||
const labelPluginScanCount = pluginScanCount ? `🔌${pluginScanCount} ` : "";
|
const labelPluginScanCount = pluginScanCount ? `🔌${pluginScanCount} ` : "";
|
||||||
const labelHiddenFilesCount = hiddenFilesCount ? `⚙️${hiddenFilesCount} ` : "";
|
const labelHiddenFilesCount = hiddenFilesCount ? `⚙️${hiddenFilesCount} ` : "";
|
||||||
|
|
||||||
return `${labelReplication}${labelDBCount}${labelStorageCount}${labelChunkCount}${labelPluginScanCount}${labelHiddenFilesCount}`;
|
return `${labelReplication}${labelDBCount}${labelStorageCount}${labelChunkCount}${labelPluginScanCount}${labelHiddenFilesCount}`;
|
||||||
})
|
})
|
||||||
const lockCountLabel = reactive(() => {
|
|
||||||
const lockStat = lockStats.value;
|
|
||||||
const processesCount = lockStat.count;
|
|
||||||
const processes = processesCount == 0 ? "" : ` ⏳${processesCount}`;
|
|
||||||
function getProcKind(proc: string) {
|
|
||||||
const p = proc.indexOf("-");
|
|
||||||
if (p == -1) {
|
|
||||||
return proc;
|
|
||||||
}
|
|
||||||
return proc.substring(0, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
const pendingTask = lockStat.pending.length
|
|
||||||
? lockStat.pending.length < 10 ? ("\nPending: " +
|
|
||||||
Object.entries(lockStat.pending.reduce((p, c) => ({ ...p, [getProcKind(c)]: (p[getProcKind(c)] ?? 0) + 1 }), {} as { [key: string]: number }))
|
|
||||||
.map((e) => `${e[0]}${e[1] == 1 ? "" : `(${e[1]})`}`)
|
|
||||||
.join(", ")
|
|
||||||
) : `\n Pending: ${lockStat.pending.length}` : "";
|
|
||||||
|
|
||||||
const runningTask = lockStat.running.length
|
|
||||||
? lockStat.running.length < 10 ? ("\nRunning: " +
|
|
||||||
Object.entries(lockStat.running.reduce((p, c) => ({ ...p, [getProcKind(c)]: (p[getProcKind(c)] ?? 0) + 1 }), {} as { [key: string]: number }))
|
|
||||||
.map((e) => `${e[0]}${e[1] == 1 ? "" : `(${e[1]})`}`)
|
|
||||||
.join(", ")
|
|
||||||
) : `\n Running: ${lockStat.running.length}` : "";
|
|
||||||
return { processes, runningTask, pendingTask };
|
|
||||||
})
|
|
||||||
const replicationStatLabel = reactive(() => {
|
const replicationStatLabel = reactive(() => {
|
||||||
const e = this.replicationStat.value;
|
const e = this.replicationStat.value;
|
||||||
const sent = e.sent;
|
const sent = e.sent;
|
||||||
@ -1615,20 +1589,18 @@ Note: We can always able to read V1 format. It will be progressively converted.
|
|||||||
})
|
})
|
||||||
const waitingLabel = reactive(() => {
|
const waitingLabel = reactive(() => {
|
||||||
const e = this.pendingFileEventCount.value;
|
const e = this.pendingFileEventCount.value;
|
||||||
if (this.settings && this.settings.batchSave && !this.settings.liveSync) {
|
const proc = this.fileEventQueue.processingEntities;
|
||||||
if (e != 0) {
|
const pend = e - proc;
|
||||||
return ` 🛫${e}`;
|
const labelProc = proc != 0 ? `⏳${proc} ` : "";
|
||||||
}
|
const labelPend = pend != 0 ? ` 🛫${pend}` : "";
|
||||||
}
|
return `${labelProc}${labelPend}`;
|
||||||
return "";
|
|
||||||
})
|
})
|
||||||
const statusLineLabel = reactive(() => {
|
const statusLineLabel = reactive(() => {
|
||||||
const { w, sent, pushLast, arrived, pullLast } = replicationStatLabel.value;
|
const { w, sent, pushLast, arrived, pullLast } = replicationStatLabel.value;
|
||||||
const { processes, pendingTask, runningTask } = lockCountLabel.value;
|
|
||||||
const queued = queueCountLabel.value;
|
const queued = queueCountLabel.value;
|
||||||
const waiting = waitingLabel.value;
|
const waiting = waitingLabel.value;
|
||||||
return {
|
return {
|
||||||
message: `Sync: ${w} ↑${sent}${pushLast} ↓${arrived}${pullLast}${waiting}${processes} ${queued}${pendingTask}${runningTask}`,
|
message: `Sync: ${w} ↑${sent}${pushLast} ↓${arrived}${pullLast}${waiting} ${queued}`,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
const statusBarLabels = reactive(() => {
|
const statusBarLabels = reactive(() => {
|
||||||
|
13
updates.md
13
updates.md
@ -12,11 +12,22 @@ Note: we got a very performance improvement.
|
|||||||
- 0.22.0
|
- 0.22.0
|
||||||
- Refined:
|
- Refined:
|
||||||
- Task scheduling logics has been rewritten.
|
- Task scheduling logics has been rewritten.
|
||||||
- Possibly many bugs and fragile behaviour has been fixed
|
- Screen updates are also now efficient.
|
||||||
|
- Possibly many bugs and fragile behaviour has been fixed.
|
||||||
|
- Status updates and logging have been thinned out to display.
|
||||||
- Fixed:
|
- Fixed:
|
||||||
- Remote-chunk-fetching now works with keeping request intervals
|
- Remote-chunk-fetching now works with keeping request intervals
|
||||||
- New feature:
|
- New feature:
|
||||||
- We can show only the icons in the editor.
|
- We can show only the icons in the editor.
|
||||||
|
- Progress indicators have been more meaningful:
|
||||||
|
- 📥 Unprocessed transferred items
|
||||||
|
- 📄 Working database operation
|
||||||
|
- 💾 Working write storage processes
|
||||||
|
- ⏳ Working read storage processes
|
||||||
|
- 🛫 Pending read storage processes
|
||||||
|
- ⚙️ Working or pending storage processes of hidden files
|
||||||
|
- 🧩 Waiting chunks
|
||||||
|
- 🔌 Working Customisation items (Configuration, snippets and plug-ins)
|
||||||
|
|
||||||
|
|
||||||
... To continue on to `updates_old.md`.
|
... To continue on to `updates_old.md`.
|
Reference in New Issue
Block a user