Skip to content

Commit 57387fc

Browse files
committed
Enhance CommandsPage with dual display modes and toast notifications
- Introduced a toggle for switching between list and grid views for command display. - Implemented toast notifications for command execution results and errors, replacing the previous result display method. - Refactored CommandsPage to separate rendering logic into ListView and GridView components for improved readability and maintainability. - Updated styles for command cards to ensure consistent height and responsive design. - Enhanced README documentation to reflect new features and architectural changes.
1 parent d6865ea commit 57387fc

22 files changed

+2339
-197
lines changed

src/Site/Pages/CommandsPage/CommandsPage.module.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,36 @@
66

77
.commandCard {
88
transition: all 0.2s ease-in-out;
9+
height: 100%;
910

1011
&:hover {
1112
transform: translateY(-2px);
1213
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1314
}
1415
}
1516

17+
// Стили для сетки команд
18+
.commandGrid {
19+
.commandCard {
20+
height: 100%;
21+
min-height: 120px;
22+
23+
.card-body {
24+
display: flex;
25+
flex-direction: column;
26+
27+
.commandDescription {
28+
flex-grow: 1;
29+
display: -webkit-box;
30+
-webkit-line-clamp: 3;
31+
-webkit-box-orient: vertical;
32+
overflow: hidden;
33+
text-overflow: ellipsis;
34+
}
35+
}
36+
}
37+
}
38+
1639
.parameterInput {
1740
transition: border-color 0.2s ease-in-out;
1841

@@ -128,4 +151,27 @@
128151
border-color: var(--bs-danger);
129152
color: white;
130153
}
154+
}
155+
156+
// Стили для переключателя режимов
157+
.displayModeToggle {
158+
.btn-group {
159+
.btn {
160+
min-width: 80px;
161+
162+
i {
163+
font-size: 0.9rem;
164+
}
165+
}
166+
}
167+
}
168+
169+
// Адаптивность для сетки
170+
@media (max-width: 768px) {
171+
.commandGrid {
172+
.row {
173+
--bs-gutter-x: 0.5rem;
174+
--bs-gutter-y: 0.5rem;
175+
}
176+
}
131177
}

0 commit comments

Comments
 (0)