feat: add per-channel disable settings and global settings to channel admin

- Add global settings section (CHANNEL_IS_REQUIRED_SUB, trial/paid toggles)
  at top of AdminChannelSubscriptions page
- Add per-channel disable_trial_on_leave and disable_paid_on_leave toggles
  in each channel card with inline Toggle controls
- Update RequiredChannel type and API request interfaces with new fields
- Add translations for globalSettings and perChannel in en/ru/fa/zh locales
This commit is contained in:
Fringg
2026-02-25 00:24:36 +03:00
parent 5a55892145
commit 48be067d1b
6 changed files with 241 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ export interface RequiredChannel {
title: string | null;
is_active: boolean;
sort_order: number;
disable_trial_on_leave: boolean;
disable_paid_on_leave: boolean;
}
export interface ChannelListResponse {
@@ -19,6 +21,8 @@ export interface CreateChannelRequest {
channel_id: string;
channel_link?: string;
title?: string;
disable_trial_on_leave?: boolean;
disable_paid_on_leave?: boolean;
}
export interface UpdateChannelRequest {
@@ -27,6 +31,8 @@ export interface UpdateChannelRequest {
title?: string;
is_active?: boolean;
sort_order?: number;
disable_trial_on_leave?: boolean;
disable_paid_on_leave?: boolean;
}
export const adminChannelsApi = {