Update login screen and site settings with editable footer and AI art

Add editable footer text fields to site settings, update OpenAPI schema and API client, refactor the login page to display AI-generated artwork and use dynamic footer text, and remove the old logo and welcome heading.
This commit is contained in:
Riyadh
2026-04-20 12:28:25 +00:00
parent b76840d863
commit 75591e9acf
9 changed files with 99 additions and 77 deletions
@@ -261,6 +261,8 @@ export interface AppSettings {
siteNameAr: string;
siteNameEn: string;
registrationOpen: boolean;
footerTextAr: string;
footerTextEn: string;
updatedAt?: string;
}
@@ -281,6 +283,16 @@ export interface UpdateAppSettingsBody {
*/
siteNameEn?: string;
registrationOpen?: boolean;
/**
* @minLength 1
* @maxLength 300
*/
footerTextAr?: string;
/**
* @minLength 1
* @maxLength 300
*/
footerTextEn?: string;
}
export interface RequestUploadUrlBody {
+13 -1
View File
@@ -1219,7 +1219,7 @@ components:
AppSettings:
type: object
required: [siteNameAr, siteNameEn, registrationOpen]
required: [siteNameAr, siteNameEn, registrationOpen, footerTextAr, footerTextEn]
properties:
siteNameAr:
type: string
@@ -1227,6 +1227,10 @@ components:
type: string
registrationOpen:
type: boolean
footerTextAr:
type: string
footerTextEn:
type: string
updatedAt:
type: string
format: date-time
@@ -1254,6 +1258,14 @@ components:
maxLength: 200
registrationOpen:
type: boolean
footerTextAr:
type: string
minLength: 1
maxLength: 300
footerTextEn:
type: string
minLength: 1
maxLength: 300
RequestUploadUrlBody:
type: object
+18
View File
@@ -231,6 +231,8 @@ export const GetAppSettingsResponse = zod.object({
siteNameAr: zod.string(),
siteNameEn: zod.string(),
registrationOpen: zod.boolean(),
footerTextAr: zod.string(),
footerTextEn: zod.string(),
updatedAt: zod.coerce.date().optional(),
});
@@ -241,6 +243,10 @@ export const updateAppSettingsBodySiteNameArMax = 200;
export const updateAppSettingsBodySiteNameEnMax = 200;
export const updateAppSettingsBodyFooterTextArMax = 300;
export const updateAppSettingsBodyFooterTextEnMax = 300;
export const UpdateAppSettingsBody = zod.object({
siteNameAr: zod
.string()
@@ -253,12 +259,24 @@ export const UpdateAppSettingsBody = zod.object({
.max(updateAppSettingsBodySiteNameEnMax)
.optional(),
registrationOpen: zod.boolean().optional(),
footerTextAr: zod
.string()
.min(1)
.max(updateAppSettingsBodyFooterTextArMax)
.optional(),
footerTextEn: zod
.string()
.min(1)
.max(updateAppSettingsBodyFooterTextEnMax)
.optional(),
});
export const UpdateAppSettingsResponse = zod.object({
siteNameAr: zod.string(),
siteNameEn: zod.string(),
registrationOpen: zod.boolean(),
footerTextAr: zod.string(),
footerTextEn: zod.string(),
updatedAt: zod.coerce.date().optional(),
});
+2
View File
@@ -7,6 +7,8 @@ export const appSettingsTable = pgTable("app_settings", {
siteNameAr: varchar("site_name_ar", { length: 200 }).notNull().default("نظام TeaBoy"),
siteNameEn: varchar("site_name_en", { length: 200 }).notNull().default("TeaBoy OS"),
registrationOpen: boolean("registration_open").notNull().default(true),
footerTextAr: varchar("footer_text_ar", { length: 300 }).notNull().default("جميع الحقوق محفوظة."),
footerTextEn: varchar("footer_text_en", { length: 300 }).notNull().default("All rights reserved."),
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow().$onUpdate(() => new Date()),
});