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
4 changes: 2 additions & 2 deletions bun.lock

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

4 changes: 2 additions & 2 deletions 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.20260108.0",
"version": "0.20260110.0",
"scripts": {
"archive:web": "bun src/renderer/scripts/archive.web.js",
"build": "electron-vite build",
Expand Down Expand Up @@ -54,7 +54,7 @@
"primeicons": "^7.0.0",
"primevue": "4.2.5",
"quill": "^2.0.3",
"systeminformation": "^5.30.1",
"systeminformation": "^5.30.2",
"ua-parser-js": "^2.0.7",
"vue": "3.4.21"
},
Expand Down
4 changes: 2 additions & 2 deletions src/main/SplashScreenWindow.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as electron from 'electron';

import * as constants from '../renderer/src/common/constants';
import { COPYRIGHT } from '../renderer/src/common/constants';

import { ApplicationWindow } from './ApplicationWindow';
import { electronConf, type IElectronConfState } from './index';
Expand Down Expand Up @@ -35,7 +35,7 @@ export class SplashScreenWindow extends ApplicationWindow {

this.on('ready-to-show', () => {
this.webContents.send('init-splash-screen-window', {
copyright: constants.COPYRIGHT,
copyright: COPYRIGHT,
version: electron.app.getVersion()
});
});
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.20260108.0",
"version": "0.20260110.0",
"scripts": {
"build": "vite build",
"build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/common/common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SHA256 from 'crypto-js/sha256';
import { UAParser } from 'ua-parser-js';

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

// Some interfaces.

Expand Down
16 changes: 8 additions & 8 deletions src/renderer/src/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const URI_SCHEME = 'opencor';
export const FULL_URI_SCHEME = `${URI_SCHEME}://`;
export const URI_SCHEME: string = 'opencor';
export const FULL_URI_SCHEME: string = `${URI_SCHEME}://`;

export const SHORT_DELAY = 69;
export const MEDIUM_DELAY = 169;
export const LONG_DELAY = 369;
export const SHORT_DELAY: number = 69;
export const MEDIUM_DELAY: number = 169;
export const LONG_DELAY: number = 369;

export const TOAST_LIFE = 3000;
export const TOAST_LIFE: number = 3000;

const crtYear = new Date().getFullYear();
const crtYear: number = new Date().getFullYear();

export const COPYRIGHT = crtYear === 2025 ? '2025' : `2025-${String(crtYear)}`;
export const COPYRIGHT: string = crtYear === 2025 ? '2025' : `2025-${String(crtYear)}`;
2 changes: 1 addition & 1 deletion src/renderer/src/common/electronApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ISettings } from './common.js';
import type { ISettings } from './common.ts';

export interface ISplashScreenInfo {
copyright: string;
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/common/locCommon.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { corsProxyUrl, sha256 } from '../common/common.js';
import * as locApi from '../libopencor/locApi.js';
import { corsProxyUrl, sha256 } from '../common/common.ts';
import * as locApi from '../libopencor/locApi.ts';

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

// Some file-related methods.

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/common/settings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ISettings, ISettingsGeneral } from './common.js';
import { electronApi } from './electronApi.js';
import type { ISettings, ISettingsGeneral } from './common.ts';
import { electronApi } from './electronApi.ts';

class Settings {
protected static _instance: Settings | null = null;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/common/vueCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as vueusecore from '@vueuse/core';

import * as vue from 'vue';

import type { Theme } from '../../index.js';
import type { Theme } from '../../index.ts';

// A constant to know the UID of the active instance of OpenCOR.

Expand Down
15 changes: 13 additions & 2 deletions src/renderer/src/components/BackgroundComponent.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>
<div class="flex justify-center items-center h-full overflow-hidden">
<img
class="max-w-[311px] max-h-[266.92px] rounded-2xl p-2 shadow-[0_0_0.75rem_0.375rem_var(--p-content-border-color)]"
class="logo z-10 max-w-311 max-h-[266.92px] rounded-2xl p-2 shadow-[0_0_0.75rem_0.375rem_var(--p-content-border-color)]"
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>
</template>

Expand All @@ -13,6 +15,15 @@
* - Height: 704.92px.
* Final dimensions:
* - Width: 303px + 8px = 311px; and
* - Height: 257.92px + 8px = 266.92px
* - Height: 257.92px + 8px = 266.92px.
*/

import { COPYRIGHT } from '../common/constants.ts';
import { version } from '../../package.json';
</script>

<style scoped>
.logo {
background-color: var(--p-content-background);
}
</style>
4 changes: 2 additions & 2 deletions src/renderer/src/components/dialogs/AboutDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="text-center">
<div class="text-3xl font-bold">OpenCOR {{ version }}</div>
<div v-if="electronApi !== undefined" class="text-xl italic font-bold">{{ electronApi.operatingSystem() }}</div>
<div class="text-sm italic">Copyright {{ constants.COPYRIGHT }}</div>
<div class="text-sm italic">Copyright {{ COPYRIGHT }}</div>
</div>
<div class="space-y-2">
<div>
Expand Down Expand Up @@ -41,7 +41,7 @@
</template>

<script setup lang="ts">
import * as constants from '../../common/constants';
import { COPYRIGHT } from '../../common/constants';
import { electronApi } from '../../common/electronApi';
import * as locApi from '../../libopencor/locApi';

Expand Down
18 changes: 9 additions & 9 deletions src/renderer/src/libopencor/locApi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { corsProxyUrl } from '../common/common.js';
import { corsProxyUrl } from '../common/common.ts';

import type { EFileType, IWasmFile, IWasmFileManager } from './locFileApi.js';
import type { IIssue } from './locLoggerApi.js';
import type { IWasmSedChangeAttribute, IWasmSedDocument } from './locSedApi.js';
import type { EFileType, IWasmFile, IWasmFileManager } from './locFileApi.ts';
import type { IIssue } from './locLoggerApi.ts';
import type { IWasmSedChangeAttribute, IWasmSedDocument } from './locSedApi.ts';

export interface ICppLocApi {
// FileManager API.
Expand Down Expand Up @@ -141,11 +141,11 @@ export async function initialiseLocApi() {

// Logger API.

export { EIssueType, type IIssue, type IWasmIssues, wasmIssuesToIssues } from './locLoggerApi.js';
export { EIssueType, type IIssue, type IWasmIssues, wasmIssuesToIssues } from './locLoggerApi.ts';

// File API.

export { EFileType, File, fileManager, type IWasmFile } from './locFileApi.js';
export { EFileType, File, fileManager, type IWasmFile } from './locFileApi.ts';

// SED-ML API.

Expand All @@ -155,7 +155,7 @@ export {
SedInstance,
SedInstanceTask,
SedSimulationUniformTimeCourse
} from './locSedApi.js';
} from './locSedApi.ts';

// UI JSON API.

Expand All @@ -169,8 +169,8 @@ export {
type IUiJsonOutputPlotAdditionalTrace,
type IUiJsonParameter,
uiJsonIssues
} from './locUiJsonApi.js';
} from './locUiJsonApi.ts';

// Version API.

export { cppVersion, version, wasmVersion } from './locVersionApi.js';
export { cppVersion, version, wasmVersion } from './locVersionApi.ts';
2 changes: 1 addition & 1 deletion src/renderer/src/libopencor/locFileApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
type IWasmIssues,
SedDocument,
wasmIssuesToIssues
} from './locApi.js';
} from './locApi.ts';

// FileManager API.

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/libopencor/locSedApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type IWasmIssues,
wasmIssuesToIssues,
wasmVersion
} from './locApi.js';
} from './locApi.ts';

// SED-ML API.

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/libopencor/locUiJsonApi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as jsonschema from 'jsonschema';

import * as common from '../common/common.js';
import * as common from '../common/common.ts';

import { EIssueType, type IIssue } from './locLoggerApi.js';
import { EIssueType, type IIssue } from './locLoggerApi.ts';

export interface IUiJson {
input: IUiJsonInput[];
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/libopencor/locVersionApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { electronApi } from '../common/electronApi.js';
import { electronApi } from '../common/electronApi.ts';

import { _cppLocApi, _wasmLocApi } from './locApi.js';
import { _cppLocApi, _wasmLocApi } from './locApi.ts';

// Some general methods.

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"compilerOptions": {
"allowImportingTsExtensions": false,
"allowImportingTsExtensions": true,
"baseUrl": ".",
"composite": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"noEmit": false,
"noEmit": true,
"strictNullChecks": true,
"resolveJsonModule": true
},
Expand Down
10 changes: 7 additions & 3 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"compilerOptions": {
"allowImportingTsExtensions": false,
"allowImportingTsExtensions": true,
"baseUrl": ".",
"composite": true,
"noEmit": false
"module": "nodenext",
"moduleResolution": "nodenext",
"noEmit": true,
"strictNullChecks": true,
"resolveJsonModule": true
},
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["src/**/*.ts"]
"include": ["**/*.js", "**/*.ts", "**/*.vue", "package.json"]
}