Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Improve update visibility and integrate automatic updates for Windows #11

Merged
merged 29 commits into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4349e93
ci: remove circleci
herteleo Aug 13, 2020
6058ebb
ci: add lint action
herteleo Aug 13, 2020
0fcb325
ci: fix actions/setup-node version
herteleo Aug 13, 2020
f6cf7e7
ci: add release action
herteleo Aug 13, 2020
941bda0
chore: update semantic-release
herteleo Aug 13, 2020
e56a7e2
ci: build release artifacts
herteleo Aug 13, 2020
6497daf
ci: switch 'only tags' syntax for build action
herteleo Aug 13, 2020
041f8dc
ci: switch 'only tags' syntax for build action
herteleo Aug 13, 2020
81c1ab1
ci: switch to personal access token to trigger action
herteleo Aug 13, 2020
55a4a2d
ci: switch 'only tags' syntax for build action
herteleo Aug 13, 2020
0ce4e33
ci: switch access token for checkout
herteleo Aug 13, 2020
a48849f
ci: add electron-builder args
herteleo Aug 13, 2020
5f0a7cf
ci: prevent lint + release on tag push
herteleo Aug 13, 2020
1d3d6b1
ci: lint on all branches
herteleo Aug 13, 2020
d63ea9a
ci: revert "prevent lint + release on tag push"
herteleo Aug 14, 2020
115fa98
ci: change args format
herteleo Aug 14, 2020
8be780c
ci: move build args to electron-builder config
herteleo Aug 14, 2020
14b484a
ci: add missing provider
herteleo Aug 14, 2020
bf0ee9c
ci: simplify build step
herteleo Aug 18, 2020
55bf885
ci: reintegrate workflow name
herteleo Aug 18, 2020
ac0fe67
ci: add missing 'run'
herteleo Aug 18, 2020
e646ee6
ci: skip jobs on release
herteleo Aug 18, 2020
6d1c32f
ci: lint only on branches
herteleo Aug 18, 2020
ec72b97
feat: integrate app update checker and automatic updates
herteleo Aug 18, 2020
b1d9b09
fix: call remote update checker
herteleo Aug 18, 2020
3b03f47
feat: integrate auto-updater into ui
herteleo Nov 13, 2020
e396ac9
fix: correct update-checker-interval
herteleo Nov 13, 2020
d25b478
Merge pull request #11 from pigmentapp/dev
herteleo Nov 13, 2020
cc72815
refactor: remove unused interval
herteleo Nov 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
101 changes: 87 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"date-fns": "^2.15.0",
"deepmerge": "^4.2.2",
"electron-dl": "^1.14.0",
"electron-updater": "^4.3.5",
"electron-window-state": "^5.0.3",
"is-url-relative-without-domain": "^2.0.0",
"lodash-id": "^0.14.0",
Expand Down
3 changes: 3 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import electronDl from 'electron-dl';
import windowStateKeeper from 'electron-window-state';
import * as path from 'path';
import { format as formatUrl } from 'url';
import checkForUpdates from '@/utils/updater';

import {
app, Menu, protocol, BrowserWindow, shell,
Expand Down Expand Up @@ -76,6 +77,8 @@ function createMainWindow() {
protocol: 'file',
slashes: true,
}));

checkForUpdates();
}

window.on('ready-to-show', () => {
Expand Down
4 changes: 4 additions & 0 deletions src/components/AppButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export default {
border rounded;
}

.button[disabled] {
@apply opacity-75;
}

.primary {
@apply text-white bg-gray-600 border-gray-500 shadow;
}
Expand Down
21 changes: 21 additions & 0 deletions src/components/AppIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[$style.icon]: true,
[$style.inline]: inline,
[$style[`size-${size}`]]: true,
[$style.spin]: spin,
}"
viewBox="0 0 24 24"
>
Expand All @@ -29,6 +30,10 @@ export default {
type: Number,
default: 4,
},
spin: {
type: Boolean,
default: false,
},
},
computed: {
content() {
Expand Down Expand Up @@ -62,4 +67,20 @@ export default {
.size-8 {
@apply w-8 h-8;
}

.spin {
animation-name: spin;
animation-duration: 1000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}

@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
14 changes: 13 additions & 1 deletion src/components/SideBarButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
:face="icon"
:size="6"
/>
<span
v-if="showBadge"
:class="$style.badge"
/>
</div>
<div
v-if="$slots.default && showLabel"
Expand All @@ -29,6 +33,10 @@ export default {
type: String,
required: true,
},
showBadge: {
type: Boolean,
default: false,
},
showLabel: {
type: Boolean,
required: true,
Expand All @@ -51,10 +59,14 @@ export default {
}

.icon {
@apply flex-shrink-0 px-2;
@apply relative flex-shrink-0 px-2;
}

.label {
@apply flex-grow pl-2 whitespace-no-wrap;
}

.badge {
@apply absolute top-0 left-0 w-2 h-2 ml-1 bg-teal-500 rounded-full;
}
</style>
19 changes: 19 additions & 0 deletions src/components/TheSideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
</side-bar-button>
<side-bar-button
:to="{ name: 'home' }"
:show-badge="showMenuBadge"
:show-label="displaysTabLabels"
icon="Menu"
title="Show menu"
@click.native="showMenuBadge = false"
@contextmenu.native.prevent="showMenu"
>
Menu
Expand All @@ -33,12 +35,25 @@ export default {
SideBarButton,
TabsNav,
},
data() {
return {
showMenuBadge: false,
};
},
computed: {
displaysTabLabels() {
const key = 'navigation.displayTabLabels';
return this.$store.getters['Settings/byKey'](key);
},
},
created() {
remote.app.on('app-update-available', (info) => {
if (this.$route.name !== 'home') {
this.showMenuBadge = true;
}
this.$store.commit('SET_UPDATE_INFO', info);
});
},
methods: {
showMenu() {
const settingsMenu = remote.Menu.buildFromTemplate([
Expand Down Expand Up @@ -72,6 +87,10 @@ export default {
click: () => this.$router.push({ name: 'settings' }),
},
{ type: 'separator' },
{
label: 'Check for updates…',
click: () => remote.app.emit('app-update-check'),
},
{ role: 'toggledevtools' },
]);

Expand Down