dark theme fixes

This commit is contained in:
2025-11-18 00:21:33 +03:00
parent 97268a78c7
commit 7769da2c29
20 changed files with 75 additions and 60 deletions

View File

@@ -251,7 +251,8 @@
"couponNotApplicable": "رمز القسيمة غير مطبق", "couponNotApplicable": "رمز القسيمة غير مطبق",
"am": "ص", "am": "ص",
"pm": "م", "pm": "م",
"cannotSelectPastDate": "لا يمكنك اختيار تاريخ سابق. يرجى اختيار اليوم أو تاريخ مستقبلي." "cannotSelectPastDate": "لا يمكنك اختيار تاريخ سابق. يرجى اختيار اليوم أو تاريخ مستقبلي.",
"checkRequiredFields": "يرجى التحقق من الحقول المطلوبة"
}, },
"checkout": { "checkout": {
"title": "الدفع", "title": "الدفع",

View File

@@ -261,7 +261,8 @@
"couponNotApplicable": "Coupon not applicable", "couponNotApplicable": "Coupon not applicable",
"am": "AM", "am": "AM",
"pm": "PM", "pm": "PM",
"cannotSelectPastDate": "You cannot select a past date. Please select today or a future date." "cannotSelectPastDate": "You cannot select a past date. Please select today or a future date.",
"checkRequiredFields": "Please check required fields"
}, },
"checkout": { "checkout": {
"title": "Checkout", "title": "Checkout",

View File

@@ -20,8 +20,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
hideCurrency = false, hideCurrency = false,
}) => { }) => {
const { isRTL } = useAppSelector((state) => state.locale); const { isRTL } = useAppSelector((state) => state.locale);
const {restaurant} = useAppSelector(state => state.order) const { restaurant } = useAppSelector((state) => state.order);
// Format the price to ensure it has 2 decimal places // Format the price to ensure it has 2 decimal places
const formattedPrice = typeof price === "number" ? price.toFixed(2) : price; const formattedPrice = typeof price === "number" ? price.toFixed(2) : price;
@@ -38,7 +37,6 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
style={{ style={{
display: "inline-flex", display: "inline-flex",
alignItems: "baseline", alignItems: "baseline",
gap: "0.2em",
lineHeight: 1, lineHeight: 1,
...restStyle, ...restStyle,
}} }}
@@ -54,6 +52,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
> >
{formattedPrice} {formattedPrice}
</span> </span>
<span style={{ margin: "0 2px" }} />
<span <span
style={{ style={{
fontSize: "0.9em", fontSize: "0.9em",
@@ -79,6 +78,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
> >
{formattedPrice} {formattedPrice}
</span> </span>
<span style={{ margin: "0 2px" }} />
<span <span
style={{ style={{
fontSize: "0.9em", fontSize: "0.9em",
@@ -89,7 +89,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
}} }}
> >
{isRTL ? restaurant.local_currency : restaurant.global_currency} {isRTL ? restaurant.local_currency : restaurant.global_currency}
</span> </span>
</> </>
) : ( ) : (
<span style={decorationStyle}>{formattedPrice}</span> <span style={decorationStyle}>{formattedPrice}</span>

View File

@@ -148,7 +148,7 @@ export function GiftBottomSheet({
<br /> <br />
<Button type="primary" style={{ width: "100%" }} onClick={handleSave}> <Button type="primary" style={{ width: "100%", boxShadow: "none" }} onClick={handleSave}>
{t("address.save")} {t("address.save")}
</Button> </Button>
</ProBottomSheet> </ProBottomSheet>

View File

@@ -50,7 +50,7 @@ export function InfoButtonSheet({
<ProText type="secondary" style={{textAlign:"center"}}>{description}</ProText> <ProText type="secondary" style={{textAlign:"center"}}>{description}</ProText>
</div> </div>
<br /> <br />
<Button type="primary" style={{ width: "100%" }} onClick={handleSave}> <Button type="primary" style={{ width: "100%", boxShadow: "none" }} onClick={handleSave}>
{t("address.gotIt")} {t("address.gotIt")}
</Button> </Button>
</ProBottomSheet> </ProBottomSheet>

View File

@@ -121,8 +121,9 @@ export function MapBottomSheet({
{t("cart.cancel")} {t("cart.cancel")}
</Button> </Button>
<Button <Button
type="primary"
className={styles.actionButton} className={styles.actionButton}
type="primary"
style={{ boxShadow: "none" }}
onClick={handleSave} onClick={handleSave}
disabled={!selectedLocation} disabled={!selectedLocation}
> >

View File

@@ -112,10 +112,7 @@ export function OfficeBottomSheet({
autoFocus={false} autoFocus={false}
/> />
</Form.Item> </Form.Item>
<ProPhoneInput <ProPhoneInput propName="phone" label={t("address.phone")} />
propName="phone"
label={t("address.phone")}
/>
<Form.Item name="note" label={t("address.note")}> <Form.Item name="note" label={t("address.note")}>
<TextArea <TextArea
placeholder={t("address.addressLabel")} placeholder={t("address.addressLabel")}
@@ -132,7 +129,11 @@ export function OfficeBottomSheet({
<br /> <br />
<Button type="primary" style={{ width: "100%" }} onClick={handleSave}> <Button
type="primary"
style={{ width: "100%", boxShadow: "none" }}
onClick={handleSave}
>
{t("address.save")} {t("address.save")}
</Button> </Button>
</ProBottomSheet> </ProBottomSheet>

View File

@@ -82,7 +82,7 @@ export function RoomBottomSheet({
style={{ style={{
fontSize: 14, fontSize: 14,
height: 50, height: 50,
}} }}
autoFocus={false} autoFocus={false}
/> />
</Form.Item> </Form.Item>
@@ -128,7 +128,11 @@ export function RoomBottomSheet({
<br /> <br />
<Button type="primary" style={{ width: "100%" }} onClick={handleSave}> <Button
type="primary"
style={{ width: "100%", boxShadow: "none" }}
onClick={handleSave}
>
{t("address.save")} {t("address.save")}
</Button> </Button>
</ProBottomSheet> </ProBottomSheet>

View File

@@ -17,7 +17,7 @@ const InfoIcon = ({ className, onClick }: InfoIconType) => {
<g clipPath="url(#clip0_2505_25450)"> <g clipPath="url(#clip0_2505_25450)">
<path <path
d="M9.99984 13.3337V10.0003M9.99984 6.66699H10.0082M18.3332 10.0003C18.3332 14.6027 14.6022 18.3337 9.99984 18.3337C5.39746 18.3337 1.6665 14.6027 1.6665 10.0003C1.6665 5.39795 5.39746 1.66699 9.99984 1.66699C14.6022 1.66699 18.3332 5.39795 18.3332 10.0003Z" d="M9.99984 13.3337V10.0003M9.99984 6.66699H10.0082M18.3332 10.0003C18.3332 14.6027 14.6022 18.3337 9.99984 18.3337C5.39746 18.3337 1.6665 14.6027 1.6665 10.0003C1.6665 5.39795 5.39746 1.66699 9.99984 1.66699C14.6022 1.66699 18.3332 5.39795 18.3332 10.0003Z"
stroke="#5F6C7B" stroke="var(--secondary-foreground)"
strokeWidth="2" strokeWidth="2"
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"

View File

@@ -16,7 +16,7 @@ const InvoiceIcon = ({ className, onClick }: InvoiceIconType) => {
> >
<path <path
d="M7.83317 7.41504H3.83317M5.1665 10.0817H3.83317M9.1665 4.74837H3.83317M11.8332 4.61504V11.5484C11.8332 12.6685 11.8332 13.2285 11.6152 13.6564C11.4234 14.0327 11.1175 14.3386 10.7412 14.5304C10.3133 14.7484 9.75328 14.7484 8.63317 14.7484H4.3665C3.2464 14.7484 2.68635 14.7484 2.25852 14.5304C1.8822 14.3386 1.57624 14.0327 1.38449 13.6564C1.1665 13.2285 1.1665 12.6685 1.1665 11.5484V4.61504C1.1665 3.49493 1.1665 2.93488 1.38449 2.50706C1.57624 2.13073 1.8822 1.82477 2.25852 1.63303C2.68635 1.41504 3.2464 1.41504 4.3665 1.41504H8.63317C9.75328 1.41504 10.3133 1.41504 10.7412 1.63303C11.1175 1.82477 11.4234 2.13073 11.6152 2.50706C11.8332 2.93488 11.8332 3.49493 11.8332 4.61504Z" d="M7.83317 7.41504H3.83317M5.1665 10.0817H3.83317M9.1665 4.74837H3.83317M11.8332 4.61504V11.5484C11.8332 12.6685 11.8332 13.2285 11.6152 13.6564C11.4234 14.0327 11.1175 14.3386 10.7412 14.5304C10.3133 14.7484 9.75328 14.7484 8.63317 14.7484H4.3665C3.2464 14.7484 2.68635 14.7484 2.25852 14.5304C1.8822 14.3386 1.57624 14.0327 1.38449 13.6564C1.1665 13.2285 1.1665 12.6685 1.1665 11.5484V4.61504C1.1665 3.49493 1.1665 2.93488 1.38449 2.50706C1.57624 2.13073 1.8822 1.82477 2.25852 1.63303C2.68635 1.41504 3.2464 1.41504 4.3665 1.41504H8.63317C9.75328 1.41504 10.3133 1.41504 10.7412 1.63303C11.1175 1.82477 11.4234 2.13073 11.6152 2.50706C11.8332 2.93488 11.8332 3.49493 11.8332 4.61504Z"
stroke="#333333" stroke="#666666"
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
/> />

View File

@@ -17,7 +17,7 @@ const TimeIcon = ({ className, onClick }: TimeIconType) => {
<g clipPath="url(#clip0_2448_7814)"> <g clipPath="url(#clip0_2448_7814)">
<path <path
d="M8.50016 4.08171V8.08171L11.1668 9.41504M15.1668 8.08171C15.1668 11.7636 12.1821 14.7484 8.50016 14.7484C4.81826 14.7484 1.8335 11.7636 1.8335 8.08171C1.8335 4.39981 4.81826 1.41504 8.50016 1.41504C12.1821 1.41504 15.1668 4.39981 15.1668 8.08171Z" d="M8.50016 4.08171V8.08171L11.1668 9.41504M15.1668 8.08171C15.1668 11.7636 12.1821 14.7484 8.50016 14.7484C4.81826 14.7484 1.8335 11.7636 1.8335 8.08171C1.8335 4.39981 4.81826 1.41504 8.50016 1.41504C12.1821 1.41504 15.1668 4.39981 15.1668 8.08171Z"
stroke="#333333" stroke="#666666"
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
/> />

View File

@@ -1,5 +1,3 @@
.homeServiceCard { .homeServiceCard {
width: 100%; width: 100%;
height: 48px; height: 48px;
@@ -9,7 +7,8 @@
row-gap: 10px; row-gap: 10px;
transition: all 0.3s ease; transition: all 0.3s ease;
border-radius: 50px; border-radius: 50px;
background-color: #FFF; background-color: #fff;
cursor: pointer;
} }
.homeServiceCard :global(.ant-card-body) { .homeServiceCard :global(.ant-card-body) {
@@ -26,8 +25,6 @@
transition: all 0.3s ease; transition: all 0.3s ease;
} }
@media (min-width: 769px) and (max-width: 1024px) { @media (min-width: 769px) and (max-width: 1024px) {
.languageSwitch, .languageSwitch,
.themeSwitch, .themeSwitch,
@@ -109,6 +106,12 @@
color: #ffffff; color: #ffffff;
} }
:global(.darkApp) .homeServiceCard {
cursor: pointer;
background-color: #0a0a0a;
color: #ffffff;
}
:global(.darkApp) .homeContainer h1, :global(.darkApp) .homeContainer h1,
:global(.darkApp) .homeContainer h2, :global(.darkApp) .homeContainer h2,
:global(.darkApp) .homeContainer h3, :global(.darkApp) .homeContainer h3,
@@ -196,6 +199,5 @@
width: 24px; width: 24px;
height: 24px; height: 24px;
position: relative; position: relative;
top: -2px top: -2px;
} }

View File

@@ -32,7 +32,6 @@ export const InfoButton = ({
style={{ style={{
marginTop: -2, marginTop: -2,
fontSize: "1rem", fontSize: "1rem",
color: "rgba(95, 108, 123, 1)",
}} }}
> >
{title} {title}

View File

@@ -151,6 +151,7 @@ const OtpInput = ({
display: "grid", display: "grid",
gridTemplateColumns: "repeat(7, 1fr)", gridTemplateColumns: "repeat(7, 1fr)",
gap: 16, gap: 16,
direction: "ltr",
}} }}
> >
<div /> <div />

View File

@@ -2,7 +2,7 @@ import { Form } from "antd";
import useFormInstance from "antd/es/form/hooks/useFormInstance"; import useFormInstance from "antd/es/form/hooks/useFormInstance";
import { TitleProps } from "antd/es/typography/Title"; import { TitleProps } from "antd/es/typography/Title";
import { PhoneNumberUtil } from "google-libphonenumber"; import { PhoneNumberUtil } from "google-libphonenumber";
import { FunctionComponent } from "react"; import { FunctionComponent, useMemo } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import PhoneInput from "react-phone-input-2"; import PhoneInput from "react-phone-input-2";
import { useAppSelector } from "redux/hooks"; import { useAppSelector } from "redux/hooks";
@@ -22,7 +22,6 @@ const ProPhoneInput: FunctionComponent<ProPhoneInput> = ({
const form = useFormInstance(); const form = useFormInstance();
const { t } = useTranslation(); const { t } = useTranslation();
const { themeName } = useAppSelector((state) => state.theme); const { themeName } = useAppSelector((state) => state.theme);
const { isRTL } = useAppSelector((state) => state.locale);
return ( return (
<Form.Item <Form.Item
@@ -46,6 +45,7 @@ const ProPhoneInput: FunctionComponent<ProPhoneInput> = ({
}, },
}, },
]} ]}
style={{ direction: "ltr" }}
> >
<PhoneInputWrapper <PhoneInputWrapper
onChange={(value) => { onChange={(value) => {
@@ -54,7 +54,6 @@ const ProPhoneInput: FunctionComponent<ProPhoneInput> = ({
}} }}
phone={form.getFieldValue(propName)} phone={form.getFieldValue(propName)}
themeName={themeName} themeName={themeName}
isRTL={isRTL}
placeholder={t("login.mobileNumber")} placeholder={t("login.mobileNumber")}
propName={propName} propName={propName}
label={label} label={label}
@@ -66,7 +65,6 @@ const ProPhoneInput: FunctionComponent<ProPhoneInput> = ({
export const PhoneInputWrapper = ({ export const PhoneInputWrapper = ({
phone, phone,
themeName, themeName,
isRTL,
placeholder, placeholder,
value, value,
onChange, onChange,
@@ -75,29 +73,34 @@ export const PhoneInputWrapper = ({
}: { }: {
phone?: string; phone?: string;
themeName: string; themeName: string;
isRTL: boolean;
placeholder: string; placeholder: string;
value?: string; value?: string;
onChange?: (value: string) => void; onChange?: (value: string) => void;
propName?: string; propName?: string;
label?: string; label?: string;
}) => { }) => {
const inputStyle = useMemo(
() => ({
borderRadius: 1000,
height: 50,
width: "100%",
color: themeName === "light" ? "#000" : "#FFF",
backgroundColor: themeName === "light" ? "#FFF" : ProBlack1,
textAlign: "left" as const,
direction: "ltr" as const,
paddingLeft: "50px",
paddingRight: "50px",
borderColor: themeName === "light" ? "#d9d9d9" : "#363636",
}),
[themeName],
);
return ( return (
<div className="pro-phone-input"> <div className="pro-phone-input">
<PhoneInput <PhoneInput
key={themeName}
country={"om"} country={"om"}
inputStyle={{ inputStyle={inputStyle}
borderRadius: 1000,
height: 50,
width: "100%",
color: themeName === "light" ? "#000" : "#FFF",
backgroundColor: themeName === "light" ? "#FFF" : ProBlack1,
textAlign: isRTL ? "right" : "left",
direction: isRTL ? "rtl" : "ltr",
paddingLeft: "50px",
paddingRight: "50px",
borderColor: themeName === "light" ? "#d9d9d9" : "#363636",
}}
placeholder={label || placeholder} placeholder={label || placeholder}
value={value || phone} value={value || phone}
onChange={(value) => { onChange={(value) => {
@@ -109,13 +112,7 @@ export const PhoneInputWrapper = ({
borderLeft: "1px solid #363636", borderLeft: "1px solid #363636",
borderRadius: 0, borderRadius: 0,
position: "relative", position: "relative",
...(isRTL && { top: -25,
top: -25,
right: 25,
}),
...(!isRTL && {
top: -25,
}),
}} }}
autocompleteSearch autocompleteSearch
inputProps={{ inputProps={{

View File

@@ -7,7 +7,7 @@
:root { :root {
--background: #f7f7f7; --background: #f7f7f7;
--foreground: #181818; --foreground: #181818;
--border: #0505050f; --border: #e5e7eb;
--secondary-background: #ffffff; --secondary-background: #ffffff;
--secondary-foreground: #0a0a0a; --secondary-foreground: #0a0a0a;
--primary-dark: #0a0a0a; --primary-dark: #0a0a0a;
@@ -314,9 +314,9 @@ label {
margin-inline-end: 0px !important; margin-inline-end: 0px !important;
} }
.ant-select-selection-wrap .ant-select-selection-placeholder { .ant-select-selection-wrap {
position: relative; position: relative;
margin-top: 4px; margin-top: 3px;
} }
.restaurant-description-skeleton .ant-skeleton-paragraph { .restaurant-description-skeleton .ant-skeleton-paragraph {
@@ -415,6 +415,11 @@ label {
z-index: 999 !important; z-index: 999 !important;
} }
.ant-select-selection-item {
height: 28px !important;
line-height: 26px !important;
}
/* Target selection item and arrow in the Select component (not the dropdown) */ /* Target selection item and arrow in the Select component (not the dropdown) */
.order-type-select-container :where(.ant-select .ant-select-selection-item) { .order-type-select-container :where(.ant-select .ant-select-selection-item) {
color: #fff !important; color: #fff !important;

View File

@@ -69,7 +69,10 @@ export default function HeaderMenuDrawer() {
: lightColors.secondaryBgColor, : lightColors.secondaryBgColor,
[isRTL ? "borderTopRightRadius" : "borderTopLeftRadius"]: 10, [isRTL ? "borderTopRightRadius" : "borderTopLeftRadius"]: 10,
[isRTL ? "borderBottomRightRadius" : "borderBottomLeftRadius"]: 10, [isRTL ? "borderBottomRightRadius" : "borderBottomLeftRadius"]: 10,
border: "1px solid #E9E9E9", border:
themeName === "dark"
? "1px solid var(--border)"
: "1px solid var(--border)",
}} }}
> >
<Button <Button

View File

@@ -57,8 +57,8 @@ export default function TableNumberCard() {
style={{ position: "relative", top: -5 }} style={{ position: "relative", top: -5 }}
> >
<Select <Select
value={tables} value={tables[0]}
mode="multiple" // mode="multiple"
placeholder={ placeholder={
orderType === OrderType.DineIn orderType === OrderType.DineIn
? t("cart.tableNumber") ? t("cart.tableNumber")
@@ -76,7 +76,7 @@ export default function TableNumberCard() {
}} }}
onChange={(value) => { onChange={(value) => {
console.log(value); console.log(value);
dispatch(updateTables(value)); dispatch(updateTables([value as string]));
}} }}
onClear={() => { onClear={() => {
dispatch(removeTable()); dispatch(removeTable());

View File

@@ -24,6 +24,7 @@ export default function CartFooter({ form }: CartFooterProps) {
await form.validateFields(); await form.validateFields();
navigate(`/${subdomain}/checkout`); navigate(`/${subdomain}/checkout`);
} catch (error) { } catch (error) {
message.warning(t("cart.checkRequiredFields"));
console.log("Form validation failed:", error); console.log("Form validation failed:", error);
} }
} }

View File

@@ -30,7 +30,6 @@ export const GiftDetails = () => {
(giftDetailsData: GiftDetailsType) => { (giftDetailsData: GiftDetailsType) => {
try { try {
dispatch(updateGiftDetails(giftDetailsData)); dispatch(updateGiftDetails(giftDetailsData));
console.log("Gift details saved to Redux store:", giftDetailsData);
} catch (error) { } catch (error) {
console.error("Failed to parse location data:", error); console.error("Failed to parse location data:", error);
} }