Skip to content
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
96 changes: 49 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
permissions:
contents: write


jobs:
pre-build:
name: pre-build go client
Expand Down Expand Up @@ -42,6 +41,54 @@ jobs:
path: go-client/build/
retention-days: 1

create-release-draft:
name: create latest.json
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
outputs:
release-draft-created: ${{ steps.create-release-draft.outputs.release-draft-created }}

steps:
- name: Check out git repository
uses: actions/checkout@v4

- name: Generate latest.json
run: |
echo '{
"version": "${{ github.ref_name }}",
"notes": "Release ${{ github.ref_name }}",
"pub_date": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'",
"platforms": {
"darwin-x86_64": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_x86_64.dmg"
},
"darwin-aarch64": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_aarch64.dmg"
},
"windows-x86_64": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_x64.exe"
},
"windows-x86_64-msi": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_x64.msi"
}
}
}' > latest.json

- name: Upload latest.json to release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
files: latest.json
fail_on_unmatched_files: true
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
name: build tauri app
needs: pre-build
Expand Down Expand Up @@ -104,7 +151,7 @@ jobs:
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
XCODE_APP_TEAM_ID: ${{ secrets.XCODE_APP_TEAM_ID }}
Expand All @@ -120,48 +167,3 @@ jobs:
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false

release:
name: create latest.json
runs-on: ubuntu-latest
needs: [pre-build, build]
if: startsWith(github.ref, 'refs/tags/')

steps:
- name: Check out git repository
uses: actions/checkout@v4

- name: Generate latest.json
run: |
echo '{
"version": "${{ github.ref_name }}",
"notes": "Release ${{ github.ref_name }}",
"pub_date": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'",
"platforms": {
"darwin-x86_64": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_x86_64.dmg"
},
"darwin-aarch64": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_aarch64.dmg"
},
"windows-x86_64": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_x64.exe"
},
"windows-x86_64-msi": {
"signature": "",
"url": "https://github.com/jumpserver/clients/releases/download/${{ github.ref_name }}/JumpServerClient_${{ github.ref_name }}_x64.msi"
}
}
}' > latest.json

- name: Upload latest.json to release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
files: latest.json
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Binary file added src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons/128x128@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 6 additions & 20 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
{
"bundle": {
"active": true,
"targets": [
"dmg",
"msi",
"nsis",
"appimage",
"deb",
"rpm"
],
"icon": [
"icons/icon.ico",
"icons/icon.icns",
"icons/icon.png"
],
"resources": [
"resources/bin/"
],
"targets": ["dmg", "msi", "nsis", "appimage", "deb", "rpm"],
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
"resources": ["resources/bin/"],
"externalBin": [],
"copyright": "",
"category": "DeveloperTool",
Expand Down Expand Up @@ -54,9 +41,7 @@
"plugins": {
"deep-link": {
"desktop": {
"schemes": [
"jms"
]
"schemes": ["jms"]
}
}
},
Expand All @@ -75,6 +60,7 @@
"transparent": true,
"decorations": true,
"titleBarStyle": "Overlay",
"devtools": true,
"trafficLightPosition": {
"x": 10,
"y": 18
Expand All @@ -87,4 +73,4 @@
},
"withGlobalTauri": false
}
}
}
2 changes: 1 addition & 1 deletion ui/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
--ui-color-secondary-500: #141419;
--ui-color-neutral-100: #d1d1d1;
--el-font-family: var(--font-sans);
--bg-hover-light: rgba(209, 209, 209, 0.6);
--bg-hover-light: rgba(0, 0, 0, 0.1);
--bg-hover-dark: rgba(0, 0, 0, 0.3);
--bg-selected-light: rgba(209, 209, 209, 0.8);
--bg-selected-dark: rgba(0, 0, 0, 0.5);
Expand Down
23 changes: 15 additions & 8 deletions ui/components/SideBar/sideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const { collapse, setCollapse } = useSettingManager();
const isLoading = ref(false);
const sidebarSearch = ref("");

// const isMacOS = false;

const sideBarItems = computed<NavigationMenuItem[]>(() => {
return [
{
Expand All @@ -25,7 +23,7 @@ const sideBarItems = computed<NavigationMenuItem[]>(() => {
},
{
label: t("Menu.Linux"),
icon: "si:terminal-alt-line",
icon: "gravity-ui:terminal",
to: localePath("linux"),
disabled: isLoading.value
},
Expand All @@ -37,7 +35,7 @@ const sideBarItems = computed<NavigationMenuItem[]>(() => {
},
{
label: t("Menu.Database"),
icon: "i-lucide-database",
icon: "gravity-ui:database",
to: localePath("database"),
disabled: isLoading.value
},
Expand All @@ -49,7 +47,7 @@ const sideBarItems = computed<NavigationMenuItem[]>(() => {
},
{
label: t("Menu.Favorite"),
icon: "i-lucide-star",
icon: "gravity-ui:star",
to: localePath("favorite"),
disabled: isLoading.value
}
Expand All @@ -75,8 +73,16 @@ const debouncedSidebarSearch = useDebounceFn(emitSearch, 200);
<div class="flex flex-col w-full">
<!-- 折叠按钮 -->
<div
class="flex items-center px-3 h-10"
:class="isMacOS ? (collapse ? 'mt-9 justify-center' : 'justify-end') : collapse ? 'py-2 justify-center' : 'py-2 mt-1 justify-between'"
class="flex items-center px-3 h-10"
:class="
isMacOS
? collapse
? 'mt-9 justify-center'
: 'justify-end'
: collapse
? 'py-2 justify-center mt-2'
: 'py-2 mt-2 justify-between'
"
>
<div class="flex items-center gap-2" v-if="!isMacOS && !collapse">
<UAvatar size="sm" src="/logo.png" class="bg-transparent" :ui="{ root: 'bg-transparent' }" />
Expand Down Expand Up @@ -139,7 +145,7 @@ const debouncedSidebarSearch = useDebounceFn(emitSearch, 200);
:collapsed="collapse"
color="neutral"
:ui="{
link: 'px-2 my-1 rounded-sm menu-item light:text-gray-800 dark:text-gray-200',
link: 'px-2 my-1 rounded-sm menu-item flex items-center light:text-gray-800 dark:text-gray-200',
linkLeadingIcon: 'light:text-gray-800 dark:text-gray-200',
label: 'light:text-gray-500 dark:text-gray-400 pb-0 text-xs font-light'
}"
Expand All @@ -156,6 +162,7 @@ const debouncedSidebarSearch = useDebounceFn(emitSearch, 200);
.light .menu .menu-item {
&[data-active] {
background-color: var(--bg-hover-light);
opacity: 0.8;
font-weight: 500;
}

Expand Down