2021-07-13 11:00:32 +02:00
|
|
|
<script lang="ts">
|
2021-12-06 16:12:37 +01:00
|
|
|
import type { PlayerInterface } from "../../Phaser/Game/PlayerInterface";
|
|
|
|
import { requestVisitCardsStore } from "../../Stores/GameStore";
|
2021-12-19 16:01:51 +01:00
|
|
|
import { translator } from "../../Translator/Translator";
|
2021-07-13 11:00:32 +02:00
|
|
|
|
|
|
|
export let player: PlayerInterface;
|
|
|
|
|
|
|
|
function openVisitCard() {
|
|
|
|
if (player.visitCardUrl) {
|
|
|
|
requestVisitCardsStore.set(player.visitCardUrl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<ul class="selectMenu" style="border-top: {player.color || 'whitesmoke'} 5px solid">
|
2021-12-19 16:01:51 +01:00
|
|
|
<li>
|
|
|
|
<button class="text-btn" disabled={!player.visitCardUrl} on:click={openVisitCard}
|
|
|
|
>{translator._("chat.menu.visit-card")}</button
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
<li><button class="text-btn" disabled>{translator._("chat.menu.add-friend")}</button></li>
|
2021-07-13 11:00:32 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2021-12-06 16:12:37 +01:00
|
|
|
ul.selectMenu {
|
|
|
|
background-color: whitesmoke;
|
|
|
|
position: absolute;
|
|
|
|
padding: 5px;
|
|
|
|
border-radius: 4px;
|
|
|
|
list-style-type: none;
|
2021-07-13 11:00:32 +02:00
|
|
|
|
2021-12-06 16:12:37 +01:00
|
|
|
li {
|
|
|
|
text-align: center;
|
|
|
|
}
|
2021-07-13 11:00:32 +02:00
|
|
|
}
|
2021-12-06 16:12:37 +01:00
|
|
|
</style>
|