button for getting help and animated chat
This commit is contained in:
parent
4bd71f76e4
commit
b90749ebf6
@ -7,7 +7,10 @@
|
|||||||
<h2>{{$t("warning")}}</h2>
|
<h2>{{$t("warning")}}</h2>
|
||||||
<p>{{$t("connection_error")}}</p>
|
<p>{{$t("connection_error")}}</p>
|
||||||
</div>
|
</div>
|
||||||
<select id="lang" style="position:fixed;bottom:4pt;right:4pt;" v-model="$i18n.locale" @change="storeLangPref">
|
<help v-if="showHelp"/>
|
||||||
|
<div style="position:fixed;bottom:4pt;right:4pt;display:flex;">
|
||||||
|
<input type="button" :value="(showHelp?'X':'?')" style="min-width:28pt;border-radius:100%;cursor:pointer;" @click="getHelp"/>
|
||||||
|
<select id="lang" v-model="$i18n.locale" @change="storeLangPref">
|
||||||
<option
|
<option
|
||||||
v-for="(lang, i) in ['it.🇮🇹.Italiano', 'en.🇬🇧.English']"
|
v-for="(lang, i) in ['it.🇮🇹.Italiano', 'en.🇬🇧.English']"
|
||||||
:key="`lang-${i}`"
|
:key="`lang-${i}`"
|
||||||
@ -15,6 +18,7 @@
|
|||||||
{{lang.split('.')[1]}} {{lang.split('.')[2]}}
|
{{lang.split('.')[1]}} {{lang.split('.')[2]}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
<label for="lang" style="opacity:0" >Language</label>
|
<label for="lang" style="opacity:0" >Language</label>
|
||||||
<div v-if="showUpdateUI" style="position: fixed;bottom: 0;z-index: 1;background: rgba(0,0,0,0.5);padding: 20pt;" class="center-stuff">
|
<div v-if="showUpdateUI" style="position: fixed;bottom: 0;z-index: 1;background: rgba(0,0,0,0.5);padding: 20pt;" class="center-stuff">
|
||||||
<p class="update-dialog__content">
|
<p class="update-dialog__content">
|
||||||
@ -29,14 +33,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Help from './components/Help.vue';
|
||||||
// import Vue from 'vue'
|
// import Vue from 'vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { Help },
|
||||||
name: 'App',
|
name: 'App',
|
||||||
data: () => ({
|
data: () => ({
|
||||||
isConnected: false,
|
isConnected: false,
|
||||||
c: false,
|
c: false,
|
||||||
showUpdateUI: false,
|
showUpdateUI: false,
|
||||||
|
showHelp:false,
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
},
|
},
|
||||||
@ -57,6 +64,10 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getHelp() {
|
||||||
|
this.showHelp = !this.showHelp
|
||||||
|
// window.open(`${window.location.origin}/help`, '_blank')
|
||||||
|
},
|
||||||
storeLangPref() {
|
storeLangPref() {
|
||||||
localStorage.setItem('lang', this.$i18n.locale)
|
localStorage.setItem('lang', this.$i18n.locale)
|
||||||
},
|
},
|
||||||
@ -81,6 +92,9 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
@import '../node_modules/pretty-checkbox/dist/pretty-checkbox.css';
|
@import '../node_modules/pretty-checkbox/dist/pretty-checkbox.css';
|
||||||
|
html {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
#app {
|
#app {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
<div class="chat">
|
<div class="chat">
|
||||||
<h4 v-if="spectators > 0">{{$tc("chat.spectators", spectators)}}</h4>
|
<h4 v-if="spectators > 0">{{$tc("chat.spectators", spectators)}}</h4>
|
||||||
<h3>{{$t("chat.chat")}}</h3>
|
<h3>{{$t("chat.chat")}}</h3>
|
||||||
<div id="chatbox">
|
<transition-group name="message" tag="div" id="chatbox">
|
||||||
|
<!-- <div id="chatbox"> -->
|
||||||
<p style="margin:1pt;" class="chat-message selectable" v-for="(msg, i) in messages" v-bind:key="`${i}-c`" :style="`color:${msg.color}`">{{msg.text}}</p>
|
<p style="margin:1pt;" class="chat-message selectable" v-for="(msg, i) in messages" v-bind:key="`${i}-c`" :style="`color:${msg.color}`">{{msg.text}}</p>
|
||||||
<p class="end">.</p>
|
<p class="end">.</p>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
|
</transition-group>
|
||||||
<form @submit="sendChatMessage" id="msg-form">
|
<form @submit="sendChatMessage" id="msg-form">
|
||||||
<input v-model="text" style="flex-grow:2;"/>
|
<input v-model="text" style="flex-grow:2;"/>
|
||||||
<input type="submit" :value="$t('submit')"/>
|
<input type="submit" :value="$t('submit')"/>
|
||||||
@ -109,6 +111,13 @@ input {
|
|||||||
padding:0;
|
padding:0;
|
||||||
display:flex;
|
display:flex;
|
||||||
}
|
}
|
||||||
|
.message-enter-active, .message-leave-active {
|
||||||
|
transition: all 1s;
|
||||||
|
}
|
||||||
|
.message-enter, .message-leave-to /* .list-leave-active below version 2.1.8 */ {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(30px);
|
||||||
|
}
|
||||||
@media only screen and (min-width:1000px) {
|
@media only screen and (min-width:1000px) {
|
||||||
.chat {
|
.chat {
|
||||||
height: 90vh;
|
height: 90vh;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h1>{{$t('help.title')}}</h1>
|
<h1 id="help">{{$t('help.title')}}</h1>
|
||||||
<h2>{{$t('help.character')}}</h2>
|
<h2>{{$t('help.character')}}</h2>
|
||||||
<p>{{$t('help.characters_special')}}</p>
|
<p>{{$t('help.characters_special')}}</p>
|
||||||
<a href="#basecharacters"><p>{{$t('help.gotoallcharacters')}}</p></a>
|
<a href="#basecharacters"><p>{{$t('help.gotoallcharacters')}}</p></a>
|
||||||
@ -114,6 +114,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$socket.emit('get_cards')
|
this.$socket.emit('get_cards')
|
||||||
this.$socket.emit('get_characters')
|
this.$socket.emit('get_characters')
|
||||||
|
document.getElementById('help').scrollIntoView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user