mirror of
https://github.com/zadam/trilium.git
synced 2026-02-27 17:13:38 +01:00
feat(save_indicator): add tooltip for each of the states
This commit is contained in:
parent
07a463ee52
commit
345378d97f
@ -2213,7 +2213,11 @@
|
|||||||
"save_status_saved": "Saved",
|
"save_status_saved": "Saved",
|
||||||
"save_status_saving": "Saving...",
|
"save_status_saving": "Saving...",
|
||||||
"save_status_unsaved": "Unsaved",
|
"save_status_unsaved": "Unsaved",
|
||||||
"save_status_error": "Save failed"
|
"save_status_error": "Save failed",
|
||||||
|
"save_status_saved_tooltip": "All changes have been saved.",
|
||||||
|
"save_status_saving_tooltip": "Changes are being saved.",
|
||||||
|
"save_status_unsaved_tooltip": "There are unsaved changes. They will be saved automatically in a moment.",
|
||||||
|
"save_status_error_tooltip": "An error occurred while saving the note. If possible, try copying the note content elsewhere and reloading the application."
|
||||||
},
|
},
|
||||||
"status_bar": {
|
"status_bar": {
|
||||||
"language_title": "Change content language",
|
"language_title": "Change content language",
|
||||||
|
|||||||
@ -114,22 +114,27 @@ function SaveStatusBadge() {
|
|||||||
|
|
||||||
let icon: string;
|
let icon: string;
|
||||||
let title: string;
|
let title: string;
|
||||||
|
let tooltip: string;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case "saved":
|
case "saved":
|
||||||
icon = "bx bx-check";
|
icon = "bx bx-check";
|
||||||
title = t("breadcrumb_badges.save_status_saved");
|
title = t("breadcrumb_badges.save_status_saved");
|
||||||
|
tooltip = t("breadcrumb_badges.save_status_saved_tooltip");
|
||||||
break;
|
break;
|
||||||
case "saving":
|
case "saving":
|
||||||
icon = "bx bx-loader bx-spin";
|
icon = "bx bx-loader bx-spin";
|
||||||
title = t("breadcrumb_badges.save_status_saving");
|
title = t("breadcrumb_badges.save_status_saving");
|
||||||
|
tooltip = t("breadcrumb_badges.save_status_saving_tooltip");
|
||||||
break;
|
break;
|
||||||
case "unsaved":
|
case "unsaved":
|
||||||
icon = "bx bx-pencil";
|
icon = "bx bx-pencil";
|
||||||
title = t("breadcrumb_badges.save_status_unsaved");
|
title = t("breadcrumb_badges.save_status_unsaved");
|
||||||
|
tooltip = t("breadcrumb_badges.save_status_unsaved_tooltip");
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
icon = "bx bxs-error";
|
icon = "bx bxs-error";
|
||||||
title = t("breadcrumb_badges.save_status_error");
|
title = t("breadcrumb_badges.save_status_error");
|
||||||
|
tooltip = t("breadcrumb_badges.save_status_error_tooltip");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,6 +143,7 @@ function SaveStatusBadge() {
|
|||||||
className={clsx("save-status-badge", state)}
|
className={clsx("save-status-badge", state)}
|
||||||
icon={icon}
|
icon={icon}
|
||||||
text={title}
|
text={title}
|
||||||
|
tooltip={tooltip}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user