6.24.0: Кнопка архива рядом с создать доску
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m11s

This commit is contained in:
poignatov
2026-03-19 19:22:10 +03:00
parent 101f4e27ed
commit 6e7ebb9aa3
4 changed files with 74 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "play-life-web",
"version": "6.23.0",
"version": "6.24.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -219,11 +219,26 @@
color: #4f46e5;
}
/* Строка с кнопками добавления и архива */
.board-actions-row {
display: flex;
align-items: center;
margin-top: 6px;
border-top: 1px solid #f3f4f6;
}
.board-actions-separator {
width: 1px;
height: 24px;
background: #e5e7eb;
flex-shrink: 0;
}
/* Кнопка добавления доски */
.dropdown-item.add-board {
margin-top: 6px;
flex: 1;
padding-top: 14px;
border-top: 1px solid #f3f4f6;
padding-bottom: 14px;
border-radius: 0 0 12px 12px;
color: #667eea;
font-weight: 500;
@@ -231,6 +246,10 @@
justify-content: flex-start;
}
.board-actions-row .dropdown-item.add-board:not(:last-child) {
border-radius: 0 0 0 12px;
}
.dropdown-item.add-board:hover {
background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
}
@@ -264,17 +283,16 @@
height: 20px;
}
/* Секция архива в дропдауне */
.archive-section {
margin-top: 2px;
border-top: 1px solid #f3f4f6;
}
/* Кнопка архива в строке действий */
.dropdown-item.archive-toggle {
flex-shrink: 0;
width: auto;
padding: 14px 14px;
border-radius: 0 0 12px 0;
color: #6b7280;
font-weight: 500;
gap: 12px;
justify-content: flex-start;
gap: 6px;
justify-content: center;
}
.dropdown-item.archive-toggle:hover {
@@ -289,13 +307,13 @@
}
.archive-toggle-icon {
margin-left: auto;
font-size: 10px;
font-size: 8px;
color: #9ca3af;
}
.archive-list {
padding: 0 4px 4px;
border-top: 1px solid #f3f4f6;
}
.archive-loading {

View File

@@ -100,45 +100,50 @@ function BoardSelector({
</div>
)}
<button className="dropdown-item add-board" onClick={onAddBoard}>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="12" cy="12" r="10"></circle>
<line x1="12" y1="8" x2="12" y2="16"></line>
<line x1="8" y1="12" x2="16" y2="12"></line>
</svg>
<span>Создать доску</span>
</button>
<div className="board-actions-row">
<button className="dropdown-item add-board" onClick={onAddBoard}>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="12" cy="12" r="10"></circle>
<line x1="12" y1="8" x2="12" y2="16"></line>
<line x1="8" y1="12" x2="16" y2="12"></line>
</svg>
<span>Создать доску</span>
</button>
{archivedBoards.length > 0 && (
<div className="archive-section">
<button
className="dropdown-item archive-toggle"
onClick={() => setArchiveExpanded(!archiveExpanded)}
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<polyline points="21 8 21 21 3 21 3 8"></polyline>
<rect x="1" y="3" width="22" height="5"></rect>
<line x1="10" y1="12" x2="14" y2="12"></line>
</svg>
<span>Архив</span>
<span className="archive-toggle-icon">
{archiveExpanded ? '▼' : '▶'}
</span>
</button>
{archivedBoards.length > 0 && (
<>
<div className="board-actions-separator" />
<button
className="dropdown-item archive-toggle"
onClick={() => setArchiveExpanded(!archiveExpanded)}
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<polyline points="21 8 21 21 3 21 3 8"></polyline>
<rect x="1" y="3" width="22" height="5"></rect>
<line x1="10" y1="12" x2="14" y2="12"></line>
</svg>
<span className="archive-toggle-icon">
{archiveExpanded ? '▼' : '▶'}
</span>
</button>
</>
)}
</div>
{archiveExpanded && (
<div className="archive-list">
{archivedBoards.map(board => (
<button
key={board.id}
className={`dropdown-item archive-item ${board.id === selectedBoardId ? 'selected' : ''}`}
onClick={() => handleSelectBoard(board)}
>
<span className="item-name archive-item-name">{board.name}</span>
</button>
))}
</div>
)}
{archiveExpanded && archivedBoards.length > 0 && (
<div className="archive-list">
{archivedBoards.map(board => (
<button
key={board.id}
className={`dropdown-item archive-item ${board.id === selectedBoardId ? 'selected' : ''}`}
onClick={() => handleSelectBoard(board)}
>
<span className="item-name archive-item-name">{board.name}</span>
<div className="item-meta">
<span className={`item-members ${board.is_owner ? 'filled' : 'outline'}`}>{board.member_count + 1}</span>
</div>
</button>
))}
</div>
)}
</div>