-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a407946
commit d807a35
Showing
11 changed files
with
245 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<div class="sidebar"> | ||
{{t('sideBar.round', {round:navigationState.round})}}<br/> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, PropType } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import { useStateStore } from '@/store/state' | ||
import NavigationState from '@/util/NavigationState' | ||
export default defineComponent({ | ||
name: 'SideBar', | ||
setup() { | ||
const { t } = useI18n() | ||
const state = useStateStore() | ||
return { t, state } | ||
}, | ||
props: { | ||
navigationState: { | ||
type: Object as PropType<NavigationState>, | ||
required: true | ||
} | ||
} | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.sidebar { | ||
float: right; | ||
width: 145px; | ||
margin-left: 15px; | ||
margin-bottom: 10px; | ||
margin-right: -12px; | ||
padding: 15px 10px 15px 15px; | ||
background-color: #ddd; | ||
border-top-left-radius: 15px; | ||
border-bottom-left-radius: 15px; | ||
@media (max-width: 600px) { | ||
font-size: 0.8rem; | ||
width: 120px; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<template> | ||
<SideBar :navigationState="navigationState"/> | ||
|
||
<h1> | ||
<img src="@/assets/vici.webp" class="vici" alt=""/> | ||
{{t('turnBot.title')}} | ||
</h1> | ||
|
||
<button class="btn btn-primary btn-lg mt-4 me-2" @click="next()"> | ||
{{t('action.next')}} | ||
</button> | ||
|
||
<FooterButtons :backButtonRouteTo="backButtonRouteTo" endGameButtonType="abortGame"/> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import FooterButtons from '@/components/structure/FooterButtons.vue' | ||
import { useStateStore } from '@/store/state' | ||
import { useRoute } from 'vue-router' | ||
import SideBar from '@/components/turn/SideBar.vue' | ||
import NavigationState from '@/util/NavigationState' | ||
export default defineComponent({ | ||
name: 'TurnBot', | ||
components: { | ||
FooterButtons, | ||
SideBar | ||
}, | ||
setup() { | ||
const { t } = useI18n() | ||
const route = useRoute() | ||
const state = useStateStore() | ||
const navigationState = new NavigationState(route, state) | ||
const { round, turn } = navigationState | ||
return { t, state, navigationState, round, turn } | ||
}, | ||
computed: { | ||
backButtonRouteTo() : string { | ||
if (this.turn > 1) { | ||
return `/round/${this.round}/turn/${this.turn-1}/player` | ||
} | ||
if (this.round > 1) { | ||
return `/round/${this.round-1}/end` | ||
} | ||
return '' | ||
} | ||
}, | ||
methods: { | ||
next() : void { | ||
this.$router.push(`/round/${this.round}/turn/${this.turn+1}/player`) | ||
} | ||
} | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.vici { | ||
height: 3rem; | ||
margin-top: -0.5rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<template> | ||
<SideBar :navigationState="navigationState"/> | ||
|
||
<h1> | ||
{{t('turnPlayer.title')}} | ||
</h1> | ||
|
||
<p v-html="t('turnPlayer.takeTurn')" class="mt-4 mb-4"></p> | ||
|
||
<button class="btn btn-primary btn-lg mt-4" @click="next()"> | ||
{{t('action.next')}} | ||
</button> | ||
|
||
<FooterButtons :backButtonRouteTo="backButtonRouteTo" endGameButtonType="abortGame"/> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import FooterButtons from '@/components/structure/FooterButtons.vue' | ||
import { useRoute } from 'vue-router' | ||
import { useStateStore } from '@/store/state' | ||
import SideBar from '@/components/turn/SideBar.vue' | ||
import NavigationState from '@/util/NavigationState' | ||
export default defineComponent({ | ||
name: 'TurnPlayer', | ||
components: { | ||
FooterButtons, | ||
SideBar | ||
}, | ||
setup() { | ||
const { t } = useI18n() | ||
const route = useRoute() | ||
const state = useStateStore() | ||
const navigationState = new NavigationState(route, state) | ||
const { round, turn } = navigationState | ||
return { t, state, navigationState, round, turn } | ||
}, | ||
computed: { | ||
backButtonRouteTo() : string { | ||
if (this.turn > 1) { | ||
return `/round/${this.round}/turn/${this.turn-1}/bot` | ||
} | ||
if (this.round > 1) { | ||
return `/round/${this.round-1}/end` | ||
} | ||
return '' | ||
} | ||
}, | ||
methods: { | ||
next() : void { | ||
this.$router.push(`/round/${this.round}/turn/${this.turn+1}/bot`) | ||
} | ||
} | ||
}) | ||
</script> |