Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: optimization auto saving

Ilian Sapundshiev98ffc6e8fbcd
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 6ec45b375..a38ed4959 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -592,10 +592,10 @@ function EntryContainer(props: Props) {
saveFile(textContent).then(success => {
if (success) {
fileChanged.current = false;
- showNotification(
- i18n.t('core:fileSavedSuccessfully'),
- NotificationTypes.default
- );
+ // showNotification(
+ // i18n.t('core:fileSavedSuccessfully'),
+ // NotificationTypes.default
+ // );
}
// change state will not render DOT before file name too
setSavingInProgress(false);
@@ -1317,7 +1317,9 @@ function EntryContainer(props: Props) {
color="primary"
startIcon={isDesktopMode && <CancelIcon />}
>
- {i18n.t('core:cancel')}
+ {fileChanged.current
+ ? i18n.t('core:cancel')
+ : i18n.t('core:closeButton')}
</Button>
</Tooltip>
<Tooltip
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 8ba1129a2..684917725 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -747,5 +747,6 @@
"day": "day",
"days": "days",
"change": "Change",
+ "fileSaved": "Saved",
"-": "-"
}