Correction following test

This commit is contained in:
GRL 2021-08-19 11:17:46 +02:00
parent d6bd883c94
commit 2ebf05f7d6
9 changed files with 52 additions and 43 deletions

View file

@ -38,7 +38,7 @@
import LayoutManager from "./LayoutManager/LayoutManager.svelte";
import {audioManagerVisibilityStore} from "../Stores/AudioManagerStore";
import AudioManager from "./AudioManager/AudioManager.svelte"
import { showReportScreenStore } from "../Stores/ShowReportScreenStore";
import { showReportScreenStore, userReportEmpty } from "../Stores/ShowReportScreenStore";
import ReportMenu from "./ReportMenu/ReportMenu.svelte";
export let game: Game;
@ -96,7 +96,7 @@
<LayoutManager></LayoutManager>
</div>
{/if}
{#if $showReportScreenStore}
{#if $showReportScreenStore !== userReportEmpty}
<div>
<ReportMenu></ReportMenu>
</div>

View file

@ -12,31 +12,31 @@
<section class="container-overflow">
<section>
<p>
The WorkAdventure team is always available to help you.
If you have any questions, problems, new features or improvements ideas, or if you just want to give us your feedback,
do not hesitate to contact us.
The WorkAdventure team is always happy to give you some guidance and advice.
If you have any question, issue, new features or improvements you'd like to see or if you'd like to give us some feedback,
please don't hesitate to reach out!
</p>
</section>
<section>
<h3>Our Office</h3>
<p>
The WorkAdventure team has its own offices in ... WorkAdventure!
Do not hesitate to come see and talk to us.
Let's grab a coffee and have a chat on our virtual office .... on WorkAdventure. Our team loves meeting new people!
</p>
<a class="nes-pointer" href="https://play.staging.workadventu.re/@tcm/workadventure/wa-village" target="_blank">Visit us</a>
</section>
<section>
<h3>Our Mail</h3>
<p>Although we offer a solution to reduce their use, we have an email address that allows us to receive all your requests.</p>
<p>You'd rather send us an email? Please, feel free to do so, although we hope we could meet you on our virtual office soon enough.</p>
<a class="nes-pointer" href="mailto:hello@workadventu.re" target="_blank">hello@workadventu.re</a>
</section>
<section>
<h3>Our web site</h3>
<p>If you want to know more about us, follow the link to our web site.</p>
<p>Do you want to know more about us? Just follow the link to our website.</p>
<a class="nes-pointer" href="https://workadventu.re/about-us" target="_blank">About us</a>
</section>
<section>
<h3>Our social media</h3>
<p>Follow us and keep you updated on the latest news and upcoming new features!</p>
<a href="https://discord.gg/YGtngdh9gt" target="_blank">
<img class="nes-pointer" src="{discordImg}" alt="{'Discord'}">
</a>
@ -75,11 +75,14 @@
section {
text-align: center;
padding: 4px 5px;
margin-bottom: 25px;
margin-bottom: 15px;
p {
margin: 0;
}
img {
margin-top: 10px;
}
img {
height: 50px;

View file

@ -1,15 +1,11 @@
<script lang="ts">
function goToGettingStarted() {
//The redirection must be only on workadventu.re domain
//To day the domain staging cannot be use by customer
const sparkHost = "https://workadventu.re/getting-started";
window.open(sparkHost, "_blank");
}
function goToBuildingMap() {
//The redirection must be only on workadventu.re domain
//The scripting API function could change on other domain and that could break map created with the old function
const sparkHost = "https://workadventu.re/map-building";
window.open(sparkHost, "_blank");
}

View file

@ -7,7 +7,7 @@
import GlobalMessageSubMenu from "./GlobalMessagesSubMenu.svelte";
import ContactSubMenu from "./ContactSubMenu.svelte";
import {menuVisiblilityStore, SubMenusInterface, subMenusStore} from "../../Stores/MenuStore";
//import {userIsAdminStore} from "../../Stores/GameStore";
import {userIsAdminStore} from "../../Stores/GameStore";
import {onMount} from "svelte";
import {get} from "svelte/store";
import {sendMenuClickedEvent} from "../../Api/iframe/Ui/MenuItem";
@ -16,10 +16,13 @@
let activeComponent: typeof SettingsSubMenu = SettingsSubMenu;
onMount(() => {
//TODO: Uncomment before final push to merge
/*if(!get(userIsAdminStore)) {
if(!get(userIsAdminStore)) {
subMenusStore.removeMenu(SubMenusInterface.globalMessages);
}*/
}
//Until we can add iframe to a menu and change contact for self-hosted version
//we remove the contact sub-menu
subMenusStore.removeMenu(SubMenusInterface.contact);
switchMenu(SubMenusInterface.settings);
})
@ -94,7 +97,7 @@
font-family: "Press Start 2P";
pointer-events: auto;
height: 70vh;
height: 80vh;
width: 75vw;
top: 10vh;
@ -129,7 +132,7 @@
@media only screen and (max-width: 800px) {
div.menu-container-main {
--size-first-columns-grid: 120px;
//height: calc(100vh - 110px);
height: 70vh;
top: 55px;
width: 100vw;
font-size: 0.5em;

View file

@ -93,13 +93,12 @@ function changeNotification() {
<style lang="scss">
div.settings-main {
height: calc(100% - 56px);
display: grid;
grid-template-rows: 25% 25% 25% 20%;
height: calc(100% - 40px);
section {
width: 100%;
padding: 20px 20px 0;
margin-bottom: 20px;
text-align: center;
div.nes-select select:focus {
@ -132,7 +131,7 @@ function changeNotification() {
}
section.settings-section-noSaveOption {
margin-top: 20px;
height: 80px;
grid-template-columns: none;
grid-template-rows: calc(100% / var(--nb-noSaveOptions)) calc(100% / var(--nb-noSaveOptions)); //Same size for every sub-element;
}

View file

@ -1,6 +1,6 @@
<script lang="ts">
import {blackListManager} from "../../WebRtc/BlackListManager";
import {showReportScreenStore} from "../../Stores/ShowReportScreenStore";
import {showReportScreenStore, userReportEmpty} from "../../Stores/ShowReportScreenStore";
import {onMount} from "svelte";
export let userUUID: string | undefined;
@ -9,7 +9,7 @@
onMount(() => {
if (userUUID === undefined) {
userIsBlocked = false;
throw new Error("There is no user to block");
console.error("There is no user to block");
} else {
userIsBlocked = blackListManager.isBlackListed(userUUID);
}
@ -17,12 +17,13 @@
function blockUser(): void {
if (userUUID === undefined) {
throw new Error("There is no user to block");
console.error("There is no user to block");
return;
}
blackListManager.isBlackListed(userUUID)
? blackListManager.cancelBlackList(userUUID)
: blackListManager.blackList(userUUID);
showReportScreenStore.set(null); //close the report menu
showReportScreenStore.set(userReportEmpty); //close the report menu
}
</script>

View file

@ -1,31 +1,32 @@
<script lang="ts">
import {showReportScreenStore} from "../../Stores/ShowReportScreenStore";
import {showReportScreenStore, userReportEmpty} from "../../Stores/ShowReportScreenStore";
import BlockSubMenu from "./BlockSubMenu.svelte";
import ReportSubMenu from "./ReportSubMenu.svelte";
import {onDestroy, onMount} from "svelte";
import type {Unsubscriber} from "svelte/store";
import {playersStore} from "../../Stores/PlayersStore";
//import {connectionManager} from "../../Connexion/ConnectionManager";
//import {GameConnexionTypes} from "../../Url/UrlManager";
import {connectionManager} from "../../Connexion/ConnectionManager";
import {GameConnexionTypes} from "../../Url/UrlManager";
import {get} from "svelte/store";
let blockActive = true;
let reportActive = !blockActive;
let anonymous: boolean = false;
let userUUID: string | undefined = '';
let userUUID: string | undefined = playersStore.getPlayerById(get(showReportScreenStore).userId)?.userUuid;
let userName = "No name";
let unsubscriber: Unsubscriber
onMount(() => {
unsubscriber = showReportScreenStore.subscribe((reportSreenStore) => {
if (reportSreenStore != null) {
userName = reportSreenStore.userName;
userUUID = playersStore.getPlayerById(reportSreenStore.userId)?.userUuid;
unsubscriber = showReportScreenStore.subscribe((reportScreenStore) => {
if (reportScreenStore != null) {
userName = reportScreenStore.userName;
userUUID = playersStore.getPlayerById(reportScreenStore.userId)?.userUuid;
if (userUUID === undefined) {
throw new Error("Could not find UUID for user with ID " + reportSreenStore.userId);
console.error("Could not find UUID for user with ID " + reportScreenStore.userId);
}
}
})
//anonymous = connectionManager.getConnexionType === GameConnexionTypes.anonymous;
anonymous = connectionManager.getConnexionType === GameConnexionTypes.anonymous;
})
onDestroy(() => {
@ -35,7 +36,7 @@
})
function close() {
showReportScreenStore.set(null);
showReportScreenStore.set(userReportEmpty);
}
function activateBlock() {

View file

@ -1,5 +1,5 @@
<script lang="ts">
import {showReportScreenStore} from "../../Stores/ShowReportScreenStore";
import {showReportScreenStore, userReportEmpty} from "../../Stores/ShowReportScreenStore";
import {gameManager} from "../../Phaser/Game/GameManager";
export let userUUID: string | undefined;
@ -12,10 +12,11 @@
} else {
hiddenError = false;
if( userUUID === undefined) {
throw ('User UUID is not valid.');
console.error('User UUID is not valid.');
return;
}
gameManager.getCurrentGameScene().connection?.emitReportPlayerMessage(userUUID, reportMessage);
showReportScreenStore.set(null)
showReportScreenStore.set(userReportEmpty)
}
}
</script>

View file

@ -1,3 +1,8 @@
import { writable } from "svelte/store";
export const showReportScreenStore = writable<{ userId: number; userName: string } | null>(null);
export const userReportEmpty = {
userId: 0,
userName: "Empty",
};
export const showReportScreenStore = writable<{ userId: number; userName: string }>(userReportEmpty);