mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 22:53:07 +02:00
enhance(frontend): dedicated games page
This commit is contained in:
parent
d92aaf81c4
commit
3d83c1aaba
4 changed files with 37 additions and 6 deletions
|
@ -523,6 +523,10 @@ const routes = [{
|
||||||
path: '/timeline/antenna/:antennaId',
|
path: '/timeline/antenna/:antennaId',
|
||||||
component: page(() => import('@/pages/antenna-timeline.vue')),
|
component: page(() => import('@/pages/antenna-timeline.vue')),
|
||||||
loginRequired: true,
|
loginRequired: true,
|
||||||
|
}, {
|
||||||
|
path: '/games',
|
||||||
|
component: page(() => import('@/pages/games.vue')),
|
||||||
|
loginRequired: true,
|
||||||
}, {
|
}, {
|
||||||
path: '/clicker',
|
path: '/clicker',
|
||||||
component: page(() => import('@/pages/clicker.vue')),
|
component: page(() => import('@/pages/clicker.vue')),
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
|
import { clearCache } from './scripts/clear-cache.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { openInstanceMenu, openToolsMenu } from '@/ui/_common_/common.js';
|
import { openInstanceMenu, openToolsMenu } from '@/ui/_common_/common.js';
|
||||||
|
@ -12,7 +13,6 @@ import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { ui } from '@/config.js';
|
import { ui } from '@/config.js';
|
||||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||||
import { clearCache } from './scripts/clear-cache.js';
|
|
||||||
|
|
||||||
export const navbarItemDef = reactive({
|
export const navbarItemDef = reactive({
|
||||||
notifications: {
|
notifications: {
|
||||||
|
@ -117,6 +117,11 @@ export const navbarItemDef = reactive({
|
||||||
show: computed(() => $i != null),
|
show: computed(() => $i != null),
|
||||||
to: '/my/achievements',
|
to: '/my/achievements',
|
||||||
},
|
},
|
||||||
|
games: {
|
||||||
|
title: 'Misskey Games',
|
||||||
|
icon: 'ti ti-device-gamepad',
|
||||||
|
to: '/games',
|
||||||
|
},
|
||||||
ui: {
|
ui: {
|
||||||
title: i18n.ts.switchUi,
|
title: i18n.ts.switchUi,
|
||||||
icon: 'ti ti-devices',
|
icon: 'ti ti-devices',
|
||||||
|
|
27
packages/frontend/src/pages/games.vue
Normal file
27
packages/frontend/src/pages/games.vue
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<MkStickyContainer>
|
||||||
|
<template #header><MkPageHeader/></template>
|
||||||
|
<MkSpacer :contentMax="800">
|
||||||
|
<div class="_panel">
|
||||||
|
<MkA to="/bubble-game">
|
||||||
|
<img src="/client-assets/drop-and-fusion/logo.png" style="display: block; max-width: 100%; max-height: 200px; margin: auto;"/>
|
||||||
|
</MkA>
|
||||||
|
</div>
|
||||||
|
</MkSpacer>
|
||||||
|
</MkStickyContainer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { i18n } from '@/i18n.js';
|
||||||
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
|
definePageMetadata({
|
||||||
|
title: 'Misskey Games',
|
||||||
|
icon: 'ti ti-device-gamepad',
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -27,11 +27,6 @@ function toolsMenuItems(): MenuItem[] {
|
||||||
to: '/clicker',
|
to: '/clicker',
|
||||||
text: '🍪👈',
|
text: '🍪👈',
|
||||||
icon: 'ti ti-cookie',
|
icon: 'ti ti-cookie',
|
||||||
}, {
|
|
||||||
type: 'link',
|
|
||||||
to: '/bubble-game',
|
|
||||||
text: i18n.ts.bubbleGame,
|
|
||||||
icon: 'ti ti-apple',
|
|
||||||
}, ($i && ($i.isAdmin || $i.policies.canManageCustomEmojis)) ? {
|
}, ($i && ($i.isAdmin || $i.policies.canManageCustomEmojis)) ? {
|
||||||
type: 'link',
|
type: 'link',
|
||||||
to: '/custom-emojis-manager',
|
to: '/custom-emojis-manager',
|
||||||
|
|
Loading…
Reference in a new issue