wip
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
<mk-channel>
|
||||
<header><a href={ CONFIG.chUrl }>Misskey Channels</a></header>
|
||||
<hr>
|
||||
<main if={ !fetching }>
|
||||
<h1>{ channel.title }</h1>
|
||||
<p if={ postsFetching }>読み込み中<mk-ellipsis/></p>
|
||||
@ -21,10 +23,9 @@
|
||||
<style>
|
||||
:scope
|
||||
display block
|
||||
padding 8px
|
||||
|
||||
main
|
||||
padding 8px
|
||||
|
||||
> main
|
||||
> h1
|
||||
color #f00
|
||||
</style>
|
||||
|
@ -1,5 +1,9 @@
|
||||
<mk-index>
|
||||
<button onclick={ new }>%i18n:ch.tags.mk-index.new%</button>
|
||||
<button onclick={ n }>%i18n:ch.tags.mk-index.new%</button>
|
||||
<hr>
|
||||
<ul if={ channels }>
|
||||
<li each={ channels }><a href={ '/' + this.id }>{ this.title }</a></li>
|
||||
</ul>
|
||||
<style>
|
||||
:scope
|
||||
display block
|
||||
@ -9,9 +13,14 @@
|
||||
this.mixin('api');
|
||||
|
||||
this.on('mount', () => {
|
||||
this.api('channels').then(channels => {
|
||||
this.update({
|
||||
channels: channels
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
this.new = () => {
|
||||
this.n = () => {
|
||||
const title = window.prompt('%i18n:ch.tags.mk-index.channel-title%');
|
||||
|
||||
this.api('channels/create', {
|
||||
|
Reference in New Issue
Block a user