feat(ui): optimize wiki ingredient links, product images, back buttons, and checkout settings
Deploy Canina / deploy (push) Successful in 1m54s

This commit is contained in:
parsa aghaei committed 2026-08-17 14:43:36 +03:30
1 parent 03c6ed58c7
commit 2d83a00169
15 files changed
+550 -396

No files matched your search

@@ -25,6 +25,8 @@ export default function UserDashboard() {
const { profile, isLoggedIn, logout, updateProfile, addAddress, updateAddress, deleteAddress, setDefaultAddress, topUpWallet, fetchProfile } = useUserStore();
const { pets, activePetId, setActivePet, removePet } = usePetStore();
const isWithdrawalEnabled = useSettingsStore((s) => s.getBoolean('wallet_withdrawal_enabled', false));
const isCatalogMode = useSettingsStore((s) => s.getBoolean('catalog_mode', false));
const isWalletRechargeAllowed = !isCatalogMode && useSettingsStore((s) => s.getBoolean('wallet_recharge_enabled', true));
React.useEffect(() => {
if (!isLoggedIn && typeof window !== "undefined") {
@@ -935,14 +937,20 @@ export default function UserDashboard() {
برداشت وجه
</button>
)}
<button
type="button"
onClick={() => setIsTopUpModalOpen(true)}
className="flex-1 sm:flex-initial sm:w-36 h-12 sm:h-14 bg-white text-canina-blue rounded-2xl font-black text-xs sm:text-sm flex items-center justify-center gap-2 hover:bg-medical-gray-900 hover:text-white transition-all shadow-xl shadow-black/10 group/topup cursor-pointer whitespace-nowrap"
>
<ArrowUpCircle className="w-4 h-4 sm:w-5 sm:h-5 group-hover:-translate-y-1 transition-transform shrink-0" />
شارژ آنی
</button>
{isWalletRechargeAllowed ? (
<button
type="button"
onClick={() => setIsTopUpModalOpen(true)}
className="flex-1 sm:flex-initial sm:w-36 h-12 sm:h-14 bg-white text-canina-blue rounded-2xl font-black text-xs sm:text-sm flex items-center justify-center gap-2 hover:bg-medical-gray-900 hover:text-white transition-all shadow-xl shadow-black/10 group/topup cursor-pointer whitespace-nowrap"
>
<ArrowUpCircle className="w-4 h-4 sm:w-5 sm:h-5 group-hover:-translate-y-1 transition-transform shrink-0" />
شارژ آنی
</button>
) : (
<span className="text-[11px] font-bold text-white/80 bg-white/10 px-4 py-3 rounded-2xl border border-white/20 whitespace-nowrap">
شارژ در حالت کاتالوگ غیرفعال است
</span>
)}
</div>
</div>
</div>
@@ -1203,14 +1211,20 @@ export default function UserDashboard() {
<div className="text-2xl sm:text-4xl font-black italic">{toPersian((profile.walletBalance ?? 0).toLocaleString())}</div>
<span className="text-xs sm:text-sm not-italic font-bold text-white/80">تومان</span>
</div>
<button
onClick={() => { setActiveTab("wallet"); setIsTopUpModalOpen(true); }}
disabled={isTopUpModalOpen}
className="mt-5 sm:mt-8 bg-canina-blue text-white w-full py-3.5 sm:py-4 px-4 rounded-2xl font-black hover:bg-white hover:text-canina-blue transition-all shadow-lg shadow-black/20 flex items-center justify-center gap-2 text-xs sm:text-sm border border-canina-blue cursor-pointer"
>
<ArrowUpCircle className="w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0" />
<span>شارژ کیف پول</span>
</button>
{isWalletRechargeAllowed ? (
<button
onClick={() => { setActiveTab("wallet"); setIsTopUpModalOpen(true); }}
disabled={isTopUpModalOpen}
className="mt-5 sm:mt-8 bg-canina-blue text-white w-full py-3.5 sm:py-4 px-4 rounded-2xl font-black hover:bg-white hover:text-canina-blue transition-all shadow-lg shadow-black/20 flex items-center justify-center gap-2 text-xs sm:text-sm border border-canina-blue cursor-pointer"
>
<ArrowUpCircle className="w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0" />
<span>شارژ کیف پول</span>
</button>
) : (
<div className="mt-5 sm:mt-8 text-[11px] font-bold text-center text-white/70 bg-white/10 py-3 px-2 rounded-2xl border border-white/20">
شارژ آنلاین موقتاً غیرفعال است
</div>
)}
</div>
</div>