mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
wip
This commit is contained in:
parent
30a4e839a6
commit
5efb52b9f5
@ -241,7 +241,7 @@ desktop:
|
||||
mk-ui-header-nav:
|
||||
home: "Home"
|
||||
messaging: "Messages"
|
||||
bbs: "BBS"
|
||||
channels: "Channels"
|
||||
info: "News"
|
||||
|
||||
mk-ui-header-search:
|
||||
|
@ -241,7 +241,7 @@ desktop:
|
||||
mk-ui-header-nav:
|
||||
home: "ホーム"
|
||||
messaging: "メッセージ"
|
||||
bbs: "掲示板"
|
||||
channels: "チャンネル"
|
||||
info: "お知らせ"
|
||||
|
||||
mk-ui-header-search:
|
||||
|
@ -474,8 +474,16 @@ const endpoints: Endpoint[] = [
|
||||
name: 'messaging/messages/create',
|
||||
withCredential: true,
|
||||
kind: 'messaging-write'
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
name: 'channels/create',
|
||||
withCredential: true,
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 3,
|
||||
minInterval: ms('10seconds')
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
export default endpoints;
|
||||
|
@ -2,8 +2,8 @@
|
||||
* Module dependencies
|
||||
*/
|
||||
import $ from 'cafy';
|
||||
import Channel from '../../../models/channel';
|
||||
import serialize from '../../../serializers/channel';
|
||||
import Channel from '../../models/channel';
|
||||
import serialize from '../../serializers/channel';
|
||||
|
||||
/**
|
||||
* Create a channel
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user