diff --git a/front/admin/package-lock.json b/front/admin/package-lock.json index 9746a367..6802d313 100644 --- a/front/admin/package-lock.json +++ b/front/admin/package-lock.json @@ -7,9 +7,6 @@ "": { "name": "app", "version": "0.0.1", - "dependencies": { - "openapi-fetch": "^0.9.2" - }, "devDependencies": { "@mdi/js": "^7.0.96", "@playwright/test": "1.25.0", @@ -26,6 +23,7 @@ "eslint-config-prettier": "^8.3.0", "http-status-codes": "^2.2.0", "kleur": "^4.1.5", + "openapi-fetch": "^0.9.2", "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.1.2", "svelte": "^4.2.10", @@ -3272,6 +3270,7 @@ "version": "0.9.2", "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.9.2.tgz", "integrity": "sha512-EEzVCoGAbGP1Z3eTZXI0urHtvb+JRKLnPbnemsUzeTWcHCaAXsdhAWYfdLAx4fTNNUaL23BQLup8dQjMMkCRqA==", + "dev": true, "dependencies": { "openapi-typescript-helpers": "^0.0.7" } @@ -3279,7 +3278,8 @@ "node_modules/openapi-typescript-helpers": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.7.tgz", - "integrity": "sha512-7nwlAtdA1fULipibFRBWE/rnF114q6ejRYzNvhdA/x+qTWAZhXGLc/368dlwMlyJDvCQMCnADjpzb5BS5ZmNSA==" + "integrity": "sha512-7nwlAtdA1fULipibFRBWE/rnF114q6ejRYzNvhdA/x+qTWAZhXGLc/368dlwMlyJDvCQMCnADjpzb5BS5ZmNSA==", + "dev": true }, "node_modules/optionator": { "version": "0.9.1", @@ -7046,6 +7046,7 @@ "version": "0.9.2", "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.9.2.tgz", "integrity": "sha512-EEzVCoGAbGP1Z3eTZXI0urHtvb+JRKLnPbnemsUzeTWcHCaAXsdhAWYfdLAx4fTNNUaL23BQLup8dQjMMkCRqA==", + "dev": true, "requires": { "openapi-typescript-helpers": "^0.0.7" } @@ -7053,7 +7054,8 @@ "openapi-typescript-helpers": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.7.tgz", - "integrity": "sha512-7nwlAtdA1fULipibFRBWE/rnF114q6ejRYzNvhdA/x+qTWAZhXGLc/368dlwMlyJDvCQMCnADjpzb5BS5ZmNSA==" + "integrity": "sha512-7nwlAtdA1fULipibFRBWE/rnF114q6ejRYzNvhdA/x+qTWAZhXGLc/368dlwMlyJDvCQMCnADjpzb5BS5ZmNSA==", + "dev": true }, "optionator": { "version": "0.9.1", diff --git a/front/app/src/lib/components/StationProfile.svelte b/front/app/src/lib/components/StationProfile.svelte index 8e9f98fb..169893d6 100644 --- a/front/app/src/lib/components/StationProfile.svelte +++ b/front/app/src/lib/components/StationProfile.svelte @@ -59,6 +59,7 @@ import type { LangCode } from '$server/defs/LangCode'; import type { GooglePlayLang } from './google-play-lang'; import GooglePlayLangField from './GooglePlayLangField.svelte'; + import { tooltip } from '$share/tooltip'; export let account_id: string; export let station_id: string | null; @@ -100,10 +101,14 @@ base_color: string icon_bg_color: string icon_rounded: boolean - ads: boolean + // banners + ads: boolean + interstitial_ads: boolean + admob_app_id: string | null | undefined admob_banner_id: string | null | undefined + admob_interstitial_id: string | null | undefined google_play_console_id: string | null | undefined, @@ -125,7 +130,7 @@ return null; } - const _validate_admob_banner_id = (value: string | null | undefined): string | null => { + const _validate_admob_ad_id = (value: string | null | undefined): string | null => { if(value == null) return null; if(!/^ca\-app\-pub\-[0-9]{16}\/[0-9]{10}$/.test(value)) { return $locale.station_profile.validation.admob_banner_id_pattern; @@ -151,7 +156,7 @@ gap: 2.5rem; padding: 2rem; } - + .section-logo { --validator-message-font-size: 1em; --validator-message-margin: 0; @@ -200,6 +205,20 @@ font-size: 0.8rem; margin: 0.5rem 0.25rem; } + + .field.with-toggle { + position: relative; + padding-inline-end: 2.5rem; + } + + .field-toggle { + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + display: flex; + flex: none; + } @@ -578,13 +597,6 @@
-
- -
-
-
+
- + + +
+ +
+
+ + +
+ + + +
+ +
-
\ No newline at end of file diff --git a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/profile/+page.svelte b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/profile/+page.svelte index 54fe56b4..02a74957 100644 --- a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/profile/+page.svelte +++ b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/profile/+page.svelte @@ -45,9 +45,13 @@ base_color: String((data.station.user_metadata.mob_app as any)?.base_color ?? ""), icon_bg_color: String((data.station.user_metadata.mob_app as any)?.icon_bg_color ?? ""), icon_rounded: !!(data.station.user_metadata.mob_app as any)?.icon_rounded ?? false, + ads: !!(data.station.user_metadata.mob_app as any)?.ads ?? false, + interstitial_ads: !!(data.station.user_metadata.mob_app as any)?.interstitial_ads ?? false, + admob_app_id: String((data.station.user_metadata.mob_app as any)?.admob_app_id ?? "") || null, admob_banner_id: String((data.station.user_metadata.mob_app as any)?.admob_banner_id ?? "") || null, + admob_interstitial_id: String((data.station.user_metadata.mob_app as any)?.admob_interstitial_id ?? "") || null, google_play_console_id: String((data.station.user_metadata.mob_app as any)?.google_play_console_id || "") || null, diff --git a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/create-station/+page.svelte b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/create-station/+page.svelte index 89d66fda..dbc49c0d 100644 --- a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/create-station/+page.svelte +++ b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/create-station/+page.svelte @@ -55,9 +55,13 @@ base_color: "", icon_bg_color: "", icon_rounded: false, + ads: false, + interstitial_ads: false, + admob_app_id: null as string | null | undefined, admob_banner_id: null as string | null | undefined, + admob_interstitial_id: null as string | null | undefined, google_play_console_id: null as string | null | undefined, diff --git a/front/share/src/Form/BooleanField.svelte b/front/share/src/Form/BooleanField.svelte index 50e97291..968df523 100644 --- a/front/share/src/Form/BooleanField.svelte +++ b/front/share/src/Form/BooleanField.svelte @@ -1,6 +1,6 @@