[Client] Messagingをいろいろ
This commit is contained in:
@@ -12,6 +12,8 @@ module.exports = (me) ~>
|
||||
|
||||
route \/ index
|
||||
route \/i/notifications notifications
|
||||
route \/i/messaging messaging
|
||||
route \/i/messaging/:username messaging
|
||||
route \/i/drive drive
|
||||
route \/i/drive/folder/:folder drive
|
||||
route \/i/drive/file/:file drive
|
||||
@@ -49,6 +51,15 @@ module.exports = (me) ~>
|
||||
function notifications
|
||||
mount document.create-element \mk-notifications-page
|
||||
|
||||
# メッセージ
|
||||
function messaging ctx
|
||||
if ctx.params.username
|
||||
p = document.create-element \mk-messaging-room-page
|
||||
p.set-attribute \username ctx.params.username
|
||||
mount p
|
||||
else
|
||||
mount document.create-element \mk-messaging-page
|
||||
|
||||
# 新規投稿
|
||||
function new-post
|
||||
mount document.create-element \mk-new-post-page
|
||||
|
@@ -1,9 +1,11 @@
|
||||
<mk-drive>
|
||||
<nav>
|
||||
<p onclick={ goRoot }><i class="fa fa-cloud"></i>ドライブ</p>
|
||||
<virtual each={ folder in hierarchyFolders }><span><i class="fa fa-angle-right"></i></span>
|
||||
<virtual each={ folder in hierarchyFolders }>
|
||||
<span><i class="fa fa-angle-right"></i></span>
|
||||
<p onclick={ _move }>{ folder.name }</p>
|
||||
</virtual><span if={ folder != null }><i class="fa fa-angle-right"></i></span>
|
||||
</virtual>
|
||||
<span if={ folder != null }><i class="fa fa-angle-right"></i></span>
|
||||
<p if={ folder != null }>{ folder.name }</p>
|
||||
</nav>
|
||||
<div class="browser { loading: loading }" if={ file == null }>
|
||||
|
@@ -19,6 +19,8 @@ require('./page/settings/signin.tag');
|
||||
require('./page/settings/api.tag');
|
||||
require('./page/settings/authorized-apps.tag');
|
||||
require('./page/settings/twitter.tag');
|
||||
require('./page/messaging.tag');
|
||||
require('./page/messaging-room.tag');
|
||||
require('./home.tag');
|
||||
require('./home-timeline.tag');
|
||||
require('./timeline.tag');
|
||||
|
27
src/web/app/mobile/tags/page/messaging-room.tag
Normal file
27
src/web/app/mobile/tags/page/messaging-room.tag
Normal file
@@ -0,0 +1,27 @@
|
||||
<mk-messaging-room-page>
|
||||
<mk-ui ref="ui">
|
||||
<mk-messaging-room if={ !parent.fetching } user={ parent.user }></mk-messaging-room>
|
||||
</mk-ui>
|
||||
<style type="stylus">
|
||||
:scope
|
||||
display block
|
||||
</style>
|
||||
<script>
|
||||
@mixin \api
|
||||
@mixin \ui
|
||||
|
||||
@fetching = true
|
||||
|
||||
@on \mount ~>
|
||||
@api \users/show do
|
||||
username: @opts.username
|
||||
.then (user) ~>
|
||||
@fetching = false
|
||||
@user = user
|
||||
@update!
|
||||
|
||||
document.title = 'メッセージ: ' + user.name + ' | Misskey'
|
||||
# TODO: ユーザー名をエスケープ
|
||||
@ui.trigger \title '<i class="fa fa-comments-o"></i>' + user.name
|
||||
</script>
|
||||
</mk-messaging-room-page>
|
21
src/web/app/mobile/tags/page/messaging.tag
Normal file
21
src/web/app/mobile/tags/page/messaging.tag
Normal file
@@ -0,0 +1,21 @@
|
||||
<mk-messaging-page>
|
||||
<mk-ui ref="ui">
|
||||
<mk-messaging ref="index"></mk-messaging>
|
||||
</mk-ui>
|
||||
<style type="stylus">
|
||||
:scope
|
||||
display block
|
||||
</style>
|
||||
<script>
|
||||
@mixin \ui
|
||||
@mixin \page
|
||||
|
||||
@on \mount ~>
|
||||
document.title = 'Misskey | メッセージ'
|
||||
@ui.trigger \title '<i class="fa fa-comments-o"></i>メッセージ'
|
||||
|
||||
@refs.ui.refs.index.on \navigate-user (user) ~>
|
||||
@page '/i/messaging/' + user.username
|
||||
|
||||
</script>
|
||||
</mk-messaging-page>
|
@@ -9,7 +9,7 @@
|
||||
<ul>
|
||||
<li class="home"><a href="/"><i class="icon fa fa-home"></i>ホーム<i class="angle fa fa-angle-right"></i></a></li>
|
||||
<li class="notifications"><a href="/i/notifications"><i class="icon fa fa-bell-o"></i>通知<i class="angle fa fa-angle-right"></i></a></li>
|
||||
<li class="messaging"><a><i class="icon fa fa-comments-o"></i>メッセージ<i class="angle fa fa-angle-right"></i></a></li>
|
||||
<li class="messaging"><a href="/i/messaging"><i class="icon fa fa-comments-o"></i>メッセージ<i class="angle fa fa-angle-right"></i></a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="settings"><a onclick={ search }><i class="icon fa fa-search"></i>検索<i class="angle fa fa-angle-right"></i></a></li>
|
||||
|
Reference in New Issue
Block a user