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
10 changes: 8 additions & 2 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:

- name: Build web app
run: npm run build
env:
VITE_BASE_PATH: './'
# env:
# VITE_BASE_PATH: './'

- name: Verify and fix web build
shell: bash
Expand Down Expand Up @@ -467,6 +467,12 @@ jobs:
DEBUG: electron-builder
# Linux 特定环境变量
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
# macOS signing and notarization
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

- name: List build output
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lerna-debug.log*

node_modules
dist

dist-ssr
*.local

Expand All @@ -23,3 +24,5 @@ dist-ssr
*.sln
*.sw?
.env
release
electron
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/build-desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function createWindow() {
enableRemoteModule: false,
webSecurity: true
},
icon: path.join(__dirname, '../dist/vite.svg'),
icon: path.join(__dirname, '../dist/icon.svg'),
titleBarStyle: process.platform === 'darwin' ? 'hiddenInset' : 'default',
show: false
});
Expand Down
6 changes: 3 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const Header: React.FC = () => {
const t = (zh: string, en: string) => language === 'zh' ? zh : en;

return (
<header className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50">
<header className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50 hd-drag">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex items-center justify-between h-16">
{/* Logo and Title */}
Expand All @@ -121,7 +121,7 @@ export const Header: React.FC = () => {
</div>

{/* Navigation */}
<nav className="hidden md:flex items-center space-x-1">
<nav className="hidden md:flex items-center space-x-1 hd-btns">
<button
onClick={() => setCurrentView('repositories')}
className={`px-4 py-2 rounded-lg font-medium transition-colors ${
Expand Down Expand Up @@ -158,7 +158,7 @@ export const Header: React.FC = () => {
</nav>

{/* User Actions */}
<div className="flex items-center space-x-3">
<div className="flex items-center space-x-3 hd-btns">
{/* Sync Status */}
<div className="hidden sm:flex items-center space-x-2 text-sm text-gray-500 dark:text-gray-400">
<span>{t('上次同步:', 'Last sync:')} {formatLastSync(lastSync)}</span>
Expand Down
10 changes: 10 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,14 @@
-webkit-box-orient: vertical;
overflow: hidden;
}
}

.hd-drag {
-webkit-app-region: drag;
-webkit-user-select: none;
user-select: none;
}

.hd-btns {
-webkit-app-region: no-drag;
}
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [react()],
optimizeDeps: {
exclude: ['lucide-react'],
Expand Down
Loading