Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support vite3 for Vue #1746

Merged
merged 2 commits into from
Aug 20, 2022
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.2.25"
"vue": "^3.2.37"
},
"devDependencies": {
"@vitejs/plugin-vue": "^2.3.3",
"typescript": "^4.5.4",
"vite": "^2.9.9",
"vue-tsc": "^0.34.7",
"@babel/types": "^7.17.10"
"@vitejs/plugin-vue": "^3.0.3",
"typescript": "^4.6.4",
"vite": "^3.0.7",
"vue-tsc": "^0.39.5",
"@babel/types": "^7.18.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

declare module '*.vue' {
import type {DefineComponent} from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export interface Size {
h: number;
}

export interface Screen {
isCurrent: boolean;
isPrimary: boolean;
width: number
height: number
}

// Environment information such as platform, buildtype, ...
export interface EnvironmentInfo {
buildType: string;
Expand Down Expand Up @@ -171,6 +178,10 @@ export function WindowUnminimise(): void;
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;

// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)
// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.
export function ScreenGetAll(): Promise<Screen[]>;

// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
export function BrowserOpenURL(url: string): void;
Expand All @@ -182,3 +193,11 @@ export function Environment(): Promise<EnvironmentInfo>;
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
// Quits the application.
export function Quit(): void;

// [Hide](https://wails.io/docs/reference/runtime/intro#hide)
// Hides the application.
export function Hide(): void;

// [Show](https://wails.io/docs/reference/runtime/intro#show)
// Shows the application.
export function Show(): void;
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}

export function ScreenGetAll() {
return window.runtime.ScreenGetAll();
}

export function BrowserOpenURL(url) {
window.runtime.BrowserOpenURL(url);
}
Expand All @@ -161,6 +165,10 @@ export function Quit() {
window.runtime.Quit();
}

export function ScreenGetAll() {
return window.runtime.ScreenGetAll();
}
export function Hide() {
window.runtime.Hide();
}

export function Show() {
window.runtime.Show();
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.2.25"
"vue": "^3.2.37"
},
"devDependencies": {
"@vitejs/plugin-vue": "^2.3.3",
"vite": "^2.9.9"
"@vitejs/plugin-vue": "^3.0.3",
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export interface Size {
h: number;
}

export interface Screen {
isCurrent: boolean;
isPrimary: boolean;
width: number
height: number
}

// Environment information such as platform, buildtype, ...
export interface EnvironmentInfo {
buildType: string;
Expand Down Expand Up @@ -171,6 +178,10 @@ export function WindowUnminimise(): void;
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;

// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)
// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.
export function ScreenGetAll(): Promise<Screen[]>;

// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
export function BrowserOpenURL(url: string): void;
Expand All @@ -182,3 +193,11 @@ export function Environment(): Promise<EnvironmentInfo>;
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
// Quits the application.
export function Quit(): void;

// [Hide](https://wails.io/docs/reference/runtime/intro#hide)
// Hides the application.
export function Hide(): void;

// [Show](https://wails.io/docs/reference/runtime/intro#show)
// Shows the application.
export function Show(): void;
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}

export function ScreenGetAll() {
return window.runtime.ScreenGetAll();
}

export function BrowserOpenURL(url) {
window.runtime.BrowserOpenURL(url);
}
Expand All @@ -161,6 +165,10 @@ export function Quit() {
window.runtime.Quit();
}

export function ScreenGetAll() {
return window.runtime.ScreenGetAll();
}
export function Hide() {
window.runtime.Hide();
}

export function Show() {
window.runtime.Show();
}