Show or not the Powered by image (#2163)
* Show or not the Powered by image * Fix prettier issues * Fix prettier issues messages
This commit is contained in:
parent
a662096e1d
commit
ad229460ef
@ -561,6 +561,7 @@ export class GameRoom {
|
|||||||
mapUrl,
|
mapUrl,
|
||||||
authenticationMandatory: null,
|
authenticationMandatory: null,
|
||||||
group: null,
|
group: null,
|
||||||
|
showPoweredBy: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<section class="action">
|
<section class="action">
|
||||||
<button type="submit" class="nes-btn is-primary loginSceneFormSubmit">{$LL.login.continue()}</button>
|
<button type="submit" class="nes-btn is-primary loginSceneFormSubmit">{$LL.login.continue()}</button>
|
||||||
</section>
|
</section>
|
||||||
{#if logo !== logoImg}
|
{#if logo !== logoImg && gameManager.currentStartedRoom.showPoweredBy !== false}
|
||||||
<section class="text-center powered-by">
|
<section class="text-center powered-by">
|
||||||
<img src={poweredByWorkAdventureImg} alt="Powered by WorkAdventure" />
|
<img src={poweredByWorkAdventureImg} alt="Powered by WorkAdventure" />
|
||||||
</section>
|
</section>
|
||||||
|
@ -25,6 +25,7 @@ export class Room {
|
|||||||
private _canReport: boolean = false;
|
private _canReport: boolean = false;
|
||||||
private _loadingLogo: string | undefined;
|
private _loadingLogo: string | undefined;
|
||||||
private _loginSceneLogo: string | undefined;
|
private _loginSceneLogo: string | undefined;
|
||||||
|
private _showPoweredBy: boolean | undefined = true;
|
||||||
|
|
||||||
private constructor(private roomUrl: URL) {
|
private constructor(private roomUrl: URL) {
|
||||||
this.id = roomUrl.pathname;
|
this.id = roomUrl.pathname;
|
||||||
@ -120,6 +121,7 @@ export class Room {
|
|||||||
this._canReport = data.canReport ?? false;
|
this._canReport = data.canReport ?? false;
|
||||||
this._loadingLogo = data.loadingLogo ?? undefined;
|
this._loadingLogo = data.loadingLogo ?? undefined;
|
||||||
this._loginSceneLogo = data.loginSceneLogo ?? undefined;
|
this._loginSceneLogo = data.loginSceneLogo ?? undefined;
|
||||||
|
this._showPoweredBy = data.showPoweredBy ?? true;
|
||||||
return new MapDetail(data.mapUrl);
|
return new MapDetail(data.mapUrl);
|
||||||
} else {
|
} else {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@ -213,4 +215,8 @@ export class Room {
|
|||||||
get loginSceneLogo(): string | undefined {
|
get loginSceneLogo(): string | undefined {
|
||||||
return this._loginSceneLogo;
|
return this._loginSceneLogo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get showPoweredBy(): boolean | undefined {
|
||||||
|
return this._showPoweredBy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ export class Loader {
|
|||||||
.catch((e) => console.warn("Could not load logo: ", logoResource, e));
|
.catch((e) => console.warn("Could not load logo: ", logoResource, e));
|
||||||
|
|
||||||
let poweredByLogoPromise: CancelablePromise<Texture> | undefined;
|
let poweredByLogoPromise: CancelablePromise<Texture> | undefined;
|
||||||
if (gameManager.currentStartedRoom.loadingLogo) {
|
if (gameManager.currentStartedRoom.loadingLogo && gameManager.currentStartedRoom.showPoweredBy !== false) {
|
||||||
poweredByLogoPromise = this.superLoad.image(
|
poweredByLogoPromise = this.superLoad.image(
|
||||||
"poweredByLogo",
|
"poweredByLogo",
|
||||||
"static/images/Powered_By_WorkAdventure_Small.png"
|
"static/images/Powered_By_WorkAdventure_Small.png"
|
||||||
|
@ -20,6 +20,7 @@ export const isMapDetailsData = z.object({
|
|||||||
loadingLogo: z.optional(z.nullable(z.string())),
|
loadingLogo: z.optional(z.nullable(z.string())),
|
||||||
// The URL of the logo image on "LoginScene"
|
// The URL of the logo image on "LoginScene"
|
||||||
loginSceneLogo: z.optional(z.nullable(z.string())),
|
loginSceneLogo: z.optional(z.nullable(z.string())),
|
||||||
|
showPoweredBy: z.boolean(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type MapDetailsData = z.infer<typeof isMapDetailsData>;
|
export type MapDetailsData = z.infer<typeof isMapDetailsData>;
|
||||||
|
@ -49,6 +49,7 @@ class LocalAdmin implements AdminInterface {
|
|||||||
iframeAuthentication: null,
|
iframeAuthentication: null,
|
||||||
loadingLogo: null,
|
loadingLogo: null,
|
||||||
loginSceneLogo: null,
|
loginSceneLogo: null,
|
||||||
|
showPoweredBy: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user