Skip to content

Commit 07585ef

Browse files
committed
disable cache to build
1 parent 368e79e commit 07585ef

File tree

12 files changed

+109
-230
lines changed

12 files changed

+109
-230
lines changed

packages/api/src/arena.config.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { monitor } from '@colyseus/monitor'
55
* Import your Room files
66
*/
77
import { CountryRoom } from './rooms/CountryRoom'
8-
import { RedisPresence } from 'colyseus'
98
import basicAuth from 'express-basic-auth'
109
import { client } from './db/client'
1110
import { QuizRoom } from './rooms/QuizRoom'
1211
import { SpeedrunRoom } from './rooms/SpeedrunRoom'
1312
import { PartyRoom } from './rooms/PartyRoom'
13+
import { LobbyRoom } from './rooms/LobbyRoom'
1414

1515
const basicAuthMiddleware = basicAuth({
1616
// list of users and passwords
@@ -32,12 +32,15 @@ export default Arena({
3232
/**
3333
* Define your room handlers:
3434
*/
35-
gameServer.define('countries', CountryRoom)
36-
gameServer.define('capitals', CountryRoom)
37-
gameServer.define('flags', CountryRoom)
38-
gameServer.define('quizroom', QuizRoom)
39-
gameServer.define('speedrun', SpeedrunRoom)
40-
gameServer.define('party', PartyRoom)
35+
gameServer.define("lobby", LobbyRoom, {
36+
name: "lobby"
37+
});
38+
gameServer.define('countries', CountryRoom);
39+
gameServer.define('capitals', CountryRoom);
40+
gameServer.define('flags', CountryRoom);
41+
gameServer.define('quizroom', QuizRoom);
42+
gameServer.define('speedrun', SpeedrunRoom);
43+
gameServer.define('party', PartyRoom);
4144
},
4245

4346
initializeExpress: (app) => {

packages/api/src/rooms/CountryRoom.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export class CountryRoom extends Room<CountryRoomState> {
2626
autoDispose = false
2727
roundTimer = false
2828
async onCreate(options: any) {
29-
this.clock.start()
29+
this.clock.start();
30+
this.maxClients = 128;
3031

3132
this.setState(
3233
new CountryRoomState({

packages/api/src/rooms/PartyRoom.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export class PartyRoom extends Room<PartyRoomState> {
2929
autoDispose = false
3030
roundTimer = false
3131
async onCreate(options: any) {
32-
this.clock.start()
32+
this.clock.start();
33+
this.maxClients = 128;
3334

3435
this.setState(
3536
new PartyRoomState({

packages/web/components/footer.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<footer>
2+
<footer class="px-3 pt-7 pb-10 text-center text-gray-600 relative dark:text-gray-200">
33
<div
44
class="logo-stroked"
55
v-html="require('~/assets/images/logo-outlined.svg?raw')"
@@ -12,7 +12,7 @@
1212
</a>
1313
{{ $t('t.adfree') }}
1414
</small>
15-
<div class="block">
15+
<div class="block text-center">
1616
<nuxt-link class="footer-link" :to="localePath('imprint')">{{
1717
$t('t.imprint')
1818
}}</nuxt-link>
@@ -52,12 +52,8 @@ import Vue from 'vue'
5252
export default class Footer extends Vue {}
5353
</script>
5454
<style lang="postcss" scoped>
55-
footer {
56-
@apply px-3 pt-7 pb-10 bg-white text-center text-gray-600 relative dark:bg-gray-700 dark:text-gray-200;
57-
}
58-
5955
footer::after {
60-
@apply absolute top-0 left-0 right-0;
56+
@apply absolute bottom-0 left-0 right-0;
6157
content: '';
6258
background: linear-gradient(
6359
90deg,
@@ -72,14 +68,14 @@ footer::after {
7268
rgba(69, 64, 182, 1) 80%,
7369
rgba(69, 64, 182, 1) 100%
7470
);
75-
height: 4px;
71+
height: 8px;
7672
width: 100%;
7773
opacity: 1;
7874
}
7975
8076
.footer-link {
8177
border-bottom-width: 1px;
82-
@apply flex p-3 text-sm border-dashed sm:border-0 sm:text-xl sm:inline sm:p-0 hover:text-green-500;
78+
@apply p-3 text-sm border-dashed block md:inline sm:border-0 text-center sm:text-xl sm:p-0 hover:text-green-500;
8379
}
8480
8581
.block {

packages/web/components/navigation.vue

Lines changed: 26 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,165 +1,23 @@
11
<template>
2-
<div class="sticky top-0 z-20 nav-bar">
3-
<nav class="bg-white dark:bg-gray-800">
4-
<div class="main-typo flex items-center">
5-
<nuxt-link
2+
<div class="nav-bar">
3+
<div :class="`rainbow-border ${birdColor}`" />
4+
<nav class="flex flex-col md:flex-row px-5 justify-between text-center items-center pt-10">
5+
<div>
6+
<nuxt-link
67
to="/"
78
v-html="require('~/assets/images/logo.svg?raw')"
8-
:class="`logo-image relative ${birdColor}`"
9+
:class="`logo-image w-8 h-8 relative ${birdColor}`"
910
></nuxt-link>
10-
<nuxt-link :to="localePath('/')">
11-
<h1>geofind.io</h1>
12-
<p class="hidden sm:inline-block dark:text-gray-200">
13-
{{ $t('t.catchPhrase') }}
14-
</p>
11+
</div>
12+
<div class="w-full flex items-center text-center justify-center flex-col">
13+
<nuxt-link :to="localePath('/')">
14+
<h1 class="relative text-5xl flex md:flex md:text-7xl dark:text-gray-200">geofind.io</h1>
15+
1516
</nuxt-link>
16-
</div>
17-
<ul class="nav-links">
18-
<li class="hidden sm:flex" v-if="false">
19-
<nuxt-link
20-
class="green"
21-
active-class="active"
22-
:to="localePath('/tutor')"
23-
>
24-
<Icon name="school" />
25-
{{ $t('singleplayer.button') }}
26-
</nuxt-link>
27-
</li>
28-
<li class="hidden sm:flex">
29-
<nuxt-link
30-
class="blue"
31-
active-class="active"
32-
:to="localePath('/multiplayer')"
33-
>
34-
<Icon name="controller" />
35-
{{ $t('multiplayer.button') }}
36-
</nuxt-link>
37-
</li>
38-
<li class="hidden lg:flex">
39-
<nuxt-link
40-
class="red"
41-
active-class="active"
42-
:to="localePath('/matchmaking')"
43-
>
44-
<Icon name="cube" />
45-
{{ $t('matchmaking.button') }}
46-
</nuxt-link>
47-
</li>
48-
<li class="hidden sm:flex">
49-
<nuxt-link
50-
class="purple"
51-
active-class="active"
52-
:to="localePath('/lobbies')"
53-
>
54-
<Icon name="public" />
55-
{{ $t('lobbies.button') }}
56-
</nuxt-link>
57-
</li>
58-
<li class="hidden md:flex">
59-
<nuxt-link
60-
class="yellow"
61-
active-class="active"
62-
:to="localePath('/profile')"
63-
>
64-
<Icon name="profile" />
65-
{{ $t('profile.button') }}
66-
</nuxt-link>
67-
</li>
68-
</ul>
69-
<div class="flex sm:hidden flex-col justify-center items-center">
70-
<button @click="toggleMenu" class="menu">
71-
<div
72-
v-if="menu"
73-
v-html="require('~/assets/images/close.svg?raw')"
74-
></div>
75-
<div v-else v-html="require('~/assets/images/menu.svg?raw')"></div>
76-
{{ $t('t.menu') }}
77-
</button>
78-
</div>
17+
</div>
18+
<div v-if="players" class="justify-center text-center font-lucky text-2xl flex">{{ players }} {{ $t('t.players') }} online</div>
19+
7920
</nav>
80-
<div :class="`rainbow-border ${birdColor}`" />
81-
<div
82-
v-if="menu"
83-
class="menu-area relative z-20 bg-white-50 dark:bg-gray-800 pb-4"
84-
>
85-
<div class="p-4">
86-
<Button
87-
@click="menu = false"
88-
:icon="true"
89-
:to="localePath('/tutor')"
90-
v-if="false"
91-
variant="green"
92-
:animated="true"
93-
>
94-
{{ $t('singleplayer.button') }}
95-
</Button>
96-
<Button
97-
@click="menu = false"
98-
:icon="true"
99-
:to="localePath('/multiplayer')"
100-
variant="blue"
101-
:animated="true"
102-
>
103-
<template #icon>
104-
<Icon class="text-white" :height="48" name="create" />
105-
</template>
106-
{{ $t('multiplayer.button') }}
107-
</Button>
108-
109-
<Button
110-
@click="menu = false"
111-
:icon="true"
112-
:to="localePath('lobbies')"
113-
variant="purple"
114-
:animated="true"
115-
>
116-
<template #icon>
117-
<Icon class="text-white" :height="48" name="public" />
118-
</template>
119-
{{ $t('lobbies.button') }}
120-
</Button>
121-
<Button
122-
@click="menu = false"
123-
:icon="true"
124-
:to="localePath('/matchmaking')"
125-
variant="red"
126-
:animated="true"
127-
>
128-
<template #icon>
129-
<Icon class="text-white" :height="48" name="cube" />
130-
</template>
131-
{{ $t('matchmaking.button') }}
132-
</Button>
133-
<!--<Button to="teachers" variant="blue" :animated="true">
134-
<template #icon>👩‍🏫</template>
135-
Teacher Zone
136-
</Button>-->
137-
<Button
138-
@click="menu = false"
139-
:icon="true"
140-
:to="localePath('profile')"
141-
variant="yellow"
142-
:animated="true"
143-
>
144-
<template #icon>
145-
<Icon class="text-white" :height="48" name="profile" />
146-
</template>
147-
{{ $t('profile.button') }}
148-
</Button>
149-
<Button
150-
@click="menu = false"
151-
:icon="true"
152-
:to="localePath('achievements')"
153-
variant="orange"
154-
:animated="true"
155-
>
156-
<template #icon>
157-
<Icon class="text-white" :height="48" name="school" />
158-
</template>
159-
{{ $t('achievements.button') }}
160-
</Button>
161-
</div>
162-
</div>
16321
</div>
16422
</template>
16523
<script lang="ts">
@@ -170,6 +28,18 @@ import { Component, Watch } from 'vue-property-decorator'
17028
export default class Navigation extends Vue {
17129
menu = false
17230
birdColor = 'bird-yellow border-yellow'
31+
players = 0;
32+
timer = null;
33+
mounted(){
34+
this.timer = setInterval(() => {
35+
this.players = (window as any).playersOnline;
36+
}, 200)
37+
}
38+
39+
beforeDestroy(){
40+
this.timer = null;
41+
}
42+
17343
17444
@Watch('$route', { immediate: true })
17545
setBirdColor() {
@@ -215,21 +85,6 @@ export default class Navigation extends Vue {
21585
}
21686
</script>
21787
<style lang="postcss" scoped>
218-
nav {
219-
@apply py-3 flex sm:py-4 px-2 sm:px-4;
220-
@apply justify-between w-full items-center relative top-0 z-50 shadow;
221-
backdrop-filter: blur(15px);
222-
}
223-
224-
.menu {
225-
@apply flex justify-center flex-col items-center mt-2 pr-4 focus:outline-none dark:text-gray-200;
226-
font-size: 14px;
227-
}
228-
229-
.menu-area {
230-
height: calc(100vh - 80px);
231-
}
232-
23388
.rainbow-border {
23489
background: linear-gradient(
23590
90deg,
@@ -274,7 +129,6 @@ nav p {
274129
}
275130
276131
nav h1 {
277-
@apply relative text-2xl flex sm:hidden md:flex md:text-4xl dark:text-gray-200;
278132
position: relative;
279133
top: -8px;
280134
line-height: 0px;
@@ -350,8 +204,6 @@ nav img {
350204
351205
.logo-image svg {
352206
@apply mr-5;
353-
width: 64px;
354-
height: 64px;
355207
}
356208
357209
.logo-image svg .bird-stroke {

0 commit comments

Comments
 (0)