From ebdcf8804d7ab72a51bac10eeb476467caa16f43 Mon Sep 17 00:00:00 2001 From: kharhamel Date: Fri, 30 Jul 2021 14:08:27 +0200 Subject: [PATCH] added admin link to the warning container --- .github/workflows/continuous_integration.yml | 1 + .github/workflows/push-to-npm.yml | 1 + .../WarningContainer/WarningContainer.svelte | 13 ++++++++- front/src/Enum/EnvironmentVariable.ts | 28 ++++++++++--------- front/src/Phaser/Game/GameScene.ts | 3 ++ front/src/Phaser/Menu/MenuScene.ts | 3 +- front/src/Stores/GameStore.ts | 4 ++- front/webpack.config.ts | 2 +- 8 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index faf50c7a..ecd7ffef 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -50,6 +50,7 @@ jobs: run: yarn run build env: PUSHER_URL: "//localhost:8080" + ADMIN_URL: "//localhost:80" working-directory: "front" - name: "Svelte check" diff --git a/.github/workflows/push-to-npm.yml b/.github/workflows/push-to-npm.yml index fd247b11..1208e0c0 100644 --- a/.github/workflows/push-to-npm.yml +++ b/.github/workflows/push-to-npm.yml @@ -47,6 +47,7 @@ jobs: run: yarn run build-typings env: PUSHER_URL: "//localhost:8080" + ADMIN_URL: "//localhost:80" working-directory: "front" # We build the front to generate the typings of iframe_api, then we copy those typings in a separate package. diff --git a/front/src/Components/WarningContainer/WarningContainer.svelte b/front/src/Components/WarningContainer/WarningContainer.svelte index 26961357..57b956e2 100644 --- a/front/src/Components/WarningContainer/WarningContainer.svelte +++ b/front/src/Components/WarningContainer/WarningContainer.svelte @@ -1,14 +1,25 @@

Warning!

-

This world is close to its limit!

+ {#if $userIsAdminStore} +

This world is close to its limit!. You can upgrade its capacity here

+ {:else} +

This world is close to its limit!

+ {/if} +