mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-07 11:08:52 +01:00
📌 feat: Add Support for Persistable (Non-Dismissible) Banners (#10730)
* feat: Add persistable property to banners and update related components * refactor: Clean up Banner component and improve className handling
This commit is contained in:
parent
997f1f6a21
commit
401b2eb217
5 changed files with 42 additions and 13 deletions
|
|
@ -1139,6 +1139,7 @@ export const tBannerSchema = z.object({
|
|||
createdAt: z.string(),
|
||||
updatedAt: z.string(),
|
||||
isPublic: z.boolean(),
|
||||
persistable: z.boolean().default(false),
|
||||
});
|
||||
export type TBanner = z.infer<typeof tBannerSchema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export interface IBanner extends Document {
|
|||
displayTo?: Date;
|
||||
type: 'banner' | 'popup';
|
||||
isPublic: boolean;
|
||||
persistable: boolean;
|
||||
}
|
||||
|
||||
const bannerSchema = new Schema<IBanner>(
|
||||
|
|
@ -36,6 +37,10 @@ const bannerSchema = new Schema<IBanner>(
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
persistable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
{ timestamps: true },
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ export interface IBanner extends Document {
|
|||
displayTo?: Date;
|
||||
type: 'banner' | 'popup';
|
||||
isPublic: boolean;
|
||||
persistable: boolean;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue