Add Docker build and deploy pipeline
Some checks failed
deploy-frontend / deploy (push) Failing after 11s

This commit is contained in:
SlimusMinus
2026-10-07 23:27:38 +03:00
parent 6791ee6eb3
commit 6dc61050d9
23 changed files with 722 additions and 41 deletions

View File

@@ -18,6 +18,9 @@ interface FeedTopBarProps {
onMenuClick: () => void;
typeFilter: "loss" | "found" | null;
onTypeFilterChange: (key: "loss" | "found" | null) => void;
/** Фильтр состояния: null — все, "active" — активные, "closed" — найденные. */
statusFilter?: "active" | "closed" | null;
onStatusFilterChange?: (key: "active" | "closed" | null) => void;
hidden?: boolean;
/** Реф на сам стеклянный бар — родитель меряет его высоту для CSS-переменной --feed-fade-height */
topBarRef?: Ref<HTMLDivElement>;
@@ -37,6 +40,8 @@ export default function FeedTopBar({
onMenuClick,
typeFilter,
onTypeFilterChange,
statusFilter = null,
onStatusFilterChange,
hidden = false,
topBarRef,
}: FeedTopBarProps) {
@@ -51,6 +56,14 @@ export default function FeedTopBar({
{ key: "found", label: t("feed.filterFound") },
];
// «Активные / Найденные» — второй ряд того же дропдауна: найденные
// объявления по умолчанию лишь прижаты к низу, а этими вкладками их можно
// убрать из ленты (или посмотреть только их).
const statusOptions: { key: "active" | "closed"; label: string }[] = [
{ key: "active", label: t("feed.filterActive") },
{ key: "closed", label: t("feed.filterClosed") },
];
useEffect(() => {
if (!open) return;
const handler = (e: MouseEvent) => {
@@ -70,6 +83,12 @@ export default function FeedTopBar({
setOpen(false);
};
const handleSelectStatus = (key: "active" | "closed") => {
// Повторный тап по активной вкладке сбрасывает фильтр в «все».
onStatusFilterChange?.(statusFilter === key ? null : key);
setOpen(false);
};
return (
<div className="f-topbar-dropdown-wrap">
<div className={`f-topbar${hidden ? " f-topbar-hidden" : ""}`} ref={topBarRef}>
@@ -142,6 +161,22 @@ export default function FeedTopBar({
{opt.label}
</button>
))}
{onStatusFilterChange && (
<>
<span className="f-topbar-dropdown-sep" aria-hidden="true" />
{statusOptions.map((opt) => (
<button
key={opt.key}
type="button"
aria-pressed={statusFilter === opt.key}
className={`f-topbar-dropdown-item${statusFilter === opt.key ? " active" : ""}`}
onClick={() => handleSelectStatus(opt.key)}
>
{opt.label}
</button>
))}
</>
)}
</motion.div>
)}
</AnimatePresence>