This commit is contained in:
syuilo 2018-03-07 18:55:02 +09:00
parent 0bca0e8a02
commit 7f0b9d933d
5 changed files with 29 additions and 2 deletions

View File

@ -43,7 +43,11 @@ export const pack = (
// Populate user // Populate user
_game.black_user = await packUser(_game.black_user_id, meId); _game.black_user = await packUser(_game.black_user_id, meId);
_game.white_user = await packUser(_game.white_user_id, meId); _game.white_user = await packUser(_game.white_user_id, meId);
_game.winner = await packUser(_game.winner_id, meId); if (_game.winner_id) {
_game.winner = await packUser(_game.winner_id, meId);
} else {
_game.winner = null;
}
resolve(_game); resolve(_game);
}); });

View File

@ -1,5 +1,8 @@
export default function(opts) { export default function(opts) {
return new Promise<string>((res, rej) => { return new Promise<string>((res, rej) => {
alert('input not implemented yet'); const x = window.prompt(opts.title);
if (x) {
res(x);
}
}); });
} }

View File

@ -4,6 +4,7 @@
// Style // Style
import './style.styl'; import './style.styl';
import '../../element.scss';
import init from '../init'; import init from '../init';
@ -28,6 +29,7 @@ import MkFollowers from './views/pages/followers.vue';
import MkFollowing from './views/pages/following.vue'; import MkFollowing from './views/pages/following.vue';
import MkSettings from './views/pages/settings.vue'; import MkSettings from './views/pages/settings.vue';
import MkProfileSetting from './views/pages/profile-setting.vue'; import MkProfileSetting from './views/pages/profile-setting.vue';
import MkOthello from './views/pages/othello.vue';
/** /**
* init * init
@ -67,6 +69,7 @@ init((launch) => {
{ path: '/i/drive/file/:file', component: MkDrive }, { path: '/i/drive/file/:file', component: MkDrive },
{ path: '/selectdrive', component: MkSelectDrive }, { path: '/selectdrive', component: MkSelectDrive },
{ path: '/search', component: MkSearch }, { path: '/search', component: MkSearch },
{ path: '/game/othello', component: MkOthello },
{ path: '/:user', component: MkUser }, { path: '/:user', component: MkUser },
{ path: '/:user/followers', component: MkFollowers }, { path: '/:user/followers', component: MkFollowers },
{ path: '/:user/following', component: MkFollowing }, { path: '/:user/following', component: MkFollowing },

View File

@ -18,6 +18,7 @@
<li><router-link to="/">%fa:home%%i18n:mobile.tags.mk-ui-nav.home%%fa:angle-right%</router-link></li> <li><router-link to="/">%fa:home%%i18n:mobile.tags.mk-ui-nav.home%%fa:angle-right%</router-link></li>
<li><router-link to="/i/notifications">%fa:R bell%%i18n:mobile.tags.mk-ui-nav.notifications%<template v-if="hasUnreadNotifications">%fa:circle%</template>%fa:angle-right%</router-link></li> <li><router-link to="/i/notifications">%fa:R bell%%i18n:mobile.tags.mk-ui-nav.notifications%<template v-if="hasUnreadNotifications">%fa:circle%</template>%fa:angle-right%</router-link></li>
<li><router-link to="/i/messaging">%fa:R comments%%i18n:mobile.tags.mk-ui-nav.messaging%<template v-if="hasUnreadMessagingMessages">%fa:circle%</template>%fa:angle-right%</router-link></li> <li><router-link to="/i/messaging">%fa:R comments%%i18n:mobile.tags.mk-ui-nav.messaging%<template v-if="hasUnreadMessagingMessages">%fa:circle%</template>%fa:angle-right%</router-link></li>
<li><router-link to="/game/othello">%fa:gamepad%ゲーム%fa:angle-right%</router-link></li>
</ul> </ul>
<ul> <ul>
<li><a :href="chUrl" target="_blank">%fa:tv%%i18n:mobile.tags.mk-ui-nav.ch%%fa:angle-right%</a></li> <li><a :href="chUrl" target="_blank">%fa:tv%%i18n:mobile.tags.mk-ui-nav.ch%%fa:angle-right%</a></li>

View File

@ -0,0 +1,16 @@
<template>
<mk-ui>
<span slot="header">%fa:gamepad%オセロ</span>
<mk-othello/>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
mounted() {
document.title = 'Misskey オセロ';
document.documentElement.style.background = '#fff';
}
});
</script>