diff --git a/src/app.css b/src/app.css index e43f3ee3f..039f0aa00 100644 --- a/src/app.css +++ b/src/app.css @@ -46,6 +46,7 @@ --tagWidget-cta-color: #ffffff; --tagWidget-color: #000000; --tagWidget-hyperlink-color: #2271b1; + --order-creditCard-svg-color: #2271b1; } @layer base { @@ -298,6 +299,9 @@ --tw-prose-bold: inherit; --tw-prose-links: var(--body-hyperlink-color); } + .order-creditCard-svg { + color: var(--order-creditCard-svg-color); + } } @layer utilities { diff --git a/src/lib/server/runtime-config.ts b/src/lib/server/runtime-config.ts index d6eed6249..29a0c3baa 100644 --- a/src/lib/server/runtime-config.ts +++ b/src/lib/server/runtime-config.ts @@ -181,6 +181,8 @@ const baseConfig = { ], contactModes: ['email', 'nostr'], posTouchTag: [] as Tag['_id'][], + hideCreditCardQrCode: false, + overwriteCreditCardSvgColor: false, hideCmsZonesOnMobile: false, copyOrderEmailsToAdmin: true, usersDarkDefaultTheme: false, diff --git a/src/lib/server/theme.ts b/src/lib/server/theme.ts index e30b8d356..f89461c0b 100644 --- a/src/lib/server/theme.ts +++ b/src/lib/server/theme.ts @@ -102,6 +102,11 @@ export const themeValidator = z.object({ cancel: z.object({ backgroundColor }), delete: z.object({ backgroundColor }) }) + }), + order: z.object({ + creditCard: z.object({ + svg: z.object({ color }) + }) }) }); diff --git a/src/lib/types/Theme.ts b/src/lib/types/Theme.ts index bbca9f22e..3d30cd962 100644 --- a/src/lib/types/Theme.ts +++ b/src/lib/types/Theme.ts @@ -242,6 +242,15 @@ export const themeFormStructure = { name: 'action.delete.backgroundColor' } ] + }, + order: { + label: 'Order', + elements: [ + { + label: 'Credit card svg fill color', + name: 'creditCard.svg.color' + } + ] } } satisfies { [key in keyof Omit]: { diff --git a/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.server.ts b/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.server.ts index fea00ed52..49a60bd94 100644 --- a/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.server.ts +++ b/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.server.ts @@ -35,7 +35,9 @@ export async function load(event) { copyOrderEmailsToAdmin: runtimeConfig.copyOrderEmailsToAdmin, disableLanguageSelector: runtimeConfig.disableLanguageSelector, defaultOnLocation: runtimeConfig.defaultOnLocation, - cartPreviewInteractive: runtimeConfig.cartPreviewInteractive + cartPreviewInteractive: runtimeConfig.cartPreviewInteractive, + overwriteCreditCardSvgColor: runtimeConfig.overwriteCreditCardSvgColor, + hideCreditCardQrCode: runtimeConfig.hideCreditCardQrCode }; } @@ -90,7 +92,9 @@ export const actions = { cartMaxSeparateItems: z.number({ coerce: true }).int().default(0), disableLanguageSelector: z.boolean({ coerce: true }), contactModes: z.string().array(), - cartPreviewInteractive: z.boolean({ coerce: true }) + cartPreviewInteractive: z.boolean({ coerce: true }), + hideCreditCardQrCode: z.boolean({ coerce: true }), + overwriteCreditCardSvgColor: z.boolean({ coerce: true }) }) .parse({ ...Object.fromEntries(formData), diff --git a/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.svelte b/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.svelte index a9187aec1..5b286a04c 100644 --- a/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.svelte +++ b/src/routes/(app)/admin[[hash=admin_hash]]/config/+page.svelte @@ -218,6 +218,29 @@ /> {/if} +

Order

+ + +

+ Target color can be changed in theme("Order" then + "Credit card svg fill color" in theme) +

VAT