feat: responsive collapse toggle - left icon on wide screens only

- Show collapse chevron on both sides when width > 768px
- Show only right-side chevron on narrow screens (< 768px)
- Saves horizontal space on mobile devices
This commit is contained in:
sjin.on.ca@gmail.com 2026-06-11 17:27:56 +01:00
parent eddd478de7
commit c764fbfc55
4 changed files with 46 additions and 0 deletions

4
Dockerfile.custom Normal file
View File

@ -0,0 +1,4 @@
FROM vikunja/vikunja:latest
# 替换前端文件
COPY frontend/dist/ /app/vikunja/frontend/

21
docker-compose.yml Normal file
View File

@ -0,0 +1,21 @@
version: '3.8'
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: vikunja
POSTGRES_PASSWORD: vikunja
POSTGRES_DB: vikunja
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vikunja"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:

1
frontend/.env Normal file
View File

@ -0,0 +1 @@
VITE_API_URL=http://localhost:3456/api/v1

View File

@ -12,6 +12,15 @@
@click="openTaskDetail"
@keyup.enter="openTaskDetail"
>
<button
v-if="task.relatedTasks?.subtask?.length"
class="collapse-toggle collapse-toggle-left"
:class="{ 'is-collapsed': isCollapsed }"
@click.stop="toggleCollapse"
:aria-label="isCollapsed ? 'Expand subtasks' : 'Collapse subtasks'"
>
<Icon icon="chevron-down" />
</button>
<span
v-tooltip="!canMarkAsDone ? $t('task.readOnlyCheckbox') : ''"
class="is-inline-flex is-align-items-center"
@ -648,6 +657,17 @@ defineExpose({
}
}
.collapse-toggle-left {
margin-inline-start: 0;
margin-inline-end: 0.5rem;
order: -1;
//
@media (max-width: 768px) {
display: none;
}
}
:deep(.popup) {
border-radius: $radius;
background-color: var(--white);