update offline state message when saving#2027
Conversation
src/components/EditorWrapper.vue
Outdated
| }, | ||
| lastSavedStatus() { | ||
| return this.dirtyStateIndicator ? t('text', 'Saving …') : t('text', 'Saved') | ||
| return this.hasConnectionIssue ? t('text', 'Offline, changes will be saved when online') : this.dirtyStateIndicator ? t('text', 'Saving …') : t('text', 'Saved') |
There was a problem hiding this comment.
Small suggest to improve readability of the code:
| return this.hasConnectionIssue ? t('text', 'Offline, changes will be saved when online') : this.dirtyStateIndicator ? t('text', 'Saving …') : t('text', 'Saved') | |
| if (this.hasConnectionIssue) { | |
| return t('text', 'Connection lost. Will be saved once connection is restored.') | |
| } | |
| return this.dirtyStateIndicator ? t('text', 'Saving …') : t('text', 'Saved') |
Otherwise good to go with the new wording from my side.
There was a problem hiding this comment.
Now the logic to check for this.hasConnectionIssue is doubled, looks like that was accidently @luka-nextcloud 😬
fa4dd4e to
395f1d9
Compare
75478aa to
b98c1ae
Compare
|
@mejo- Fixed :) |
src/components/EditorWrapper.vue
Outdated
| } | ||
| .connection-error:after { | ||
| visibility: visible; | ||
| content: 'Offline'; |
There was a problem hiding this comment.
That won't work with translations unfortunately, but you can just return the translated text of Offline within the lastSavedStatus method by using the isMobile mixin
Line 23 in 5eb7b20
b98c1ae to
9868e29
Compare
|
@luka-nextcloud You might have launched IMO a simple way to do this would be: # while being in your branch with a clean status
# this will cancel the last commit but keep the changes
git reset HEAD~
# then this will get rid of the changes to package-lock.json
git checkout package-lock.json
git commit -a -m "update offline state message when saving"
git push origin fix/offline-state-issue -f |
b9b9f8c to
3460b41
Compare
|
@luka-nextcloud I think your commit is missing the built javascript assets. If you rebase the PR against master and then run |
|
Hmm, it looks strange - let me check and try again. |
Signed-off-by: Luka Trovic <[email protected]>
3460b41 to
90e54e4
Compare
Signed-off-by: Luka Trovic [email protected]
Resolves: #
Offline state: "Offline, changes will be saved when online"Target version: master
Summary
Add a status message for offline state.