* Adde MySQL and Postgres migrations

* Replaced select * with column names

* removed all * from channel SQL store

* cleanup

* Fixed a duplicate column

* cleanup

* Added migrations and store support

* WIP

* used channelname slice in a missed place

* Handled patch

* Added app level tests

* Added API layer tests

* Added API layer tests

* WIP

* converted to query builder

* cleanupo

* added not null and default constraints

* Fixed test

* fixed file name

* review fixes

* review fixes

* updated migration file

* fixed text

* Review fixes

* WIP

* rendered banner

* WPI

* Fixed tooltip and markdown styling

* test: Add comprehensive tests for ChannelBanner component

* refactor: Use renderWithContext in channel_banner test

* WIP

* updated channel banner test

* Updated channel view test

* getContrastingSimpleColor tests

* Added tests

* rendered channel banner

* feat: Add comprehensive tests for ChannelBanner component

* Updated tests

* Made a lazy component

* Added underline to links in channel banner

* renamed param

* Created a selector for checking if channel banner is enabled or disabled

* addded test file

* test: Add tests for selectShowChannelBanner selector

* Added tests

* lint fix

* Used premium SKU constants

* Fixed a redux test
Этот коммит содержится в:
Harshil Sharma
2025-04-04 14:53:03 +05:30
коммит произвёл GitHub
родитель 09488558a0
Коммит d2173eb664
14 изменённых файлов: 844 добавлений и 0 удалений

Просмотреть файл

@@ -32,6 +32,20 @@ export type ChannelNotifyProps = {
channel_auto_follow_threads: 'off' | 'on';
};
export type ChannelBanner = {
enabled?: boolean;
text?: string;
background_color?: string;
}
export function channelBannerEnabled(banner: ChannelBanner | undefined): boolean {
if (!banner) {
return false;
}
return Boolean(banner.enabled) && Boolean(banner.text) && Boolean(banner.background_color);
}
export type Channel = {
id: string;
create_at: number;
@@ -53,6 +67,7 @@ export type Channel = {
shared?: boolean;
props?: Record<string, any>;
policy_id?: string | null;
banner_info?: ChannelBanner;
};
export type ServerChannel = Channel & {