From dc4a8007de7a29d96d27bf406a5740a9f551ebb4 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 29 Apr 2024 14:22:37 +0800 Subject: [PATCH 01/27] ci: use lowercase executable file name on linux; build packages for both Intel and Apple Silicon CPU architecture on macOS (#97) --- .github/workflows/ci.yml | 87 ++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8e1ea8e..4721601c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,21 +7,9 @@ on: branches: [develop] workflow_dispatch: jobs: - build: - name: Build - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux-x64 - - os: windows-latest - platform: win-x64 - - os: macos-latest - platform: osx-x64 - - os: macos-latest - platform: osx-arm64 - runs-on: ${{ matrix.os }} + build-windows: + name: Build Windows x64 + runs-on: windows-latest steps: - name: Checkout sources uses: actions/checkout@v4 @@ -34,9 +22,74 @@ jobs: - name: Build run: dotnet build -c Release - name: Publish - run: dotnet publish src/SourceGit.csproj -c Release -o publish -r ${{ matrix.platform }} -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained + run: dotnet publish src/SourceGit.csproj -c Release -o publish -r win-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }} + name: sourcegit.win-x64 + path: publish + build-macos-intel: + name: Build macOS (Intel) + runs-on: macos-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Build + run: dotnet build -c Release + - name: Publish + run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: sourcegit.osx-x64 + path: publish + build-macos-arm64: + name: Build macOS (Apple Silicon) + runs-on: macos-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Build + run: dotnet build -c Release + - name: Publish + run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: sourcegit.osx-arm64 + path: publish + build-linux: + name: Build Linux + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Build + run: dotnet build -c Release + - name: Publish + run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained + - name: Rename Executable File + run: mv publish/SourceGit publish/sourcegit + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: sourcegit.linux-x64 path: publish From 7589a8dcd0745f477cc806bf1b003cd50ef785b4 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 29 Apr 2024 14:25:24 +0800 Subject: [PATCH 02/27] ci: fix wrong runtime identifier for linux --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4721601c..983a837c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: - name: Build run: dotnet build -c Release - name: Publish - run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained + run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained - name: Rename Executable File run: mv publish/SourceGit publish/sourcegit - name: Upload Artifact From 5e6059ba366d21532d340a40c44ed052aad6fe4a Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 29 Apr 2024 15:22:06 +0800 Subject: [PATCH 03/27] ux: hotkey tooltip in buttons --- src/Resources/Locales/en_US.axaml | 4 ++-- src/Resources/Locales/zh_CN.axaml | 6 +++--- src/Views/Launcher.axaml | 19 +++++++++++++++---- src/Views/Repository.axaml | 9 +++++++-- src/Views/WorkingCopy.axaml | 16 ++++++++++++++-- 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index fed4f46b..0d7a3072 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -243,7 +243,7 @@ SELECT FOLDER Open With ... Optional. - Create New Page (Ctrl+T) + Create New Page Bookmark Close Tab Close Other Tabs @@ -340,7 +340,7 @@ REMOTES ADD REMOTE RESOLVE - Search Commit (Ctrl+F) + Search Commit Search Author/Committer/Message/SHA Statistics SUBMODULES diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index c2500d54..1b817c3b 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -243,9 +243,9 @@ 选择文件夹 打开文件... 选填。 - 新建空白页 (Ctrl+T) + 新建空白页 设置书签 - 关闭标签页 (Ctrl+W) + 关闭标签页 关闭其他标签页 关闭右侧标签页 复制仓库路径 @@ -340,7 +340,7 @@ 远程列表 添加远程 解决冲突 - 查找提交(Ctrl+F) + 查找提交 支持搜索作者/提交者/主题/指纹 提交统计 子模块列表 diff --git a/src/Views/Launcher.axaml b/src/Views/Launcher.axaml index ab3e9dd0..5b6003dd 100644 --- a/src/Views/Launcher.axaml +++ b/src/Views/Launcher.axaml @@ -199,8 +199,13 @@ Classes="icon_button" Width="16" Height="16" Margin="12,0" Command="{Binding #me.DataContext.(vm:Launcher).CloseTab}" - CommandParameter="{Binding}" - ToolTip.Tip="{DynamicResource Text.PageTabBar.Tab.Close}"> + CommandParameter="{Binding}"> + + + + + + @@ -222,8 +227,14 @@ Width="16" Height="16" Margin="8,0" Command="{Binding AddNewTab}" - HotKey="Ctrl+T" - ToolTip.Tip="{DynamicResource Text.PageTabBar.New}"> + HotKey="Ctrl+T"> + + + + + + + diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index 9f450c77..8a0ec5ce 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -28,8 +28,13 @@ + IsChecked="{Binding IsSearching, Mode=TwoWay}"> + + + + + + diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index 57931284..0dded0ad 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -43,7 +43,13 @@ Classes="icon_button" Width="26" Height="14" Padding="0" - ToolTip.Tip="{DynamicResource Text.WorkingCopy.Unstaged.Stage}" Click="StageSelected"> + Click="StageSelected"> + + + + + +