wip
This commit is contained in:
@@ -9,6 +9,7 @@ let page = null;
|
||||
export default me => {
|
||||
route('/', index);
|
||||
route('/i>mentions', mentions);
|
||||
route('/channel', channels);
|
||||
route('/post::post', post);
|
||||
route('/search::query', search);
|
||||
route('/:user', user.bind(null, 'home'));
|
||||
@@ -54,6 +55,10 @@ export default me => {
|
||||
mount(el);
|
||||
}
|
||||
|
||||
function channels() {
|
||||
mount(document.createElement('mk-channels-page'));
|
||||
}
|
||||
|
||||
function notFound() {
|
||||
mount(document.createElement('mk-not-found'));
|
||||
}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
<mk-channels-page>
|
||||
<mk-ui ref="ui">
|
||||
<main>
|
||||
<h1>%i18n:desktop.tags.mk-bbs-page.title%</h1>
|
||||
<button onclick={ parent.new }>%i18n:desktop.tags.mk-bbs-page.new%</button>
|
||||
<button onclick={ parent.new }>%i18n:desktop.tags.mk-channels-page.new%</button>
|
||||
</main>
|
||||
</mk-ui>
|
||||
<style>
|
||||
@@ -14,16 +13,15 @@
|
||||
this.mixin('api');
|
||||
|
||||
this.on('mount', () => {
|
||||
document.title = '%i18n:desktop.tags.mk-bbs-page.title%';
|
||||
});
|
||||
|
||||
this.new = () => {
|
||||
const title = window.prompt('%i18n:desktop.tags.mk-bbs-page.channel-title%');
|
||||
const title = window.prompt('%i18n:desktop.tags.mk-channels-page.channel-title%');
|
||||
|
||||
this.api('bbs/channels/create', {
|
||||
title: title
|
||||
}).then(channel => {
|
||||
location.href = '/bbs/' + channel.id;
|
||||
location.href = '/channel/' + channel.id;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
@@ -335,10 +335,10 @@
|
||||
</a>
|
||||
</li>
|
||||
</virtual>
|
||||
<li class="bbs">
|
||||
<a href={ CONFIG.url + '/bbs' }>
|
||||
<i class="fa fa-coffee"></i>
|
||||
<p>%i18n:desktop.tags.mk-ui-header-nav.bbs%</p>
|
||||
<li class="channels">
|
||||
<a href={ CONFIG.url + '/channel' }>
|
||||
<i class="fa fa-television"></i>
|
||||
<p>%i18n:desktop.tags.mk-ui-header-nav.channels%</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="info">
|
||||
|
Reference in New Issue
Block a user