2021-05-19 22:21:51 +00:00
|
|
|
<template>
|
2021-07-24 22:08:52 +00:00
|
|
|
<div id="modal-root" :style="theme" />
|
|
|
|
<div class="app" @mousemove="updateMouse" :style="theme" :class="{ useHeader }">
|
2021-06-24 05:57:20 +00:00
|
|
|
<Nav v-if="useHeader" />
|
2021-05-20 05:11:03 +00:00
|
|
|
<Tabs />
|
|
|
|
<TPS v-if="showTPS" />
|
2021-06-16 04:46:34 +00:00
|
|
|
<GameOverScreen />
|
2021-06-16 05:36:13 +00:00
|
|
|
<NaNScreen />
|
2021-05-19 22:48:02 +00:00
|
|
|
</div>
|
2021-05-19 22:21:51 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-05-26 01:57:02 +00:00
|
|
|
import themes from './data/themes';
|
2021-07-24 22:08:52 +00:00
|
|
|
import player from './game/player';
|
2021-06-22 08:34:59 +00:00
|
|
|
import modInfo from './data/modInfo.json';
|
2021-07-24 22:08:52 +00:00
|
|
|
import { mapState } from './util/vue';
|
2021-06-12 04:38:16 +00:00
|
|
|
import './main.css';
|
2021-05-20 04:27:23 +00:00
|
|
|
|
2021-05-19 22:21:51 +00:00
|
|
|
export default {
|
2021-05-19 22:48:02 +00:00
|
|
|
name: 'App',
|
2021-06-22 08:34:59 +00:00
|
|
|
data() {
|
|
|
|
return { useHeader: modInfo.useHeader };
|
|
|
|
},
|
2021-05-20 04:27:23 +00:00
|
|
|
computed: {
|
|
|
|
...mapState([ 'showTPS' ]),
|
|
|
|
theme() {
|
2021-06-12 04:38:16 +00:00
|
|
|
return themes[player.theme].variables;
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2021-05-20 05:11:03 +00:00
|
|
|
updateMouse(/* event */) {
|
|
|
|
// TODO use event to update mouse position for particles
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
2021-05-19 22:48:02 +00:00
|
|
|
}
|
2021-05-20 04:27:23 +00:00
|
|
|
};
|
2021-05-19 22:21:51 +00:00
|
|
|
</script>
|
|
|
|
|
2021-06-12 04:38:16 +00:00
|
|
|
<style scoped>
|
2021-07-24 22:08:52 +00:00
|
|
|
.app {
|
2021-05-20 04:27:23 +00:00
|
|
|
background-color: var(--background);
|
|
|
|
color: var(--color);
|
2021-05-22 20:29:06 +00:00
|
|
|
display: flex;
|
|
|
|
flex-flow: column;
|
2021-07-24 22:08:52 +00:00
|
|
|
min-height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
#modal-root {
|
|
|
|
position: absolute;
|
|
|
|
min-height: 100%;
|
|
|
|
height: 100%;
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
2021-05-19 22:21:51 +00:00
|
|
|
</style>
|