Skip to content

Commit

Permalink
update testing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Jan 3, 2024
1 parent fa4c5b4 commit d7f5047
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 34 deletions.
2 changes: 0 additions & 2 deletions dist/assets/index-09e9c7c6.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/assets/index-09e9c7c6.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/assets/index-b18c0291.css

This file was deleted.

2 changes: 2 additions & 0 deletions dist/assets/index-d5120c7d.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/index-d5120c7d.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/index-e225b5d2.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="module" crossorigin src="/assets/index-09e9c7c6.js"></script>
<link rel="stylesheet" href="/assets/index-b18c0291.css">
<script type="module" crossorigin src="/assets/index-d5120c7d.js"></script>
<link rel="stylesheet" href="/assets/index-e225b5d2.css">
</head>
<body>

Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.canary.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"package": {
"productName": "carpe-canary",
"version": "1.0.0-12"
"version": "0.0.0-12"
},
"build": {
"distDir": "../dist",
Expand All @@ -16,7 +16,7 @@
"https://gist.githubusercontent.com/0o-de-lally/06315efd195d1e99ba517d6a7ecd380f/raw/updater.json"
],
"dialog": false,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQ5MDAwOTM0Q0FBQjQxQ0YKUldUUFFhdktOQWtBMlp3RzQvd0JwTXREQVpjUFNoWFBMS0FrOGZVbVBjWFFBQ2d5elZDSUVteSsK"
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU3NzUyQUY4QzY0QUE0NDkKUldSSnBFckcrQ3AxNTdJOXBkSkVpaXYyczBhNm9GTDZqWFc5SzJteXU4Sm5idGV0SThLdWpMQ1cK"
},
"bundle": {
"active": true,
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"https://gist.githubusercontent.com/0o-de-lally/06315efd195d1e99ba517d6a7ecd380f/raw/updater.json"
],
"dialog": false,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQ5MDAwOTM0Q0FBQjQxQ0YKUldUUFFhdktOQWtBMlp3RzQvd0JwTXREQVpjUFNoWFBMS0FrOGZVbVBjWFFBQ2d5elZDSUVteSsK"
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU3NzUyQUY4QzY0QUE0NDkKUldSSnBFckcrQ3AxNTdJOXBkSkVpaXYyczBhNm9GTDZqWFc5SzJteXU4Sm5idGV0SThLdWpMQ1cK"
},
"bundle": {
"active": true,
Expand Down
31 changes: 18 additions & 13 deletions src/components/about/About.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@
<div class="uk-flex uk-flex-center">
<h2 class="uk-text-light uk-text-muted uk-text-uppercase">{$_('about.about')}</h2>
</div>
<div class="uk-card uk-card-default uk-card-body uk-width-1-2@m">
<h3 class="uk-card-title uk-text-muted">{$_('about.release')}</h3>
<p class="uk-text-muted">
<span class="uk-text-bold">{$_('about.version')}: </span>v{release.version}
</p>
<p class="uk-text-muted">
<span class="uk-text-bold">{$_('about.commit')}: </span>{release.hash}
</p>
<p class="uk-text-muted">
<span class="uk-text-bold">{$_('about.branch')}: </span>{release.head}
</p>
<div class="uk-flex uk-flex-center">
<div class="uk-card uk-card-default uk-card-body uk-width-1-2@m">
<h3 class="uk-card-title uk-text-muted">{$_('about.release')}</h3>
<p class="uk-text-muted">
<span class="uk-text-bold">{$_('about.version')}: </span>v{release.version}
<UpgradeButtonManual />
</p>
{#if release.hash}
<p class="uk-text-muted">
<span class="uk-text-bold">{$_('about.commit')}: </span>{release.hash}
</p>
{/if}
{#if release.head}
<p class="uk-text-muted">
<span class="uk-text-bold">{$_('about.branch')}: </span>{release.head}
</p>
{/if}
</div>
</div>

<UpgradeButtonManual />
</main>
12 changes: 8 additions & 4 deletions src/components/about/UpgradeApp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
let unlisten
onMount(async () => {
unlisten = await onUpdaterEvent(({ error, status }) => {
// onMount(async () => {
// unlisten = await
// })
onUpdaterEvent(({ error, status }) => {
// This will log all updater events, including status updates and errors.
updateStatus.update((u) => {
u.error = error ?? null
u.status = status
return u
})
console.log('Updater event', error, status)
console.log('onMount Updater event', error, status)
})
})
onDestroy(() => {
// don't duplicate listener next time we navigate here
Expand All @@ -27,6 +28,9 @@
</script>

<main class="uk-padding">
Upgrade App
{JSON.stringify($updateStatus)}

{#if $updateStatus?.manifest}
<CardAlert>
<div slot="title">
Expand Down
21 changes: 17 additions & 4 deletions src/components/about/UpgradeButtonManual.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
<script lang="ts">
import { tryUpdate } from '../../modules/updater'
import { tryUpdate, updateStatus } from '../../modules/updater'
import { _ } from 'svelte-i18n'
let checking = $updateStatus.refreshing ?? false
let upToDate = $updateStatus.status == 'UPTODATE'
</script>

<main>
<button class="uk-button uk-button-default" on:click={tryUpdate}>Check For
Update</button>
<main class="uk-margin">
<div>
<p>
{#if upToDate}
{$_('about.upgrade_uptodate')}
{:else}
{$_('about.upgrade_available')}
{/if}
</p>
<button class="uk-button uk-button-default" on:click={tryUpdate} disabled={checking}>{$_('about.upgrade_checkagain')}</button>
</div>
</main>
5 changes: 4 additions & 1 deletion src/lang/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@
"release": "Release",
"version": "Version",
"branch": "Branch",
"commit": "Commit"
"commit": "Commit",
"upgrade_uptodate": "You are on the current version",
"upgrade_available": "There is an upgrade available",
"upgrade_checkagain": "Check Upgrade"
},
"settings": {
"title": "SETTINGS",
Expand Down
10 changes: 7 additions & 3 deletions src/modules/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export const tryUpdate = async () => {
updateStatus.set({ refreshing: true })
try {
const { shouldUpdate, manifest } = await checkUpdate()

const u = get(updateStatus)
if (shouldUpdate) {
const u = get(updateStatus)

u.msg = 'upgrade is available'
u.manifest = manifest

Expand All @@ -49,8 +49,12 @@ export const tryUpdate = async () => {
// You could use this step to display another confirmation dialog.
await relaunch()
u.refreshing = false
updateStatus.set(u)

} else {
u.msg = 'You are on the latest version'
u.refreshing = false
}
updateStatus.set(u)
} catch (e) {
updateStatus.update((u) => {
u.error = e
Expand Down

0 comments on commit d7f5047

Please sign in to comment.