From cc177fd4fca119bfd870411337f6e464a45b3628 Mon Sep 17 00:00:00 2001 From: heng30 <2238288979@qq.com> Date: Mon, 2 Sep 2024 10:33:39 +0800 Subject: [PATCH] [*] update normally --- .github/workflows/android.yml | 8 +------- .github/workflows/linux.yml | 10 ++++------ .github/workflows/macos.yml | 10 ++++------ .github/workflows/web.yml | 10 ++++------ .github/workflows/windows.yml | 16 +++++++++------- ui/panel/desktop/home.slint | 2 +- ui/panel/setting/desktop.slint | 3 ++- 7 files changed, 25 insertions(+), 34 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index dc25987..83e5138 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,12 +1,6 @@ name: android - on: [push] -# on: -# push: -# tags: -# - "v[0-9]+.[0-9]+.[0-9]+" - permissions: contents: write @@ -68,7 +62,7 @@ jobs: run: | binary_name=`cat target/app-name` output="$binary_name-${{ env.VERSION }}-aarch64-linux-android.apk" - cp -f target/release/apk/$binary_name.apk $output + cp -rf target/release/apk/$binary_name.apk $output echo "ASSET=$output" >> $GITHUB_ENV - run: echo "end packing..." diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a386dba..0b7a12b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,9 +1,5 @@ name: linux - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" +on: [push] permissions: contents: write @@ -40,10 +36,12 @@ jobs: - run: make app-name - name: Export package shell: bash + if: startsWith(github.ref, 'refs/tags/') run: | binary_name=`cat target/app-name` output="$binary_name-${{ env.VERSION }}-x86_64-linux.tar.gz" - tar -zcf $output target/release/$binary_name + cp -rf target/release/$binary_name $binary_name + tar -zcf $output $binary_name echo "ASSET=$output" >> $GITHUB_ENV - run: echo "end packing..." diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7456450..21b1f5c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,9 +1,5 @@ name: macos - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" +on: [push] permissions: contents: write @@ -38,10 +34,12 @@ jobs: - run: make app-name - name: Export package shell: bash + if: startsWith(github.ref, 'refs/tags/') run: | binary_name=`cat target/app-name` output="$binary_name-${{ env.VERSION }}-x86_64-darwin.tar.gz" - tar -zcf $output target/release/$binary_name + cp -rf target/release/$binary_name $binary_name + tar -zcf $output $binary_name echo "ASSET=$output" >> $GITHUB_ENV - run: echo "end packing..." diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index bca7975..02af3d7 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -1,9 +1,5 @@ name: web - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" +on: [push] permissions: contents: write @@ -43,10 +39,12 @@ jobs: - run: make app-name - name: Export package shell: bash + if: startsWith(github.ref, 'refs/tags/') run: | binary_name=`cat target/app-name` output="$binary_name-${{ env.VERSION }}-web.tar.gz" - tar -zcf $output web/dist + cp -rf web/dist dist + tar -zcf $output dist echo "ASSET=$output" >> $GITHUB_ENV - run: echo "end packing..." diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 277bbac..0fb01bc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,9 +1,5 @@ name: windows - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" +on: [push] permissions: contents: write @@ -30,14 +26,20 @@ jobs: - run: make desktop-build-release - run: echo "end build..." + - name: Get the release version from the tag + shell: bash + run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - run: echo "start packing..." - run: make app-name - name: Export package shell: bash + if: startsWith(github.ref, 'refs/tags/') run: | binary_name=`cat target/app-name` - output="$binary_name-${{ env.VERSION }}-x86_64-linux.tar.gz" - tar -zcf $output target/release/$binary_name.exe + output="$binary_name-${{ env.VERSION }}-x86_64-windows.tar.gz" + cp -rf target/release/$binary_name.exe $binary_name.exe + tar -zcf $output $binary_name.exe echo "ASSET=$output" >> $GITHUB_ENV - run: echo "end packing..." diff --git a/ui/panel/desktop/home.slint b/ui/panel/desktop/home.slint index 4a6bc28..2705ed7 100644 --- a/ui/panel/desktop/home.slint +++ b/ui/panel/desktop/home.slint @@ -184,7 +184,7 @@ export component Home inherits VerticalLayout { Rectangle { lp := LeftPanel { x: 0; - width: Math.max(root.width * 0.2, 500px); + width: Math.max(root.width * 0.2, Theme.title3-font-size * 20); } mp := Rectangle { diff --git a/ui/panel/setting/desktop.slint b/ui/panel/setting/desktop.slint index 6a9b2b7..ef5c770 100644 --- a/ui/panel/setting/desktop.slint +++ b/ui/panel/setting/desktop.slint @@ -120,7 +120,8 @@ component Setting inherits Rectangle { lp := LeftPanel { x: 0; - width: Math.max(root.width * 0.3, 160px); + width: Math.max(root.width * 0.3, Theme.title3-font-size * 10); + switch(previous-index, current-index) => { if (!root.save(previous-index)) { return false;