mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-18 05:02:15 +03:00
Adds a "hide this quota row" action (visibility_off icon button) to each model-quota row on the provider limits card, and a "Hidden: …" strip at the bottom of the card to restore any hidden row. The visibility preference is keyed per-provider (settings.quotaVisibility) and persisted via PATCH /api/settings, so it survives refresh/reload. Distinct from the existing model-catalog isHidden/isDeleted mechanism (collectHiddenQuotaModelIds/filterHiddenModelQuotas in ProviderLimits/utils.tsx), which hides rows the ADMIN marked hidden in the model catalog. This is a personal dashboard preference an operator can toggle without touching the catalog — e.g. temporarily decluttering a quota card with many low-signal rows. New pure helpers (getQuotaVisibilityKey, filterQuotasByVisibility, getHiddenQuotaRows) live in ProviderLimits/utils.tsx and are unit tested directly; the settings key is added to DEFAULT_SETTINGS and validated via updateSettingsSchema like the existing providerStrategies field. New UI strings are filled in en.json and synced to the other 42 locales as `__MISSING__` placeholders. Co-authored-by: nguyenha935 <208228297+nguyenha935@users.noreply.github.com> Inspired-by: https://github.com/decolua/9router/pull/2371