mirror of
https://github.com/zadam/trilium.git
synced 2026-01-10 16:44:29 +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_saving": "Saving...",
|
||||
"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": {
|
||||
"language_title": "Change content language",
|
||||
|
||||
@ -114,22 +114,27 @@ function SaveStatusBadge() {
|
||||
|
||||
let icon: string;
|
||||
let title: string;
|
||||
let tooltip: string;
|
||||
switch (state) {
|
||||
case "saved":
|
||||
icon = "bx bx-check";
|
||||
title = t("breadcrumb_badges.save_status_saved");
|
||||
tooltip = t("breadcrumb_badges.save_status_saved_tooltip");
|
||||
break;
|
||||
case "saving":
|
||||
icon = "bx bx-loader bx-spin";
|
||||
title = t("breadcrumb_badges.save_status_saving");
|
||||
tooltip = t("breadcrumb_badges.save_status_saving_tooltip");
|
||||
break;
|
||||
case "unsaved":
|
||||
icon = "bx bx-pencil";
|
||||
title = t("breadcrumb_badges.save_status_unsaved");
|
||||
tooltip = t("breadcrumb_badges.save_status_unsaved_tooltip");
|
||||
break;
|
||||
case "error":
|
||||
icon = "bx bxs-error";
|
||||
title = t("breadcrumb_badges.save_status_error");
|
||||
tooltip = t("breadcrumb_badges.save_status_error_tooltip");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -138,6 +143,7 @@ function SaveStatusBadge() {
|
||||
className={clsx("save-status-badge", state)}
|
||||
icon={icon}
|
||||
text={title}
|
||||
tooltip={tooltip}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user