From 9e0760d9c5d1fd2af262620e3de56340568cbd81 Mon Sep 17 00:00:00 2001 From: payacom <59262811+payacom@users.noreply.github.com> Date: Thu, 17 Sep 2026 16:18:58 +0330 Subject: [PATCH] fix(ui): workroom status buttons use RoundedButton's standard primary style Each status button had its own hardcoded pastel inline style on selection. Replaced with variant="primary"/"default" on RoundedButton, matching every other selection button in the app (mirrors the RN fix for this same screen). Co-Authored-By: Claude Sonnet 5 --- src/app/settings/workroom/page.tsx | 43 +++++++++++------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/src/app/settings/workroom/page.tsx b/src/app/settings/workroom/page.tsx index 6d948d4..7dd4e87 100644 --- a/src/app/settings/workroom/page.tsx +++ b/src/app/settings/workroom/page.tsx @@ -18,15 +18,18 @@ import { removeProjectDraft, } from "@/lib/projectDrafts"; +// رنگِ pastel هرکدوم حذف شد: طبق خواسته‌ی کاربر، این چیپ‌ها باید استایلِ استانداردِ اپ +// (variant="primary" یِ RoundedButton، عینِ بقیه‌ی دکمه‌های انتخاب) رو داشته باشن، نه +// رنگِ مخصوصِ هر وضعیت const STATUS_OPTIONS = [ - { key: "received", value: "دریافتی", color: "#B89FFF" }, - { key: "unpaid", value: "پرداخت نشده", color: "#ddd" }, - { key: "reviewing", value: "در دست بررسی", color: "#E0D891" }, - { key: "sent", value: "ارسال شده", color: "#ADF5FF" }, - { key: "published", value: "منتشر شده", color: "#ADF5FF" }, - { key: "inProgress", value: "در دست اقدام", color: "#E0D891" }, - { key: "completed", value: "اتمام پروژه", color: "#B7FFB6" }, - { key: "cancelled", value: "کنسل شده", color: "#FFC5C5" }, + { key: "received", value: "دریافتی" }, + { key: "unpaid", value: "پرداخت نشده" }, + { key: "reviewing", value: "در دست بررسی" }, + { key: "sent", value: "ارسال شده" }, + { key: "published", value: "منتشر شده" }, + { key: "inProgress", value: "در دست اقدام" }, + { key: "completed", value: "اتمام پروژه" }, + { key: "cancelled", value: "کنسل شده" }, ] as const; const Workroom = () => { @@ -76,38 +79,24 @@ const Workroom = () => {
{ setShowDrafts(true); setStatusFilter(""); }} - className={`p-1 text-xs sm:p-2 md:text-sm ${ - showDrafts ? "text-primary-dark" : "" - }`} - style={{ - backgroundColor: showDrafts ? "#FFD6E7" : "", - borderColor: showDrafts ? "#FFD6E7" : "", - }} + className="p-1 text-xs sm:p-2 md:text-sm" > {t("settings.workroom.drafts")} - {STATUS_OPTIONS.map(({ key, value, color }) => ( + {STATUS_OPTIONS.map(({ key, value }) => ( { setShowDrafts(false); setStatusFilter(value); }} - className={`p-1 text-xs sm:p-2 md:text-sm ${ - !showDrafts && statusFilter === value - ? " text-primary-dark" - : "" - }`} - style={{ - backgroundColor: - !showDrafts && statusFilter === value ? color : "", - borderColor: - !showDrafts && statusFilter === value ? color : "", - }} + className="p-1 text-xs sm:p-2 md:text-sm" > {t(`settings.workroom.statuses.${key}`)}