This commit is contained in:
John King 2024-06-14 11:25:01 +00:00 committed by GitHub
commit 0ba64daf05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -16,14 +16,14 @@ autoUpdater.on('error', error => {
autoUpdater.on('update-available', () => { autoUpdater.on('update-available', () => {
if (win) { if (win) {
win.webContents.send('mt::UPDATE_AVAILABLE', 'Found an update, do you want download and install now?') win.webContents.send('mt::UPDATE_AVAILABLE', 'New version is now available. Download and install?')
} }
runningUpdate = false runningUpdate = false
}) })
autoUpdater.on('update-not-available', () => { autoUpdater.on('update-not-available', () => {
if (win) { if (win) {
win.webContents.send('mt::UPDATE_NOT_AVAILABLE', 'Current version is up-to-date.') win.webContents.send('mt::UPDATE_NOT_AVAILABLE', 'There are currently no updates available')
} }
runningUpdate = false runningUpdate = false
}) })
@ -33,7 +33,7 @@ autoUpdater.on('update-downloaded', () => {
// not just force close the application. // not just force close the application.
if (win) { if (win) {
win.webContents.send('mt::UPDATE_DOWNLOADED', 'Update downloaded, application will be quit for update...') win.webContents.send('mt::UPDATE_DOWNLOADED', 'Update downloaded. MarkText will now close and update')
} }
setImmediate(() => autoUpdater.quitAndInstall()) setImmediate(() => autoUpdater.quitAndInstall())
}) })

View File

@ -95,6 +95,9 @@ export default {
closeAll () { closeAll () {
this.$store.dispatch('CLOSE_ALL_TABS') this.$store.dispatch('CLOSE_ALL_TABS')
}, },
changeMaxWidth (width) {
this.$store.dispatch('CHANGE_SIDE_BAR_WIDTH', width)
},
rename (tabId) { rename (tabId) {
const tab = this.tabs.find(f => f.id === tabId) const tab = this.tabs.find(f => f.id === tabId)
if (tab && tab.pathname) { if (tab && tab.pathname) {
@ -128,6 +131,7 @@ export default {
bus.$on('TABS::rename', this.rename) bus.$on('TABS::rename', this.rename)
bus.$on('TABS::copy-path', this.copyPath) bus.$on('TABS::copy-path', this.copyPath)
bus.$on('TABS::show-in-folder', this.showInFolder) bus.$on('TABS::show-in-folder', this.showInFolder)
bus.$on('EDITOR_TABS::change-max-width', this.changeMaxWidth)
}) })
}, },
mounted () { mounted () {