diff --git a/.github/workflows/dev-release-cli.yaml b/.github/workflows/dev-release-cli.yaml
new file mode 100644
index 0000000..2686b98
--- /dev/null
+++ b/.github/workflows/dev-release-cli.yaml
@@ -0,0 +1,83 @@
+name: Development Release CLI
+
+on:
+ push:
+ branches: ["development"]
+
+jobs:
+ build:
+ name: Release binary
+ strategy:
+ matrix:
+ include:
+ - os: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ artifact_name: dar2oar
+ asset_name: dar2oar-x86_64-unknown-linux-gnu.tar.gz
+ - os: ubuntu-latest
+ target: x86_64-unknown-linux-musl
+ artifact_name: dar2oar
+ asset_name: dar2oar-x86_64-unknown-linux-musl.tar.gz
+ - os: ubuntu-latest
+ target: x86_64-pc-windows-gnu
+ artifact_name: dar2oar.exe
+ asset_name: dar2oar-x86_64-pc-windows-gnu.zip
+ - os: macos-latest
+ target: x86_64-apple-darwin
+ artifact_name: dar2oar
+ asset_name: dar2oar-x86_64-apple-darwin.zip
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ # Without it, once created, the commit sha for the tag will not be updated.
+ - name: Recreate tag
+ run: |
+ git config user.name 'github-actions[bot]'
+ git config user.email 'github-actions[bot]@users.noreply.github.com'
+ git tag "development" -m "Development version" --force
+ git push -f --tags
+ if: matrix.target == 'x86_64-pc-windows-gnu'
+
+ - name: Install stable toolchain
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: stable
+
+ - name: Cross build with all features
+ uses: actions-rs/cargo@v1
+ with:
+ use-cross: true
+ command: build
+ args: --release --target ${{ matrix.target }} --all-features --verbose
+
+ - name: Update CHANGELOG
+ id: changelog
+ uses: requarks/changelog-action@v1
+ with:
+ token: ${{ github.token }}
+ tag: ${{ github.ref_name }}
+ if: matrix.target == 'x86_64-pc-windows-gnu'
+
+ - name: Compress binary
+ run: |
+ if [[ "${{ matrix.target }}" == *"linux"* ]]; then
+ tar -czf ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
+ else
+ zip -r ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
+ fi
+
+ - name: Upload binaries to release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ release_name: DAR to OAR Converter Development-${{ github.sha }}
+ body: ${{ steps.changelog.outputs.changes }}
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: ${{ matrix.asset_name }}
+ asset_name: ${{ matrix.asset_name }}
+ tag: "development"
+ prerelease: true
+ overwrite: true
diff --git a/.github/workflows/dev-release-gui.yaml b/.github/workflows/dev-release-gui.yaml
new file mode 100644
index 0000000..ebf4a47
--- /dev/null
+++ b/.github/workflows/dev-release-gui.yaml
@@ -0,0 +1,65 @@
+name: Development Release GUI
+on:
+ push:
+ branches:
+ - "development"
+ workflow_dispatch:
+
+jobs:
+ release:
+ permissions:
+ contents: write
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [macos-latest, ubuntu-20.04, windows-latest]
+ runs-on: ${{ matrix.platform }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Install dependencies (ubuntu only)
+ if: matrix.platform == 'ubuntu-20.04'
+ # You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
+
+ - name: Rust setup
+ uses: dtolnay/rust-toolchain@stable
+
+ - name: Rust cache
+ uses: swatinem/rust-cache@v2
+ with:
+ workspaces: "./src-tauri -> target"
+
+ - name: Sync node version and setup cache
+ uses: actions/setup-node@v3
+ with:
+ node-version: "lts/*"
+
+ - name: Install frontend dependencies
+ run: npm install
+
+ - name: Sync node version and setup cache
+ uses: actions/cache@v3
+ with:
+ path: |
+ ~/.npm
+ ${{ github.workspace }}/.next/cache
+ # Generate a new cache whenever packages or source files change.
+ key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
+ # If source files changed but packages didn't, rebuild from a prior cache.
+ restore-keys: |
+ ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
+
+ - name: Build the app
+ uses: tauri-apps/tauri-action@v0
+
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ releaseName: "DAR to OAR Converter Development-${{ github.sha }}" # tauri-action replaces \_\_VERSION\_\_ with the app version.
+ tagName: development
+ prerelease: true
diff --git a/.github/workflows/release-cli.yaml b/.github/workflows/release-cli.yaml
index 42a621c..5e90512 100644
--- a/.github/workflows/release-cli.yaml
+++ b/.github/workflows/release-cli.yaml
@@ -35,10 +35,9 @@ jobs:
uses: actions/checkout@v3
- name: Install stable toolchain
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- override: true
- name: Cross build with all features
uses: actions-rs/cargo@v1
@@ -53,6 +52,7 @@ jobs:
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
+ if: matrix.target == 'x86_64-pc-windows-gnu'
- name: Compress binary
run: |
diff --git a/frontend/src/components/form.tsx b/frontend/src/components/form.tsx
index 4f87082..600ea3c 100644
--- a/frontend/src/components/form.tsx
+++ b/frontend/src/components/form.tsx
@@ -91,10 +91,15 @@ export function ConvertForm() {
};
return (
-
+ [Optional] File path that helps map priority number to a section name. +
++ See {" "} + + [What is the mapping file?] + + (Jump to wiki) +
+ > + ); +} diff --git a/frontend/src/components/log_file_btn.tsx b/frontend/src/components/log_file_btn.tsx index fbada17..b81c043 100644 --- a/frontend/src/components/log_file_btn.tsx +++ b/frontend/src/components/log_file_btn.tsx @@ -9,7 +9,7 @@ export const LogFileButton = () => { sx={{ marginTop: "9px", width: "100%", - height: "80%", + height: "60%", }} variant="outlined" onClick={async () => openLogFile().catch((e) => toast.error(`${e}`))} diff --git a/frontend/src/components/pages/converter.tsx b/frontend/src/components/pages/converter.tsx index f429c2c..a0f5e66 100644 --- a/frontend/src/components/pages/converter.tsx +++ b/frontend/src/components/pages/converter.tsx @@ -1,13 +1,13 @@ "use client"; import { ConvertForm } from "@/components/form"; -import { useDynStyleWithStorage, useToastLimit } from "@/hooks"; +import { useDynStyle, useToastLimit } from "@/hooks"; import { Box } from "@mui/material"; import { Toaster } from "react-hot-toast"; export default function Converter() { useToastLimit(1); - useDynStyleWithStorage(); + useDynStyle(); return ( <> diff --git a/frontend/src/components/pages/settings.tsx b/frontend/src/components/pages/settings.tsx index d2d5c44..1eb7584 100644 --- a/frontend/src/components/pages/settings.tsx +++ b/frontend/src/components/pages/settings.tsx @@ -1,11 +1,12 @@ "use client"; import { Box, TextField } from "@mui/material"; -import { useDynStyle } from "@/hooks"; +import { useDynStyle, useStorageState } from "@/hooks"; import { SelectStyleList } from "./../style_list"; export default function Settings() { const [style, setStyle] = useDynStyle(); + const [preset, setPreset] = useStorageState("presetNumber", "0"); return (