From 1a682182671fa9ea5f8fa2390bd8727fae2ff4ae Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 20 Mar 2022 01:45:06 +0100 Subject: [PATCH] feat: confirm before closing the browser tab (#723) when the editor is open and file is changed --- src/components/TheEditor.vue | 34 +++++++++++++++++++++++++++------- src/plugins/helpers.ts | 5 +++++ src/store/editor/actions.ts | 5 ++++- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/components/TheEditor.vue b/src/components/TheEditor.vue index d94e2273..c1ef7e06 100644 --- a/src/components/TheEditor.vue +++ b/src/components/TheEditor.vue @@ -17,7 +17,7 @@ (filepath ? filepath.slice(1) + '/' : '') + filename + ' ' + - (isWriteable ? changed : '(' + $t('Editor.FileReadOnly') + ')') + (isWriteable ? changedOutput : '(' + $t('Editor.FileReadOnly') + ')') ">