Compare commits
2 Commits
738b6aad34
...
214c050c8f
| Author | SHA1 | Date | |
|---|---|---|---|
| 214c050c8f | |||
| e9c380c35c |
@@ -0,0 +1,87 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DEPLOY_HOST: "10.10.1.82"
|
||||||
|
APP_PORT: "4000"
|
||||||
|
DEPLOY_PATH: "/var/www/tasgrid"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
container:
|
||||||
|
image: oven/bun:1
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: bun run build
|
||||||
|
env:
|
||||||
|
VITE_POCKETBASE_URL: ${{ vars.VITE_POCKETBASE_URL || 'https://pocketbase.ccllc.pro' }}
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
|
container:
|
||||||
|
image: node:20-bookworm
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install curl and ca-certificates
|
||||||
|
run: apt-get update -qq && apt-get install -y curl ca-certificates
|
||||||
|
|
||||||
|
- name: Install Bun
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://bun.sh/install | bash
|
||||||
|
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
||||||
|
echo "PATH=$HOME/.bun/bin:$PATH" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Install deploy tools
|
||||||
|
run: apt-get update -qq && apt-get install -y rsync openssh-client sshpass
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: bun run build
|
||||||
|
env:
|
||||||
|
VITE_POCKETBASE_URL: ${{ secrets.VITE_POCKETBASE_URL || vars.VITE_POCKETBASE_URL || 'https://pocketbase.ccllc.pro' }}
|
||||||
|
|
||||||
|
- name: Verify build output
|
||||||
|
run: |
|
||||||
|
ls -la
|
||||||
|
test -d dist || (echo "Missing dist/ (Vite output). Check Build step." && exit 1)
|
||||||
|
|
||||||
|
- name: Setup SSH known hosts
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
ssh-keyscan -p ${{ secrets.DEPLOY_SSH_PORT || '22' }} -H ${{ secrets.DEPLOY_HOST || env.DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||||
|
|
||||||
|
- name: Deploy via rsync
|
||||||
|
env:
|
||||||
|
SSH_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
sshpass -p "$SSH_PASSWORD" rsync -avz --delete \
|
||||||
|
-e "ssh -o StrictHostKeyChecking=accept-new -p ${{ secrets.DEPLOY_SSH_PORT || '22' }}" \
|
||||||
|
dist/ \
|
||||||
|
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST || env.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH || env.DEPLOY_PATH }}/
|
||||||
|
|
||||||
|
- name: Restart app on server
|
||||||
|
env:
|
||||||
|
SSH_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=accept-new -p ${{ secrets.DEPLOY_SSH_PORT || '22' }} \
|
||||||
|
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST || env.DEPLOY_HOST }} \
|
||||||
|
'bash -lc "cd ${{ secrets.DEPLOY_PATH || env.DEPLOY_PATH }} && export PORT=${{ env.APP_PORT }} && (pm2 restart tasgrid 2>/dev/null || pm2 start \"bun run serve\" --name tasgrid --update-env)"'
|
||||||
@@ -417,16 +417,18 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
||||||
{/* Tags at the bottom */}
|
</div>
|
||||||
<div class="mt-auto pt-6 border-t border-border/50">
|
|
||||||
|
{/* Sticky Tags Area */}
|
||||||
|
<div class="px-6 py-3 border-t border-border/50 shrink-0 bg-card/80 backdrop-blur-sm z-10 w-full overflow-hidden">
|
||||||
<div class="flex flex-wrap items-center gap-3">
|
<div class="flex flex-wrap items-center gap-3">
|
||||||
<span class="text-[0.625rem] uppercase font-bold tracking-wider text-muted-foreground/60 shrink-0">Tags</span>
|
<span class="text-[0.625rem] uppercase font-bold tracking-wider text-muted-foreground/60 shrink-0">Tags</span>
|
||||||
<div class="flex flex-wrap items-center gap-1.5 min-w-0 flex-1">
|
<div class="flex flex-nowrap overflow-x-auto no-scrollbar items-center gap-1.5 min-w-0 flex-1 pb-1">
|
||||||
<TagPicker
|
<TagPicker
|
||||||
selectedTags={visibleTags()}
|
selectedTags={visibleTags()}
|
||||||
onTagsChange={updateTags}
|
onTagsChange={updateTags}
|
||||||
/>
|
/>
|
||||||
<div class="flex flex-wrap items-center gap-1.5">
|
<div class="flex flex-nowrap items-center gap-1.5 shrink-0 pr-2">
|
||||||
<For each={visibleTags()}>
|
<For each={visibleTags()}>
|
||||||
{(tag) => (
|
{(tag) => (
|
||||||
<Badge
|
<Badge
|
||||||
@@ -465,10 +467,9 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Sticky Footer Actions */}
|
{/* Sticky Footer Actions */}
|
||||||
<div class="px-6 py-4 border-t border-border/50 flex items-center justify-between shrink-0 bg-background/80 backdrop-blur-sm">
|
<div class="px-6 py-4 border-t border-border/50 flex items-center justify-between shrink-0 bg-background/80 backdrop-blur-sm z-20 w-full relative">
|
||||||
{/* Delete button (persistent) */}
|
{/* Delete button (persistent) */}
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ export const TaskEditor: Component<TaskEditorProps> = (props) => {
|
|||||||
|
|
||||||
// Handle full screen images as before
|
// Handle full screen images as before
|
||||||
return (
|
return (
|
||||||
<div class="relative w-full h-full flex flex-col">
|
<div class="relative w-full flex flex-col flex-1">
|
||||||
<div
|
<div
|
||||||
class="absolute -top-6 -left-4 -right-4 h-8 cursor-pointer group flex items-center justify-center z-10"
|
class="absolute -top-6 -left-4 -right-4 h-8 cursor-pointer group flex items-center justify-center z-10"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
+14
-16
@@ -224,21 +224,6 @@ export const NotepadView: Component<{
|
|||||||
editable={canEdit}
|
editable={canEdit}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Close button (Mobile only) */}
|
|
||||||
<Show when={!props.hideNavigation}>
|
|
||||||
<div class="md:hidden flex justify-end pb-4 pt-2">
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
class="h-9 px-3 gap-2 hover:bg-muted text-muted-foreground transition-all rounded-xl border border-border/40"
|
|
||||||
onClick={() => props.setSelectedNoteId(null)}
|
|
||||||
>
|
|
||||||
<X size={16} />
|
|
||||||
<span class="text-xs font-bold uppercase tracking-wider">Close</span>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</Show>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Linked Tasks Sidebar */}
|
{/* Linked Tasks Sidebar */}
|
||||||
@@ -369,10 +354,23 @@ export const NotepadView: Component<{
|
|||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
<Show when={!props.hideNavigation}>
|
||||||
|
{/* Sticky Full-Width Mobile Close Footer */}
|
||||||
|
<div class="md:hidden sticky bottom-0 z-[60] p-4 bg-background/95 backdrop-blur-sm border-t border-border flex justify-end shrink-0 w-full shadow-[0_-10px_40px_-5px_hsl(var(--background))]">
|
||||||
|
<Button
|
||||||
|
variant="secondary"
|
||||||
|
class="w-full h-11 rounded-xl text-sm font-bold shadow-sm"
|
||||||
|
onClick={() => props.setSelectedNoteId(null)}
|
||||||
|
>
|
||||||
|
<X size={16} class="mr-2" />
|
||||||
|
Close Note
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</Show>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
</Show>
|
</Show >
|
||||||
</div>
|
</div>
|
||||||
</div >
|
</div >
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user