Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "git+https://github.com/opencor/webapp.git"
},
"type": "module",
"version": "0.20260209.2",
"version": "0.20260209.3",
"scripts": {
"archive:web": "bun src/renderer/scripts/archive.web.js",
"build": "electron-vite build",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"./style.css": "./dist/opencor.css"
},
"version": "0.20260209.2",
"version": "0.20260209.3",
"scripts": {
"build": "vite build && bun scripts/generate.version.js",
"build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/common/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import packageJson from '../../package.json' with { type: 'json' };

import { electronApi } from './electronApi.ts';

const { version } = packageJson;
const { version: currentVersion } = packageJson;

// State to track whether an update is available and the latest version.

Expand Down Expand Up @@ -47,7 +47,7 @@ const checkForUpdates = async (): Promise<boolean> => {

// Compare versions.

const isNewer = isNewerVersion(latestVersion.value, version);
const isNewer = isNewerVersion(latestVersion.value, currentVersion);

updateAvailable.value = isNewer;

Expand Down Expand Up @@ -117,4 +117,4 @@ const reloadApp = (): void => {

// Export the version checking functions and state.

export { latestVersion, reloadApp, startCheck, updateAvailable };
export { currentVersion, latestVersion, reloadApp, startCheck, updateAvailable };
6 changes: 2 additions & 4 deletions src/renderer/src/components/BackgroundComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
src="../assets/logo.svg"
/>
<div class="absolute bottom-1 left-2 text-xs text-neutral-400 dark:text-neutral-600">Copyright {{ COPYRIGHT }}</div>
<div class="absolute bottom-1 right-2 text-xs text-neutral-400 dark:text-neutral-600">Version {{ version }}</div>
<div class="absolute bottom-1 right-2 text-xs text-neutral-400 dark:text-neutral-600">Version {{ currentVersion }}</div>
</div>
</template>

Expand All @@ -18,11 +18,9 @@
* - Height: 257.92px + 8px = 266.92px.
*/

import packageJson from '../../package.json' with { type: 'json' };
import { currentVersion } from '../common/version.ts';

import { COPYRIGHT } from '../common/constants.ts';

const { version } = packageJson;
</script>

<style scoped>
Expand Down
6 changes: 2 additions & 4 deletions src/renderer/src/components/dialogs/AboutDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<BaseDialog header=" " class="w-169">
<div class="space-y-7">
<div class="text-center">
<div class="text-3xl font-bold">OpenCOR {{ version }}</div>
<div class="text-3xl font-bold">OpenCOR {{ currentVersion }}</div>
<div v-if="electronApi" class="text-xl italic font-bold">{{ electronApi.operatingSystem() }}</div>
<div class="text-sm italic">Copyright {{ COPYRIGHT }}</div>
</div>
Expand Down Expand Up @@ -41,14 +41,12 @@
</template>

<script setup lang="ts">
import packageJson from '../../../package.json' with { type: 'json' };
import { currentVersion } from '../../common/version.ts';

import { COPYRIGHT } from '../../common/constants.ts';

import { electronApi } from '../../common/electronApi.ts';
import * as locApi from '../../libopencor/locApi.ts';

defineEmits<(event: 'close') => void>();

const { version } = packageJson;
</script>