-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Polished About and started Settings page
Sadly updater is broken for electron v7 currently, so added temporary manual updater... First implementation of store successful, next will be persistent data storage
- Loading branch information
Showing
11 changed files
with
265 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
<template> | ||
<v-card height="150"> | ||
<v-footer fixed color="primary" dark class="font-weight-medium"> | ||
<v-footer v-if="!isHidden" fixed class="footer font-weight-medium"> | ||
<v-col class="text-center" cols="12"> | ||
<strong><v-icon>mdi-mushroom</v-icon> Houby Studio</strong> | ||
{{ new Date().getFullYear() }} | ||
</v-col> | ||
</v-footer> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'footer-bar', | ||
computed: { | ||
isHidden () { | ||
return this.$store.state.footerIsHidden | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* updater.js | ||
* | ||
* Please use manual update only when it is really required, otherwise please use recommended non-intrusive auto update. | ||
* | ||
* Import steps: | ||
* 1. create `updater.js` for the code snippet | ||
* 2. require `updater.js` for menu implementation, and set `checkForUpdates` callback from `updater` for the click property of `Check Updates...` MenuItem. | ||
*/ | ||
const { dialog } = require('electron') | ||
const { autoUpdater } = require('electron-updater') | ||
|
||
let updater | ||
autoUpdater.autoDownload = false | ||
|
||
autoUpdater.on('error', (error) => { | ||
dialog.showErrorBox('Error: ', error == null ? 'unknown' : (error.stack || error).toString()) | ||
}) | ||
|
||
autoUpdater.on('update-available', () => { | ||
dialog.showMessageBox({ | ||
type: 'info', | ||
title: 'Found Updates', | ||
message: 'Found updates, do you want update now?', | ||
buttons: ['Sure', 'No'] | ||
}, (buttonIndex) => { | ||
if (buttonIndex === 0) { | ||
autoUpdater.downloadUpdate() | ||
} else { | ||
updater.enabled = true | ||
updater = null | ||
} | ||
}) | ||
}) | ||
|
||
autoUpdater.on('update-not-available', () => { | ||
dialog.showMessageBox({ | ||
title: 'No Updates', | ||
message: 'Current version is up-to-date.' | ||
}) | ||
updater.enabled = true | ||
updater = null | ||
}) | ||
|
||
autoUpdater.on('update-downloaded', () => { | ||
dialog.showMessageBox({ | ||
title: 'Install Updates', | ||
message: 'Updates downloaded, application will be quit for update...' | ||
}, () => { | ||
setImmediate(() => autoUpdater.quitAndInstall()) | ||
}) | ||
}) | ||
|
||
// export this to MenuItem click callback | ||
function checkForUpdates (menuItem, focusedWindow, event) { | ||
updater = menuItem | ||
updater.enabled = false | ||
autoUpdater.checkForUpdates() | ||
} | ||
module.exports.checkForUpdates = checkForUpdates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.