More emojis
This commit is contained in:
parent
db21f70612
commit
9b7d37dd8a
1 changed files with 16 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import type { WorkspaceLeaf } from "obsidian";
|
||||
import { ItemView } from "obsidian";
|
||||
import type { SyncHistory } from "src/tracing/sync-history";
|
||||
import { SyncHistory, SyncType } from "src/tracing/sync-history";
|
||||
import { SyncSource, SyncStatus } from "src/tracing/sync-history";
|
||||
import { intlFormatDistance } from "date-fns";
|
||||
import type { Database } from "src/database/database";
|
||||
|
|
@ -24,6 +24,20 @@ export class HistoryView extends ItemView {
|
|||
});
|
||||
}
|
||||
|
||||
private static formatSyncType(type: SyncType | undefined): string {
|
||||
switch (type) {
|
||||
case SyncType.CREATE:
|
||||
return "👶 ";
|
||||
case SyncType.DELETE:
|
||||
return "🗑️ ";
|
||||
case SyncType.UPDATE:
|
||||
return "✍️ ";
|
||||
case undefined:
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private static formatSource(source: SyncSource | undefined): string {
|
||||
switch (source) {
|
||||
case SyncSource.PUSH:
|
||||
|
|
@ -76,6 +90,7 @@ export class HistoryView extends ItemView {
|
|||
const header = card.createDiv({ cls: "history-card-header" });
|
||||
header.createEl("h5", {
|
||||
text:
|
||||
HistoryView.formatSyncType(entry.type) +
|
||||
entry.relativePath +
|
||||
HistoryView.formatSource(entry.source),
|
||||
cls: "history-card-title",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue