This commit is contained in:
syuilo 2017-01-14 12:16:20 +09:00
parent 1a23d4247b
commit ec83e685d5
19 changed files with 38 additions and 38 deletions

View file

@ -1,5 +1,5 @@
<mk-uploader>
<ol if={ uploads.length &gt; 0 }>
<ol if={ uploads.length > 0 }>
<li each={ uploads }>
<div class="img" style="background-image: url({ img })"></div>
<p class="name"><i class="fa fa-spinner fa-pulse"></i>{ name }</p>

View file

@ -1,5 +1,5 @@
<mk-autocomplete-suggestion>
<ol class="users" ref="users" if={ users.length &gt; 0 }>
<ol class="users" ref="users" if={ users.length > 0 }>
<li each={ users } onclick={ parent.onClick } onkeydown={ parent.onKeydown } tabindex="-1"><img class="avatar" src={ avatar_url + '?thumbnail&size=32' } alt=""/><span class="name">{ name }</span><span class="username">@{ username }</span></li>
</ol>
<style type="stylus">

View file

@ -8,16 +8,16 @@
</div>
<input class="search" type="search" placeholder="&#xf002; 検索"/>
</nav>
<div class="main { uploading: uploads.length &gt; 0, loading: loading }" ref="main" onmousedown={ onmousedown } ondragover={ ondragover } ondragenter={ ondragenter } ondragleave={ ondragleave } ondrop={ ondrop } oncontextmenu={ oncontextmenu }>
<div class="main { uploading: uploads.length > 0, loading: loading }" ref="main" onmousedown={ onmousedown } ondragover={ ondragover } ondragenter={ ondragenter } ondragleave={ ondragleave } ondrop={ ondrop } oncontextmenu={ oncontextmenu }>
<div class="selection" ref="selection"></div>
<div class="contents" ref="contents">
<div class="folders" ref="foldersContainer" if={ folders.length &gt; 0 }>
<div class="folders" ref="foldersContainer" if={ folders.length > 0 }>
<virtual each={ folder in folders }>
<mk-drive-browser-folder class="folder" folder={ folder }></mk-drive-browser-folder>
</virtual>
<button if={ moreFolders }>もっと読み込む</button>
</div>
<div class="files" ref="filesContainer" if={ files.length &gt; 0 }>
<div class="files" ref="filesContainer" if={ files.length > 0 }>
<virtual each={ file in files }>
<mk-drive-browser-file class="file" file={ file }></mk-drive-browser-file>
</virtual>

View file

@ -1,6 +1,6 @@
<mk-following-setuper>
<p class="title">気になるユーザーをフォロー:</p>
<div class="users" if={ !loading && users.length &gt; 0 }>
<div class="users" if={ !loading && users.length > 0 }>
<div class="user" each={ users }><a class="avatar-anchor" href={ CONFIG.url + '/' + username }><img class="avatar" src={ avatar_url + '?thumbnail&size=42' } alt="" data-user-preview={ id }/></a>
<div class="body"><a class="name" href={ CONFIG.url + '/' + username } target="_blank" data-user-preview={ id }>{ name }</a>
<p class="username">@{ username }</p>

View file

@ -3,7 +3,7 @@
<p class="initializing" if={ initializing }><i class="fa fa-spinner fa-pulse fa-fw"></i>読み込んでいます
<mk-ellipsis></mk-ellipsis>
</p>
<div class="stream" if={ !initializing && images.length &gt; 0 }>
<div class="stream" if={ !initializing && images.length > 0 }>
<virtual each={ image in images }>
<div class="img" style={ 'background-image: url(' + image.url + '?thumbnail&size=256)' }></div>
</virtual>

View file

@ -5,13 +5,13 @@
<input ref="searchInput" type="search" oninput={ search } placeholder="ユーザーを探す"/>
</div>
<div class="result">
<ol class="users" if={ searchResult.length &gt; 0 }>
<ol class="users" if={ searchResult.length > 0 }>
<li each={ user in searchResult }><a onclick={ user._click }><img class="avatar" src={ user.avatar_url + '?thumbnail&size=32' } alt=""/><span class="name">{ user.name }</span><span class="username">@{ user.username }</span></a></li>
</ol>
</div>
</div>
<div class="main">
<div class="history" if={ history.length &gt; 0 }>
<div class="history" if={ history.length > 0 }>
<virtual each={ history }><a class="user" data-is-me={ is_me } data-is-read={ is_read } onclick={ _click }>
<div><img class="avatar" src={ (is_me ? recipient.avatar_url : user.avatar_url) + '?thumbnail&size=64' } alt=""/>
<header><span class="name">{ is_me ? recipient.name : user.name }</span><span class="username">{ '@' + (is_me ? recipient.username : user.username ) }</span>

View file

@ -26,18 +26,18 @@
</div>
<footer>
<button onclick={ reply } title="返信"><i class="fa fa-reply"></i>
<p class="count" if={ p.replies_count &gt; 0 }>{ p.replies_count }</p>
<p class="count" if={ p.replies_count > 0 }>{ p.replies_count }</p>
</button>
<button onclick={ repost } title="Repost"><i class="fa fa-retweet"></i>
<p class="count" if={ p.repost_count &gt; 0 }>{ p.repost_count }</p>
<p class="count" if={ p.repost_count > 0 }>{ p.repost_count }</p>
</button>
<button class={ liked: p.is_liked } onclick={ like } title="善哉"><i class="fa fa-thumbs-o-up"></i>
<p class="count" if={ p.likes_count &gt; 0 }>{ p.likes_count }</p>
<p class="count" if={ p.likes_count > 0 }>{ p.likes_count }</p>
</button>
<button onclick={ NotImplementedException }><i class="fa fa-ellipsis-h"></i></button>
</footer>
<div class="reposts-and-likes">
<div class="reposts" if={ reposts && reposts.length &gt; 0 }>
<div class="reposts" if={ reposts && reposts.length > 0 }>
<header><a>{ p.repost_count }</a>
<p>Repost</p>
</header>
@ -45,7 +45,7 @@
<li class="user" each={ reposts }><a class="avatar-anchor" href={ CONFIG.url + '/' + user.username } title={ user.name } data-user-preview={ user.id }><img class="avatar" src={ user.avatar_url + '?thumbnail&size=32' } alt=""/></a></li>
</ol>
</div>
<div class="likes" if={ likes && likes.length &gt; 0 }>
<div class="likes" if={ likes && likes.length > 0 }>
<header><a>{ p.likes_count }</a>
<p>いいね</p>
</header>

View file

@ -5,14 +5,14 @@
<li class="file" each={ files }>
<div class="img" style="background-image: url({ url + &quot;?thumbnail&size=64&quot; })" title={ name }></div><img class="remove" onclick={ _remove } src="/_/resources/desktop/remove.png" title="添付取り消し" alt=""/>
</li>
<li class="add" if={ files.length &lt; 4 } title="PCからファイルを添付" onclick={ selectFile }><i class="fa fa-plus"></i></li>
<li class="add" if={ files.length < 4 } title="PCからファイルを添付" onclick={ selectFile }><i class="fa fa-plus"></i></li>
</ul>
<p class="remain">残り{ 4 - files.length }</p>
</div>
<mk-uploader ref="uploader"></mk-uploader>
<button ref="upload" title="PCからファイルを添付" onclick={ selectFile }><i class="fa fa-upload"></i></button>
<button ref="drive" title="ドライブからファイルを添付" onclick={ selectFileFromDrive }><i class="fa fa-cloud"></i></button>
<p class="text-count { over: refs.text.value.length &gt; 500 }">のこり{ 500 - refs.text.value.length }文字</p>
<p class="text-count { over: refs.text.value.length > 500 }">のこり{ 500 - refs.text.value.length }文字</p>
<button class={ wait: wait } ref="submit" disabled={ wait || (refs.text.value.length == 0 && files.length == 0) } onclick={ post }>{ wait ? '投稿中' : opts.reply ? '返信' : '投稿' }
<mk-ellipsis if={ wait }></mk-ellipsis>
</button>

View file

@ -8,8 +8,8 @@
<mk-ellipsis></mk-ellipsis>
</p>
<p class="percentage" if={ !isNaN(parent.value) }>{ Math.floor((parent.value / parent.max) * 100) }</p>
<progress if={ !isNaN(parent.value) && parent.value &lt; parent.max } value={ isNaN(parent.value) ? 0 : parent.value } max={ parent.max }></progress>
<div class="progress waiting" if={ parent.value &gt;= parent.max }></div>
<progress if={ !isNaN(parent.value) && parent.value < parent.max } value={ isNaN(parent.value) ? 0 : parent.value } max={ parent.max }></progress>
<div class="progress waiting" if={ parent.value >= parent.max }></div>
</div></yield>
</mk-window>
<style type="stylus">

View file

@ -1,6 +1,6 @@
<mk-select-file-from-drive-window>
<mk-window ref="window" is-modal={ true } width={ '800px' } height={ '500px' }><yield to="header">
<mk-raw content={ parent.title }></mk-raw><span class="count" if={ parent.multiple && parent.file.length &gt; 0 }>({ parent.file.length }ファイル選択中)</span></yield>
<mk-raw content={ parent.title }></mk-raw><span class="count" if={ parent.multiple && parent.file.length > 0 }>({ parent.file.length }ファイル選択中)</span></yield>
<yield to="content">
<mk-drive-browser ref="browser" multiple={ parent.multiple }></mk-drive-browser>
<div>

View file

@ -21,13 +21,13 @@
</div>
<footer>
<button onclick={ reply } title="返信"><i class="fa fa-reply"></i>
<p class="count" if={ p.replies_count &gt; 0 }>{ p.replies_count }</p>
<p class="count" if={ p.replies_count > 0 }>{ p.replies_count }</p>
</button>
<button onclick={ repost } title="Repost"><i class="fa fa-retweet"></i>
<p class="count" if={ p.repost_count &gt; 0 }>{ p.repost_count }</p>
<p class="count" if={ p.repost_count > 0 }>{ p.repost_count }</p>
</button>
<button class={ liked: p.is_liked } onclick={ like } title="善哉"><i class="fa fa-thumbs-o-up"></i>
<p class="count" if={ p.likes_count &gt; 0 }>{ p.likes_count }</p>
<p class="count" if={ p.likes_count > 0 }>{ p.likes_count }</p>
</button>
<button onclick={ NotImplementedException }><i class="fa fa-ellipsis-h"></i></button>
<button onclick={ toggleDetail } title="詳細"><i class="fa fa-caret-down" if={ !isDetailOpened }></i><i class="fa fa-caret-up" if={ isDetailOpened }></i></button>

View file

@ -6,7 +6,7 @@
<li onclick={ drive }>
<p><i class="fa fa-cloud"></i>ドライブ<i class="fa fa-angle-right"></i></p>
</li>
<li><a href="/i&gt;mentions"><i class="fa fa-at"></i>あなた宛て<i class="fa fa-angle-right"></i></a></li>
<li><a href="/i>mentions"><i class="fa fa-at"></i>あなた宛て<i class="fa fa-angle-right"></i></a></li>
</ul>
<ul>
<li onclick={ settings }>

View file

@ -3,7 +3,7 @@
<p class="initializing" if={ initializing }><i class="fa fa-spinner fa-pulse fa-fw"></i>読み込んでいます
<mk-ellipsis></mk-ellipsis>
</p>
<div class="stream" if={ !initializing && images.length &gt; 0 }>
<div class="stream" if={ !initializing && images.length > 0 }>
<virtual each={ image in images }>
<div class="img" style={ 'background-image: url(' + image.url + '?thumbnail&size=256)' }></div>
</virtual>

View file

@ -4,7 +4,7 @@
<p if={ fetching }>読み込み中</p>
<virtual if={ !fetching }>
<p if={ apps.length == 0 }>アプリなし</p>
<ul if={ apps.length &gt; 0 }>
<ul if={ apps.length > 0 }>
<li each={ app in apps }><a href={ '/app/' + app.id }>
<p class="name">{ app.name }</p></a></li>
</ul>

View file

@ -1,7 +1,7 @@
<mk-drive-selector>
<div class="body">
<header>
<h1>ファイルを選択<span class="count" if={ files.length &gt; 0 }>({ files.length })</span></h1>
<h1>ファイルを選択<span class="count" if={ files.length > 0 }>({ files.length })</span></h1>
<button class="close" onclick={ cancel }><i class="fa fa-times"></i></button>
<button class="ok" onclick={ ok }><i class="fa fa-check"></i></button>
</header>

View file

@ -7,13 +7,13 @@
<p if={ folder != null }>{ folder.name }</p>
</nav>
<div class="browser { loading: loading }" if={ file == null }>
<div class="folders" if={ folders.length &gt; 0 }>
<div class="folders" if={ folders.length > 0 }>
<virtual each={ folder in folders }>
<mk-drive-folder folder={ folder }></mk-drive-folder>
</virtual>
<p if={ moreFolders }>もっと読み込む</p>
</div>
<div class="files" if={ files.length &gt; 0 }>
<div class="files" if={ files.length > 0 }>
<virtual each={ file in files }>
<mk-drive-file file={ file }></mk-drive-file>
</virtual>

View file

@ -26,18 +26,18 @@
<mk-time time={ p.created_at } mode="detail"></mk-time></a>
<footer>
<button onclick={ reply } title="返信"><i class="fa fa-reply"></i>
<p class="count" if={ p.replies_count &gt; 0 }>{ p.replies_count }</p>
<p class="count" if={ p.replies_count > 0 }>{ p.replies_count }</p>
</button>
<button onclick={ repost } title="Repost"><i class="fa fa-retweet"></i>
<p class="count" if={ p.repost_count &gt; 0 }>{ p.repost_count }</p>
<p class="count" if={ p.repost_count > 0 }>{ p.repost_count }</p>
</button>
<button class={ liked: p.is_liked } onclick={ like } title="善哉"><i class="fa fa-thumbs-o-up"></i>
<p class="count" if={ p.likes_count &gt; 0 }>{ p.likes_count }</p>
<p class="count" if={ p.likes_count > 0 }>{ p.likes_count }</p>
</button>
<button onclick={ NotImplementedException }><i class="fa fa-ellipsis-h"></i></button>
</footer>
<div class="reposts-and-likes">
<div class="reposts" if={ reposts && reposts.length &gt; 0 }>
<div class="reposts" if={ reposts && reposts.length > 0 }>
<header><a>{ p.repost_count }</a>
<p>Repost</p>
</header>
@ -45,7 +45,7 @@
<li class="user" each={ reposts }><a class="avatar-anchor" href={ CONFIG.url + '/' + user.username } title={ user.name }><img class="avatar" src={ user.avatar_url + '?thumbnail&size=32' } alt=""/></a></li>
</ol>
</div>
<div class="likes" if={ likes && likes.length &gt; 0 }>
<div class="likes" if={ likes && likes.length > 0 }>
<header><a>{ p.likes_count }</a>
<p>いいね</p>
</header>

View file

@ -2,7 +2,7 @@
<header>
<div>
<button class="cancel" onclick={ cancel }><i class="fa fa-times"></i></button>
<div><span class="text-count { over: refs.text.value.length &gt; 500 }">{ 500 - refs.text.value.length }</span>
<div><span class="text-count { over: refs.text.value.length > 500 }">{ 500 - refs.text.value.length }</span>
<button class="submit" onclick={ post }>投稿</button>
</div>
</div>
@ -15,7 +15,7 @@
<li class="file" each={ files }>
<div class="img" style="background-image: url({ url + &quot;?thumbnail&size=64&quot; })" title={ name }></div>
</li>
<li class="add" if={ files.length &lt; 4 } title="PCからファイルを添付" onclick={ selectFile }><i class="fa fa-plus"></i></li>
<li class="add" if={ files.length < 4 } title="PCからファイルを添付" onclick={ selectFile }><i class="fa fa-plus"></i></li>
</ul>
</div>
<mk-uploader ref="uploader"></mk-uploader>

View file

@ -23,13 +23,13 @@
</div>
<footer>
<button onclick={ reply }><i class="fa fa-reply"></i>
<p class="count" if={ p.replies_count &gt; 0 }>{ p.replies_count }</p>
<p class="count" if={ p.replies_count > 0 }>{ p.replies_count }</p>
</button>
<button onclick={ repost } title="Repost"><i class="fa fa-retweet"></i>
<p class="count" if={ p.repost_count &gt; 0 }>{ p.repost_count }</p>
<p class="count" if={ p.repost_count > 0 }>{ p.repost_count }</p>
</button>
<button class={ liked: p.is_liked } onclick={ like }><i class="fa fa-thumbs-o-up"></i>
<p class="count" if={ p.likes_count &gt; 0 }>{ p.likes_count }</p>
<p class="count" if={ p.likes_count > 0 }>{ p.likes_count }</p>
</button>
</footer>
</div>