create-pixi-vn 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template-game-engine/package.json +1 -1
- package/template-lib/package.json +1 -1
- package/template-nqtr-react-vite-muijoy/package.json +1 -0
- package/template-nqtr-react-vite-muijoy/src/App.tsx +24 -5
- package/template-nqtr-react-vite-muijoy/src/components/AnimatedDots.tsx +1 -1
- package/template-nqtr-react-vite-muijoy-ink/package.json +1 -0
- package/template-nqtr-react-vite-muijoy-ink/src/App.tsx +24 -5
- package/template-nqtr-react-vite-muijoy-ink/src/components/AnimatedDots.tsx +1 -1
- package/template-nqtr-react-vite-muijoy-ink/src/labels/variousActionsLabels.ts +1 -1
- package/template-nqtr-react-vite-muijoy-ink-tauri/_github/workflows/tauri.yml +26 -69
- package/template-nqtr-react-vite-muijoy-ink-tauri/package.json +1 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/App.tsx +24 -5
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/components/AnimatedDots.tsx +1 -1
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/labels/variousActionsLabels.ts +1 -1
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/locales/strings_en.json +1 -0
- package/template-nqtr-react-vite-muijoy-ink-tauri/src/screens/MainMenu.tsx +5 -0
- package/template-nqtr-react-vite-muijoy-tauri/_github/workflows/tauri.yml +26 -69
- package/template-nqtr-react-vite-muijoy-tauri/package.json +1 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/App.tsx +24 -5
- package/template-nqtr-react-vite-muijoy-tauri/src/components/AnimatedDots.tsx +1 -1
- package/template-nqtr-react-vite-muijoy-tauri/src/locales/strings_en.json +1 -0
- package/template-nqtr-react-vite-muijoy-tauri/src/screens/MainMenu.tsx +5 -0
- package/template-react-vite-muijoy/package.json +1 -0
- package/template-react-vite-muijoy/src/App.tsx +24 -5
- package/template-react-vite-muijoy/src/components/AnimatedDots.tsx +1 -1
- package/template-react-vite-muijoy-ink/package.json +1 -0
- package/template-react-vite-muijoy-ink/src/App.tsx +24 -5
- package/template-react-vite-muijoy-ink/src/components/AnimatedDots.tsx +1 -1
- package/template-react-vite-muijoy-ink-tauri/_github/workflows/tauri.yml +26 -69
- package/template-react-vite-muijoy-ink-tauri/package.json +1 -0
- package/template-react-vite-muijoy-ink-tauri/src/App.tsx +24 -5
- package/template-react-vite-muijoy-ink-tauri/src/components/AnimatedDots.tsx +1 -1
- package/template-react-vite-muijoy-ink-tauri/src/locales/strings_en.json +1 -0
- package/template-react-vite-muijoy-ink-tauri/src/screens/MainMenu.tsx +5 -0
- package/template-react-vite-muijoy-tauri/_github/workflows/tauri.yml +26 -69
- package/template-react-vite-muijoy-tauri/package.json +1 -0
- package/template-react-vite-muijoy-tauri/src/App.tsx +24 -5
- package/template-react-vite-muijoy-tauri/src/components/AnimatedDots.tsx +1 -1
- package/template-react-vite-muijoy-tauri/src/locales/strings_en.json +1 -0
- package/template-react-vite-muijoy-tauri/src/screens/MainMenu.tsx +5 -0
- package/template-story-react-vite-muijoy/package.json +1 -0
- package/template-story-react-vite-muijoy/src/App.tsx +24 -5
- package/template-story-react-vite-muijoy/src/components/AnimatedDots.tsx +1 -1
- package/template-story-react-vite-muijoy-ink/package.json +1 -0
- package/template-story-react-vite-muijoy-ink/src/App.tsx +24 -5
- package/template-story-react-vite-muijoy-ink/src/components/AnimatedDots.tsx +1 -1
- package/template-story-react-vite-muijoy-ink-tauri/_github/workflows/tauri.yml +26 -69
- package/template-story-react-vite-muijoy-ink-tauri/package.json +1 -0
- package/template-story-react-vite-muijoy-ink-tauri/src/App.tsx +24 -5
- package/template-story-react-vite-muijoy-ink-tauri/src/components/AnimatedDots.tsx +1 -1
- package/template-story-react-vite-muijoy-ink-tauri/src/locales/strings_en.json +1 -0
- package/template-story-react-vite-muijoy-ink-tauri/src/screens/MainMenu.tsx +5 -0
- package/template-story-react-vite-muijoy-tauri/_github/workflows/tauri.yml +26 -69
- package/template-story-react-vite-muijoy-tauri/package.json +1 -0
- package/template-story-react-vite-muijoy-tauri/src/App.tsx +24 -5
- package/template-story-react-vite-muijoy-tauri/src/components/AnimatedDots.tsx +1 -1
- package/template-story-react-vite-muijoy-tauri/src/locales/strings_en.json +1 -0
- package/template-story-react-vite-muijoy-tauri/src/screens/MainMenu.tsx +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setupPixivnViteData } from "@drincs/pixi-vn/vite-listener";
|
|
2
|
-
import { lazy, Suspense } from "react";
|
|
3
|
-
import { ErrorBoundary } from "react-error-boundary";
|
|
2
|
+
import { ComponentType, lazy, Suspense } from "react";
|
|
3
|
+
import { ErrorBoundary, FallbackProps } from "react-error-boundary";
|
|
4
4
|
import { useI18n } from "./i18n";
|
|
5
5
|
import LoadingScreen from "./screens/LoadingScreen";
|
|
6
6
|
import { defineAssets } from "./utils/assets-utility";
|
|
@@ -14,7 +14,7 @@ const Home = lazy(async () => {
|
|
|
14
14
|
return import("./Home");
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const ErrorFallback: ComponentType<FallbackProps> = ({ error, resetErrorBoundary }) => {
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
20
|
role='alert'
|
|
@@ -41,11 +41,30 @@ function ErrorFallback({ error }: { error: Error }) {
|
|
|
41
41
|
marginTop: "1rem",
|
|
42
42
|
}}
|
|
43
43
|
>
|
|
44
|
-
{error.message}
|
|
44
|
+
{(error as Error).message}
|
|
45
45
|
</p>
|
|
46
|
+
<div
|
|
47
|
+
style={{
|
|
48
|
+
display: "flex",
|
|
49
|
+
justifyContent: "center",
|
|
50
|
+
marginTop: "1rem",
|
|
51
|
+
paddingBottom: "1rem",
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<button
|
|
55
|
+
style={{
|
|
56
|
+
padding: "0.5rem 1rem",
|
|
57
|
+
backgroundColor: "white",
|
|
58
|
+
borderRadius: "0.5rem",
|
|
59
|
+
}}
|
|
60
|
+
onClick={resetErrorBoundary}
|
|
61
|
+
>
|
|
62
|
+
Try again
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
46
65
|
</div>
|
|
47
66
|
);
|
|
48
|
-
}
|
|
67
|
+
};
|
|
49
68
|
|
|
50
69
|
export default function App() {
|
|
51
70
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setupPixivnViteData } from "@drincs/pixi-vn/vite-listener";
|
|
2
|
-
import { lazy, Suspense } from "react";
|
|
3
|
-
import { ErrorBoundary } from "react-error-boundary";
|
|
2
|
+
import { ComponentType, lazy, Suspense } from "react";
|
|
3
|
+
import { ErrorBoundary, FallbackProps } from "react-error-boundary";
|
|
4
4
|
import { useI18n } from "./i18n";
|
|
5
5
|
import LoadingScreen from "./screens/LoadingScreen";
|
|
6
6
|
import { defineAssets } from "./utils/assets-utility";
|
|
@@ -15,7 +15,7 @@ const Home = lazy(async () => {
|
|
|
15
15
|
return import("./Home");
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const ErrorFallback: ComponentType<FallbackProps> = ({ error, resetErrorBoundary }) => {
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
21
|
role='alert'
|
|
@@ -42,11 +42,30 @@ function ErrorFallback({ error }: { error: Error }) {
|
|
|
42
42
|
marginTop: "1rem",
|
|
43
43
|
}}
|
|
44
44
|
>
|
|
45
|
-
{error.message}
|
|
45
|
+
{(error as Error).message}
|
|
46
46
|
</p>
|
|
47
|
+
<div
|
|
48
|
+
style={{
|
|
49
|
+
display: "flex",
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
marginTop: "1rem",
|
|
52
|
+
paddingBottom: "1rem",
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<button
|
|
56
|
+
style={{
|
|
57
|
+
padding: "0.5rem 1rem",
|
|
58
|
+
backgroundColor: "white",
|
|
59
|
+
borderRadius: "0.5rem",
|
|
60
|
+
}}
|
|
61
|
+
onClick={resetErrorBoundary}
|
|
62
|
+
>
|
|
63
|
+
Try again
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
47
66
|
</div>
|
|
48
67
|
);
|
|
49
|
-
}
|
|
68
|
+
};
|
|
50
69
|
|
|
51
70
|
export default function App() {
|
|
52
71
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# https://tauri.app/distribute/pipelines/github/
|
|
2
|
-
name:
|
|
2
|
+
name: 'publish'
|
|
3
3
|
|
|
4
4
|
on:
|
|
5
5
|
push:
|
|
@@ -15,29 +15,19 @@ jobs:
|
|
|
15
15
|
matrix:
|
|
16
16
|
include:
|
|
17
17
|
- platform: 'macos-latest' # for Arm based macs (M1 and above).
|
|
18
|
-
name: 'macOS Arm'
|
|
19
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
20
18
|
args: '--target aarch64-apple-darwin'
|
|
21
19
|
- platform: 'macos-latest' # for Intel based macs.
|
|
22
|
-
name: 'macOS Intel'
|
|
23
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
24
20
|
args: '--target x86_64-apple-darwin'
|
|
25
21
|
- platform: 'ubuntu-22.04'
|
|
26
|
-
name: 'Linux'
|
|
27
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
28
22
|
args: ''
|
|
29
23
|
- platform: 'windows-latest'
|
|
30
|
-
name: 'Windows'
|
|
31
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
32
24
|
args: ''
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# tauriScript: 'npm run tauri ios' # or yarn
|
|
40
|
-
# args: '--open'
|
|
25
|
+
- platform: 'macos-latest' # IOS
|
|
26
|
+
args: '--target x86_64-apple-darwin'
|
|
27
|
+
mobile: "ios"
|
|
28
|
+
- platform: 'ubuntu-22.04' # Android
|
|
29
|
+
args: ''
|
|
30
|
+
mobile: "android"
|
|
41
31
|
|
|
42
32
|
runs-on: ${{ matrix.platform }}
|
|
43
33
|
steps:
|
|
@@ -49,40 +39,21 @@ jobs:
|
|
|
49
39
|
sudo apt-get update
|
|
50
40
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
51
41
|
|
|
52
|
-
- name:
|
|
53
|
-
|
|
54
|
-
uses: actions/setup-java@v3
|
|
42
|
+
- name: setup node
|
|
43
|
+
uses: actions/setup-node@v6
|
|
55
44
|
with:
|
|
56
|
-
|
|
57
|
-
distribution: 'temurin'
|
|
58
|
-
|
|
59
|
-
- name: Setup Android SDK Manager (android only)
|
|
60
|
-
if: matrix.name == 'Android' # This must match the platform value defined above.
|
|
61
|
-
uses: android-actions/setup-android@v3
|
|
45
|
+
node-version: lts/*
|
|
62
46
|
|
|
63
|
-
- name:
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
- name: Update Java (only for Android builds)
|
|
48
|
+
if: matrix.mobile == 'android'
|
|
49
|
+
uses: actions/setup-java@v5
|
|
66
50
|
with:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- name: install android SDK and NDK (android only)
|
|
71
|
-
if: matrix.name == 'Android' # This must match the platform value defined above.
|
|
72
|
-
run: |
|
|
73
|
-
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
|
74
|
-
unzip commandlinetools-linux-7583922_latest.zip -d $HOME/Android
|
|
75
|
-
export ANDROID_HOME="$HOME/Android/Sdk"
|
|
76
|
-
echo 'y' | sdkmanager --update --sdk_root=$ANDROID_HOME
|
|
77
|
-
# echo 'y' | sdkmanager --sdk_root=$ANDROID_HOME --install "ndk;21.4.7075529"
|
|
78
|
-
# rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
|
79
|
-
# export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
|
|
51
|
+
distribution: 'temurin'
|
|
52
|
+
java-version: '21'
|
|
80
53
|
|
|
81
|
-
- name: setup
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
node-version: lts/*
|
|
85
|
-
cache: 'npm' # or 'yarn'
|
|
54
|
+
- name: setup Android SDK (only for Android builds)
|
|
55
|
+
if: matrix.mobile == 'android'
|
|
56
|
+
uses: android-actions/setup-android@v3
|
|
86
57
|
|
|
87
58
|
- name: install Rust stable
|
|
88
59
|
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
|
|
@@ -90,40 +61,26 @@ jobs:
|
|
|
90
61
|
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
|
|
91
62
|
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
|
92
63
|
|
|
93
|
-
- name: Rust cache
|
|
94
|
-
uses: swatinem/rust-cache@v2
|
|
95
|
-
with:
|
|
96
|
-
workspaces: './src-tauri -> target'
|
|
97
|
-
|
|
98
64
|
- name: install frontend dependencies
|
|
99
65
|
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
|
|
100
|
-
run:
|
|
66
|
+
run: yarn install # change this to npm or pnpm depending on which one you use.
|
|
101
67
|
|
|
102
|
-
- name:
|
|
103
|
-
|
|
104
|
-
run: |
|
|
105
|
-
npm run tauri icon public/pwa-512x512.png
|
|
106
|
-
export NDK_HOME="$ANDROID_NDK_HOME"
|
|
107
|
-
npm run tauri android init
|
|
108
|
-
env:
|
|
109
|
-
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
68
|
+
- name: Upload Tauri icons
|
|
69
|
+
run: npm run tauri icon public/pwa-512x512.png
|
|
110
70
|
|
|
111
|
-
- name:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
npm run tauri ios init
|
|
116
|
-
softwareupdate --install -a
|
|
71
|
+
- name: Rust cache
|
|
72
|
+
uses: swatinem/rust-cache@v2
|
|
73
|
+
with:
|
|
74
|
+
workspaces: './src-tauri -> target'
|
|
117
75
|
|
|
118
76
|
- uses: tauri-apps/tauri-action@v0
|
|
119
77
|
env:
|
|
120
78
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
121
|
-
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
122
79
|
with:
|
|
123
80
|
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
|
|
124
81
|
releaseName: 'App v__VERSION__'
|
|
125
82
|
releaseBody: 'See the assets to download this version and install.'
|
|
126
83
|
releaseDraft: true
|
|
127
84
|
prerelease: false
|
|
128
|
-
tauriScript: ${{ matrix.tauriScript }}
|
|
129
85
|
args: ${{ matrix.args }}
|
|
86
|
+
mobile: ${{ matrix.mobile || null }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setupPixivnViteData } from "@drincs/pixi-vn/vite-listener";
|
|
2
|
-
import { lazy, Suspense } from "react";
|
|
3
|
-
import { ErrorBoundary } from "react-error-boundary";
|
|
2
|
+
import { ComponentType, lazy, Suspense } from "react";
|
|
3
|
+
import { ErrorBoundary, FallbackProps } from "react-error-boundary";
|
|
4
4
|
import { useI18n } from "./i18n";
|
|
5
5
|
import LoadingScreen from "./screens/LoadingScreen";
|
|
6
6
|
import { defineAssets } from "./utils/assets-utility";
|
|
@@ -15,7 +15,7 @@ const Home = lazy(async () => {
|
|
|
15
15
|
return import("./Home");
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const ErrorFallback: ComponentType<FallbackProps> = ({ error, resetErrorBoundary }) => {
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
21
|
role='alert'
|
|
@@ -42,11 +42,30 @@ function ErrorFallback({ error }: { error: Error }) {
|
|
|
42
42
|
marginTop: "1rem",
|
|
43
43
|
}}
|
|
44
44
|
>
|
|
45
|
-
{error.message}
|
|
45
|
+
{(error as Error).message}
|
|
46
46
|
</p>
|
|
47
|
+
<div
|
|
48
|
+
style={{
|
|
49
|
+
display: "flex",
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
marginTop: "1rem",
|
|
52
|
+
paddingBottom: "1rem",
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<button
|
|
56
|
+
style={{
|
|
57
|
+
padding: "0.5rem 1rem",
|
|
58
|
+
backgroundColor: "white",
|
|
59
|
+
borderRadius: "0.5rem",
|
|
60
|
+
}}
|
|
61
|
+
onClick={resetErrorBoundary}
|
|
62
|
+
>
|
|
63
|
+
Try again
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
47
66
|
</div>
|
|
48
67
|
);
|
|
49
|
-
}
|
|
68
|
+
};
|
|
50
69
|
|
|
51
70
|
export default function App() {
|
|
52
71
|
return (
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"solid_color": "Solid Color",
|
|
47
47
|
"solid_color_description": "Choose the solid color for the theme. It can be black or white and will be contrasting with the primary color. So if the primary color is dark, the solid color will be white, and a the other way around.",
|
|
48
48
|
"start": "Start",
|
|
49
|
+
"quit": "Quit",
|
|
49
50
|
"success_delete": "Delete successful",
|
|
50
51
|
"success_load": "Load successful",
|
|
51
52
|
"success_save": "Save successful",
|
|
@@ -94,6 +94,11 @@ export default function MainMenu() {
|
|
|
94
94
|
<MenuButton onClick={() => setOpenSettings(true)} transitionDelay={0.4}>
|
|
95
95
|
{t("settings")}
|
|
96
96
|
</MenuButton>
|
|
97
|
+
{window.__TAURI__ && (
|
|
98
|
+
<MenuButton onClick={() => window.close()} transitionDelay={0.4}>
|
|
99
|
+
{t("quit")}
|
|
100
|
+
</MenuButton>
|
|
101
|
+
)}
|
|
97
102
|
{loading && (
|
|
98
103
|
<Box
|
|
99
104
|
sx={{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# https://tauri.app/distribute/pipelines/github/
|
|
2
|
-
name:
|
|
2
|
+
name: 'publish'
|
|
3
3
|
|
|
4
4
|
on:
|
|
5
5
|
push:
|
|
@@ -15,29 +15,19 @@ jobs:
|
|
|
15
15
|
matrix:
|
|
16
16
|
include:
|
|
17
17
|
- platform: 'macos-latest' # for Arm based macs (M1 and above).
|
|
18
|
-
name: 'macOS Arm'
|
|
19
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
20
18
|
args: '--target aarch64-apple-darwin'
|
|
21
19
|
- platform: 'macos-latest' # for Intel based macs.
|
|
22
|
-
name: 'macOS Intel'
|
|
23
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
24
20
|
args: '--target x86_64-apple-darwin'
|
|
25
21
|
- platform: 'ubuntu-22.04'
|
|
26
|
-
name: 'Linux'
|
|
27
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
28
22
|
args: ''
|
|
29
23
|
- platform: 'windows-latest'
|
|
30
|
-
name: 'Windows'
|
|
31
|
-
tauriScript: 'npm run tauri' # or yarn
|
|
32
24
|
args: ''
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# tauriScript: 'npm run tauri ios' # or yarn
|
|
40
|
-
# args: '--open'
|
|
25
|
+
- platform: 'macos-latest' # IOS
|
|
26
|
+
args: '--target x86_64-apple-darwin'
|
|
27
|
+
mobile: "ios"
|
|
28
|
+
- platform: 'ubuntu-22.04' # Android
|
|
29
|
+
args: ''
|
|
30
|
+
mobile: "android"
|
|
41
31
|
|
|
42
32
|
runs-on: ${{ matrix.platform }}
|
|
43
33
|
steps:
|
|
@@ -49,40 +39,21 @@ jobs:
|
|
|
49
39
|
sudo apt-get update
|
|
50
40
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
51
41
|
|
|
52
|
-
- name:
|
|
53
|
-
|
|
54
|
-
uses: actions/setup-java@v3
|
|
42
|
+
- name: setup node
|
|
43
|
+
uses: actions/setup-node@v6
|
|
55
44
|
with:
|
|
56
|
-
|
|
57
|
-
distribution: 'temurin'
|
|
58
|
-
|
|
59
|
-
- name: Setup Android SDK Manager (android only)
|
|
60
|
-
if: matrix.name == 'Android' # This must match the platform value defined above.
|
|
61
|
-
uses: android-actions/setup-android@v3
|
|
45
|
+
node-version: lts/*
|
|
62
46
|
|
|
63
|
-
- name:
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
- name: Update Java (only for Android builds)
|
|
48
|
+
if: matrix.mobile == 'android'
|
|
49
|
+
uses: actions/setup-java@v5
|
|
66
50
|
with:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- name: install android SDK and NDK (android only)
|
|
71
|
-
if: matrix.name == 'Android' # This must match the platform value defined above.
|
|
72
|
-
run: |
|
|
73
|
-
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
|
74
|
-
unzip commandlinetools-linux-7583922_latest.zip -d $HOME/Android
|
|
75
|
-
export ANDROID_HOME="$HOME/Android/Sdk"
|
|
76
|
-
echo 'y' | sdkmanager --update --sdk_root=$ANDROID_HOME
|
|
77
|
-
# echo 'y' | sdkmanager --sdk_root=$ANDROID_HOME --install "ndk;21.4.7075529"
|
|
78
|
-
# rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
|
79
|
-
# export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
|
|
51
|
+
distribution: 'temurin'
|
|
52
|
+
java-version: '21'
|
|
80
53
|
|
|
81
|
-
- name: setup
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
node-version: lts/*
|
|
85
|
-
cache: 'npm' # or 'yarn'
|
|
54
|
+
- name: setup Android SDK (only for Android builds)
|
|
55
|
+
if: matrix.mobile == 'android'
|
|
56
|
+
uses: android-actions/setup-android@v3
|
|
86
57
|
|
|
87
58
|
- name: install Rust stable
|
|
88
59
|
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
|
|
@@ -90,40 +61,26 @@ jobs:
|
|
|
90
61
|
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
|
|
91
62
|
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
|
92
63
|
|
|
93
|
-
- name: Rust cache
|
|
94
|
-
uses: swatinem/rust-cache@v2
|
|
95
|
-
with:
|
|
96
|
-
workspaces: './src-tauri -> target'
|
|
97
|
-
|
|
98
64
|
- name: install frontend dependencies
|
|
99
65
|
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
|
|
100
|
-
run:
|
|
66
|
+
run: yarn install # change this to npm or pnpm depending on which one you use.
|
|
101
67
|
|
|
102
|
-
- name:
|
|
103
|
-
|
|
104
|
-
run: |
|
|
105
|
-
npm run tauri icon public/pwa-512x512.png
|
|
106
|
-
export NDK_HOME="$ANDROID_NDK_HOME"
|
|
107
|
-
npm run tauri android init
|
|
108
|
-
env:
|
|
109
|
-
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
68
|
+
- name: Upload Tauri icons
|
|
69
|
+
run: npm run tauri icon public/pwa-512x512.png
|
|
110
70
|
|
|
111
|
-
- name:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
npm run tauri ios init
|
|
116
|
-
softwareupdate --install -a
|
|
71
|
+
- name: Rust cache
|
|
72
|
+
uses: swatinem/rust-cache@v2
|
|
73
|
+
with:
|
|
74
|
+
workspaces: './src-tauri -> target'
|
|
117
75
|
|
|
118
76
|
- uses: tauri-apps/tauri-action@v0
|
|
119
77
|
env:
|
|
120
78
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
121
|
-
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
122
79
|
with:
|
|
123
80
|
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
|
|
124
81
|
releaseName: 'App v__VERSION__'
|
|
125
82
|
releaseBody: 'See the assets to download this version and install.'
|
|
126
83
|
releaseDraft: true
|
|
127
84
|
prerelease: false
|
|
128
|
-
tauriScript: ${{ matrix.tauriScript }}
|
|
129
85
|
args: ${{ matrix.args }}
|
|
86
|
+
mobile: ${{ matrix.mobile || null }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setupPixivnViteData } from "@drincs/pixi-vn/vite-listener";
|
|
2
|
-
import { lazy, Suspense } from "react";
|
|
3
|
-
import { ErrorBoundary } from "react-error-boundary";
|
|
2
|
+
import { ComponentType, lazy, Suspense } from "react";
|
|
3
|
+
import { ErrorBoundary, FallbackProps } from "react-error-boundary";
|
|
4
4
|
import { useI18n } from "./i18n";
|
|
5
5
|
import LoadingScreen from "./screens/LoadingScreen";
|
|
6
6
|
import { defineAssets } from "./utils/assets-utility";
|
|
@@ -14,7 +14,7 @@ const Home = lazy(async () => {
|
|
|
14
14
|
return import("./Home");
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const ErrorFallback: ComponentType<FallbackProps> = ({ error, resetErrorBoundary }) => {
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
20
|
role='alert'
|
|
@@ -41,11 +41,30 @@ function ErrorFallback({ error }: { error: Error }) {
|
|
|
41
41
|
marginTop: "1rem",
|
|
42
42
|
}}
|
|
43
43
|
>
|
|
44
|
-
{error.message}
|
|
44
|
+
{(error as Error).message}
|
|
45
45
|
</p>
|
|
46
|
+
<div
|
|
47
|
+
style={{
|
|
48
|
+
display: "flex",
|
|
49
|
+
justifyContent: "center",
|
|
50
|
+
marginTop: "1rem",
|
|
51
|
+
paddingBottom: "1rem",
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<button
|
|
55
|
+
style={{
|
|
56
|
+
padding: "0.5rem 1rem",
|
|
57
|
+
backgroundColor: "white",
|
|
58
|
+
borderRadius: "0.5rem",
|
|
59
|
+
}}
|
|
60
|
+
onClick={resetErrorBoundary}
|
|
61
|
+
>
|
|
62
|
+
Try again
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
46
65
|
</div>
|
|
47
66
|
);
|
|
48
|
-
}
|
|
67
|
+
};
|
|
49
68
|
|
|
50
69
|
export default function App() {
|
|
51
70
|
return (
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"solid_color": "Solid Color",
|
|
47
47
|
"solid_color_description": "Choose the solid color for the theme. It can be black or white and will be contrasting with the primary color. So if the primary color is dark, the solid color will be white, and a the other way around.",
|
|
48
48
|
"start": "Start",
|
|
49
|
+
"quit": "Quit",
|
|
49
50
|
"success_delete": "Delete successful",
|
|
50
51
|
"success_load": "Load successful",
|
|
51
52
|
"success_save": "Save successful",
|
|
@@ -95,6 +95,11 @@ export default function MainMenu() {
|
|
|
95
95
|
<MenuButton onClick={() => setOpenSettings(true)} transitionDelay={0.4}>
|
|
96
96
|
{t("settings")}
|
|
97
97
|
</MenuButton>
|
|
98
|
+
{window.__TAURI__ && (
|
|
99
|
+
<MenuButton onClick={() => window.close()} transitionDelay={0.4}>
|
|
100
|
+
{t("quit")}
|
|
101
|
+
</MenuButton>
|
|
102
|
+
)}
|
|
98
103
|
{loading && (
|
|
99
104
|
<Box
|
|
100
105
|
sx={{
|