Skip to content

Commit

Permalink
fix (#22)
Browse files Browse the repository at this point in the history
* feat: added readme file

* feat: search support and bug fixes (#4)

* fix: Auto updater with github gist (#6)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing macos build (#8)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert (#10)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: macos cert (#12)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* release (#13) (#14)

* feat: added readme file

* feat: search support and bug fixes (#4)

* fix: Auto updater with github gist (#6)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing macos build (#8)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert (#10)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: macos cert (#12)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* disabled macos support (#15)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* release (#13)

* feat: added readme file

* feat: search support and bug fixes (#4)

* fix: Auto updater with github gist (#6)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing macos build (#8)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert (#10)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: macos cert (#12)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* update: disabled mac and linux support

* Dev (#17)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* release (#13)

* feat: added readme file

* feat: search support and bug fixes (#4)

* fix: Auto updater with github gist (#6)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing macos build (#8)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert (#10)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: macos cert (#12)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* update: disabled mac and linux support

* disabled mac

* feat: testing auto updates with gist (#19)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* release (#13)

* feat: added readme file

* feat: search support and bug fixes (#4)

* fix: Auto updater with github gist (#6)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing macos build (#8)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert (#10)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: macos cert (#12)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* update: disabled mac and linux support

* disabled mac

* feat: testing auto updater with gist

* feat: testing auto updater with gist

* fix: build (#21)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* release (#13)

* feat: added readme file

* feat: search support and bug fixes (#4)

* fix: Auto updater with github gist (#6)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing macos build (#8)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert (#10)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: macos cert (#12)

* feat: search support and bug fixes

* fix: auto updater
Added github gist for testing auto updates

* fix: testing build for macos

* fix: testing macos cert

* fix: building macos cert

* update: disabled mac and linux support

* disabled mac

* feat: testing auto updater with gist

* feat: testing auto updater with gist

* fix: build fix
  • Loading branch information
HoaX7 authored Sep 21, 2024
1 parent bb6dbd2 commit 2a7be82
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
68 changes: 34 additions & 34 deletions app/src/api/update.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
import {
checkUpdate,
installUpdate,
onUpdaterEvent,
} from "@tauri-apps/api/updater";
import { relaunch } from "@tauri-apps/api/process";
// import {
// checkUpdate,
// installUpdate,
// onUpdaterEvent,
// } from "@tauri-apps/api/updater";
// import { relaunch } from "@tauri-apps/api/process";

const unlisten = await onUpdaterEvent(({ error, status }) => {
// This will log all updater events, including status updates and errors.
console.log("Updater event", error, status);
});
// const unlisten = await onUpdaterEvent(({ error, status }) => {
// // This will log all updater events, including status updates and errors.
// console.log("Updater event", error, status);
// });

// try {
// const { shouldUpdate, manifest } = await checkUpdate();
// console.log({
// shouldUpdate,
// manifest
// });
// if (shouldUpdate) {
// const ask = window.confirm("A new update is available");
// // You could show a dialog asking the user if they want to install the update here.
// console.log(
// `Installing update ${manifest?.version}, ${manifest?.date}, ${manifest?.body}`
// );

try {
const { shouldUpdate, manifest } = await checkUpdate();
console.log({
shouldUpdate,
manifest
});
if (shouldUpdate) {
const ask = window.confirm("A new update is available");
// You could show a dialog asking the user if they want to install the update here.
console.log(
`Installing update ${manifest?.version}, ${manifest?.date}, ${manifest?.body}`
);
// // Install the update. This will also restart the app on Windows!
// // await installUpdate();

// Install the update. This will also restart the app on Windows!
// await installUpdate();
// // // On macOS and Linux you will need to restart the app manually.
// // // You could use this step to display another confirmation dialog.
// // await relaunch();
// }
// } catch (error) {
// console.error(error);
// }

// // On macOS and Linux you will need to restart the app manually.
// // You could use this step to display another confirmation dialog.
// await relaunch();
}
} catch (error) {
console.error(error);
}

// you need to call unlisten if your handler goes out of scope, for example if the component is unmounted.
unlisten();
// // you need to call unlisten if your handler goes out of scope, for example if the component is unmounted.
// unlisten();
2 changes: 1 addition & 1 deletion app/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { page } from "$app/stores";
import SettingStore from "../store/settings";
import { MAC_OS } from "../utils/constants";
import "../api/update";
// import "../api/update";
import { getVersion } from "@tauri-apps/api/app";
ContextStore.init();
Expand Down

0 comments on commit 2a7be82

Please sign in to comment.