WIP #332
This commit is contained in:
		
							parent
							
								
									5b280d8467
								
							
						
					
					
						commit
						8e8dfb88fb
					
				
					 16 changed files with 245 additions and 68 deletions
				
			
		|  | @ -20,13 +20,104 @@ common: | ||||||
|     congrats: "Congrats!" |     congrats: "Congrats!" | ||||||
| 
 | 
 | ||||||
|   tags: |   tags: | ||||||
|  |     mk-messaging-form: | ||||||
|  |       placeholder: "ここにメッセージを入力" | ||||||
|  |       send: "メッセージを送信" | ||||||
|  |       attach-from-local: "PCから画像を添付する" | ||||||
|  |       attach-from-drive: "アルバムから画像を添付する" | ||||||
|  | 
 | ||||||
|  |     mk-messaging: | ||||||
|  |       search-user: "ユーザーを探す" | ||||||
|  |       you: "あなた" | ||||||
|  |       no-history: "履歴はありません" | ||||||
|  | 
 | ||||||
|  |     mk-messaging-message: | ||||||
|  |       is-read: "既読" | ||||||
|  |       delete: "メッセージを削除" | ||||||
|  |       deleted: "このメッセージは削除されました" | ||||||
|  | 
 | ||||||
|  |     mk-messaging-room: | ||||||
|  |       loading: "読み込み中" | ||||||
|  |       empty: "このユーザーと話したことはありません" | ||||||
|  |       resize-form: ドラッグしてフォームの広さを調整" | ||||||
|  |       new-message: "新しいメッセージがあります" | ||||||
|  | 
 | ||||||
|  |     mk-authorized-apps: | ||||||
|  |       no-apps: "連携しているアプリケーションはありません" | ||||||
|  | 
 | ||||||
|  |     mk-error: | ||||||
|  |       title: "サーバーに接続できません" | ||||||
|  |       description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから再度お試しください。" | ||||||
|  |       thanks: "いつもMisskeyをご利用いただきありがとうございます。" | ||||||
|  | 
 | ||||||
|  |     mk-forkit: | ||||||
|  |       open-github-link: "View source on Github" | ||||||
|  | 
 | ||||||
|  |     mk-poll-editor: | ||||||
|  |       no-only-one-choice: "投票には、選択肢が最低2つ必要です" | ||||||
|  |       choice-n: "選択肢{}" | ||||||
|  |       remove: "この選択肢を削除" | ||||||
|  |       add: "+選択肢を追加" | ||||||
|  |       destroy: "投票を破棄" | ||||||
|  | 
 | ||||||
|  |     mk-poll: | ||||||
|  |       vote-to: "「{}」に投票する" | ||||||
|  |       vote-count: "{}票" | ||||||
|  |       total-users: "{}人が投票" | ||||||
|  |       vote: "投票する" | ||||||
|  |       show-result: "結果を見る" | ||||||
|  |       voted: "投票済み" | ||||||
|  | 
 | ||||||
|  |     mk-reaction-picker: | ||||||
|  |       choose-reaction: "Pick your reaction" | ||||||
|  | 
 | ||||||
|  |     mk-signin: | ||||||
|  |       username: "ユーザー名" | ||||||
|  |       password: "パスワード" | ||||||
|  |       signing-in: "やってます..." | ||||||
|  |       signin: "サインイン" | ||||||
|  | 
 | ||||||
|  |     mk-signup: | ||||||
|  |       username: "ユーザー名" | ||||||
|  |       checking: "確認しています..." | ||||||
|  |       available: "利用できます" | ||||||
|  |       unavailable: "既に利用されています" | ||||||
|  |       error: "通信エラー" | ||||||
|  |       invalid-format: "a~z、A~Z、0~9、-(ハイフン)が使えます" | ||||||
|  |       too-short: "3文字以上でお願いします!" | ||||||
|  |       too-long: "20文字以内でお願いします" | ||||||
|  |       password: "パスワード" | ||||||
|  |       password-placeholder: "8文字以上を推奨します" | ||||||
|  |       weak-password: "弱いパスワード" | ||||||
|  |       normal-password: "まあまあのパスワード" | ||||||
|  |       strong-password: "強いパスワード" | ||||||
|  |       retype: "再入力" | ||||||
|  |       retype-placeholder: "確認のため再入力してください" | ||||||
|  |       password-matched: "確認されました" | ||||||
|  |       password-not-matched: "一致していません" | ||||||
|  |       recaptcha: "認証" | ||||||
|  |       create: "アカウント作成" | ||||||
|  |       some-error: "何らかの原因によりアカウントの作成に失敗しました。再度お試しください。" | ||||||
|  | 
 | ||||||
|  |     mk-special-message: | ||||||
|  |       new-year: "Happy New Year!" | ||||||
|  |       christmas: "Merry Christmas!" | ||||||
|  | 
 | ||||||
|     mk-stream-indicator: |     mk-stream-indicator: | ||||||
|       connecting: "Connecting" |       connecting: "Connecting" | ||||||
|       reconnecting: "Reconnecting" |       reconnecting: "Reconnecting" | ||||||
|       connected: "Connected" |       connected: "Connected" | ||||||
| 
 | 
 | ||||||
|     mk-reaction-picker: |     mk-twitter-setting: | ||||||
|       choose-reaction: "Pick your reaction" |       description: "お使いのTwitterアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでTwitterアカウント情報が表示されるようになったり、Twitterを用いた便利なサインインを利用できるようになります。" | ||||||
|  |       connected-to: "次のTwitterアカウントに接続されています" | ||||||
|  |       detail: "詳細..." | ||||||
|  |       reconnect: "再接続する" | ||||||
|  |       connect: "Twitterと接続する" | ||||||
|  |       disconnect: "切断する" | ||||||
|  | 
 | ||||||
|  |     mk-uploader: | ||||||
|  |       waiting: "待機中" | ||||||
| 
 | 
 | ||||||
| desktop: | desktop: | ||||||
|   tags: |   tags: | ||||||
|  |  | ||||||
|  | @ -20,13 +20,104 @@ common: | ||||||
|     congrats: "おめでとう" |     congrats: "おめでとう" | ||||||
| 
 | 
 | ||||||
|   tags: |   tags: | ||||||
|  |     mk-messaging-form: | ||||||
|  |       placeholder: "ここにメッセージを入力" | ||||||
|  |       send: "メッセージを送信" | ||||||
|  |       attach-from-local: "PCから画像を添付する" | ||||||
|  |       attach-from-drive: "アルバムから画像を添付する" | ||||||
|  | 
 | ||||||
|  |     mk-messaging: | ||||||
|  |       search-user: "ユーザーを探す" | ||||||
|  |       you: "あなた" | ||||||
|  |       no-history: "履歴はありません" | ||||||
|  | 
 | ||||||
|  |     mk-messaging-message: | ||||||
|  |       is-read: "既読" | ||||||
|  |       delete: "メッセージを削除" | ||||||
|  |       deleted: "このメッセージは削除されました" | ||||||
|  | 
 | ||||||
|  |     mk-messaging-room: | ||||||
|  |       loading: "読み込み中" | ||||||
|  |       empty: "このユーザーと話したことはありません" | ||||||
|  |       resize-form: ドラッグしてフォームの広さを調整" | ||||||
|  |       new-message: "新しいメッセージがあります" | ||||||
|  | 
 | ||||||
|  |     mk-authorized-apps: | ||||||
|  |       no-apps: "連携しているアプリケーションはありません" | ||||||
|  | 
 | ||||||
|  |     mk-error: | ||||||
|  |       title: "サーバーに接続できません" | ||||||
|  |       description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから再度お試しください。" | ||||||
|  |       thanks: "いつもMisskeyをご利用いただきありがとうございます。" | ||||||
|  | 
 | ||||||
|  |     mk-forkit: | ||||||
|  |       open-github-link: "View source on Github" | ||||||
|  | 
 | ||||||
|  |     mk-poll-editor: | ||||||
|  |       no-only-one-choice: "投票には、選択肢が最低2つ必要です" | ||||||
|  |       choice-n: "選択肢{}" | ||||||
|  |       remove: "この選択肢を削除" | ||||||
|  |       add: "+選択肢を追加" | ||||||
|  |       destroy: "投票を破棄" | ||||||
|  | 
 | ||||||
|  |     mk-poll: | ||||||
|  |       vote-to: "「{}」に投票する" | ||||||
|  |       vote-count: "{}票" | ||||||
|  |       total-users: "{}人が投票" | ||||||
|  |       vote: "投票する" | ||||||
|  |       show-result: "結果を見る" | ||||||
|  |       voted: "投票済み" | ||||||
|  | 
 | ||||||
|  |     mk-reaction-picker: | ||||||
|  |       choose-reaction: "リアクションを選択" | ||||||
|  | 
 | ||||||
|  |     mk-signin: | ||||||
|  |       username: "ユーザー名" | ||||||
|  |       password: "パスワード" | ||||||
|  |       signing-in: "やってます..." | ||||||
|  |       signin: "サインイン" | ||||||
|  | 
 | ||||||
|  |     mk-signup: | ||||||
|  |       username: "ユーザー名" | ||||||
|  |       checking: "確認しています..." | ||||||
|  |       available: "利用できます" | ||||||
|  |       unavailable: "既に利用されています" | ||||||
|  |       error: "通信エラー" | ||||||
|  |       invalid-format: "a~z、A~Z、0~9、-(ハイフン)が使えます" | ||||||
|  |       too-short: "3文字以上でお願いします!" | ||||||
|  |       too-long: "20文字以内でお願いします" | ||||||
|  |       password: "パスワード" | ||||||
|  |       password-placeholder: "8文字以上を推奨します" | ||||||
|  |       weak-password: "弱いパスワード" | ||||||
|  |       normal-password: "まあまあのパスワード" | ||||||
|  |       strong-password: "強いパスワード" | ||||||
|  |       retype: "再入力" | ||||||
|  |       retype-placeholder: "確認のため再入力してください" | ||||||
|  |       password-matched: "確認されました" | ||||||
|  |       password-not-matched: "一致していません" | ||||||
|  |       recaptcha: "認証" | ||||||
|  |       create: "アカウント作成" | ||||||
|  |       some-error: "何らかの原因によりアカウントの作成に失敗しました。再度お試しください。" | ||||||
|  | 
 | ||||||
|  |     mk-special-message: | ||||||
|  |       new-year: "Happy New Year!" | ||||||
|  |       christmas: "Merry Christmas!" | ||||||
|  | 
 | ||||||
|     mk-stream-indicator: |     mk-stream-indicator: | ||||||
|       connecting: "接続中" |       connecting: "接続中" | ||||||
|       reconnecting: "再接続中" |       reconnecting: "再接続中" | ||||||
|       connected: "接続完了" |       connected: "接続完了" | ||||||
| 
 | 
 | ||||||
|     mk-reaction-picker: |     mk-twitter-setting: | ||||||
|       choose-reaction: "リアクションを選択" |       description: "お使いのTwitterアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでTwitterアカウント情報が表示されるようになったり、Twitterを用いた便利なサインインを利用できるようになります。" | ||||||
|  |       connected-to: "次のTwitterアカウントに接続されています" | ||||||
|  |       detail: "詳細..." | ||||||
|  |       reconnect: "再接続する" | ||||||
|  |       connect: "Twitterと接続する" | ||||||
|  |       disconnect: "切断する" | ||||||
|  | 
 | ||||||
|  |     mk-uploader: | ||||||
|  |       waiting: "待機中" | ||||||
| 
 | 
 | ||||||
| desktop: | desktop: | ||||||
|   tags: |   tags: | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| <mk-authorized-apps> | <mk-authorized-apps> | ||||||
| 	<p class="none" if={ !fetching && apps.length == 0 }>連携しているアプリケーションはありません。</p> | 	<p class="none" if={ !fetching && apps.length == 0 }>%i18n:common.tags.mk-authorized-apps.no-apps%</p> | ||||||
| 	<div class="apps" if={ apps.length != 0 }> | 	<div class="apps" if={ apps.length != 0 }> | ||||||
| 		<div each={ app in apps }> | 		<div each={ app in apps }> | ||||||
| 			<p><b>{ app.name }</b></p> | 			<p><b>{ app.name }</b></p> | ||||||
|  |  | ||||||
|  | @ -1,9 +1,9 @@ | ||||||
| <mk-error> | <mk-error> | ||||||
| 	<!--i: i.fa.fa-times-circle--> | 	<!--i: i.fa.fa-times-circle--> | ||||||
| 	<img src="/assets/error.jpg" alt=""/> | 	<img src="/assets/error.jpg" alt=""/> | ||||||
| 	<h1>サーバーに接続できません</h1> | 	<h1>%i18n:common.tags.mk-error.title%</h1> | ||||||
| 	<p class="text">インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから<a onclick={ retry }>再度お試し</a>ください。</p> | 	<p class="text">%i18n:common.tags.mk-error.description%</p> | ||||||
| 	<p class="thanks">いつもMisskeyをご利用いただきありがとうございます。</p> | 	<p class="thanks">%i18n:common.tags.mk-error.thanks%</p> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
| 			position fixed | 			position fixed | ||||||
|  | @ -52,9 +52,4 @@ | ||||||
| 				border-top solid 1px #eee | 				border-top solid 1px #eee | ||||||
| 
 | 
 | ||||||
| 	</style> | 	</style> | ||||||
| 	<script> |  | ||||||
| 		this.retry = () => { |  | ||||||
| 			location.reload() |  | ||||||
| 		} |  | ||||||
| 	</script> |  | ||||||
| </mk-error> | </mk-error> | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| <mk-forkit><a href="https://github.com/syuilo/misskey" target="_blank" title="View source on Github" aria-label="View source on Github"> | <mk-forkit><a href="https://github.com/syuilo/misskey" target="_blank" title="%i18n:common.tags.mk-forkit.open-github-link%" aria-label="%i18n:common.tags.mk-forkit.open-github-link%"> | ||||||
| 		<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="aria-hidden"> | 		<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="aria-hidden"> | ||||||
| 			<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | 			<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | ||||||
| 			<path class="octo-arm" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor"></path> | 			<path class="octo-arm" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor"></path> | ||||||
|  |  | ||||||
|  | @ -1,14 +1,14 @@ | ||||||
| <mk-messaging-form> | <mk-messaging-form> | ||||||
| 	<textarea ref="text" onkeypress={ onkeypress } onpaste={ onpaste } placeholder="ここにメッセージを入力"></textarea> | 	<textarea ref="text" onkeypress={ onkeypress } onpaste={ onpaste } placeholder="%i18n:common.tags.mk-messaging-form.placeholder%"></textarea> | ||||||
| 	<div class="files"></div> | 	<div class="files"></div> | ||||||
| 	<mk-uploader ref="uploader"></mk-uploader> | 	<mk-uploader ref="uploader"></mk-uploader> | ||||||
| 	<button class="send" onclick={ send } disabled={ sending } title="メッセージを送信"> | 	<button class="send" onclick={ send } disabled={ sending } title="%i18n:common.tags.mk-messaging-form.send%"> | ||||||
| 		<i class="fa fa-paper-plane" if={ !sending }></i><i class="fa fa-spinner fa-spin" if={ sending }></i> | 		<i class="fa fa-paper-plane" if={ !sending }></i><i class="fa fa-spinner fa-spin" if={ sending }></i> | ||||||
| 	</button> | 	</button> | ||||||
| 	<button class="attach-from-local" type="button" title="PCから画像を添付する"> | 	<button class="attach-from-local" type="button" title="%i18n:common.tags.mk-messaging-form.attach-from-local%"> | ||||||
| 		<i class="fa fa-upload"></i> | 		<i class="fa fa-upload"></i> | ||||||
| 	</button> | 	</button> | ||||||
| 	<button class="attach-from-drive" type="button" title="アルバムから画像を添付する"> | 	<button class="attach-from-drive" type="button" title="%i18n:common.tags.mk-messaging-form.atach-from-drive%"> | ||||||
| 		<i class="fa fa-folder-open"></i> | 		<i class="fa fa-folder-open"></i> | ||||||
| 	</button> | 	</button> | ||||||
| 	<input name="file" type="file" accept="image/*"/> | 	<input name="file" type="file" accept="image/*"/> | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| 	<div class="search"> | 	<div class="search"> | ||||||
| 		<div class="form"> | 		<div class="form"> | ||||||
| 			<label for="search-input"><i class="fa fa-search"></i></label> | 			<label for="search-input"><i class="fa fa-search"></i></label> | ||||||
| 			<input ref="search" type="search" oninput={ search } onkeydown={ onSearchKeydown } placeholder="ユーザーを探す"/> | 			<input ref="search" type="search" oninput={ search } onkeydown={ onSearchKeydown } placeholder="%i18n:common.tags.mk-messaging.search-user%"/> | ||||||
| 		</div> | 		</div> | ||||||
| 		<div class="result"> | 		<div class="result"> | ||||||
| 			<ol class="users" if={ searchResult.length > 0 } ref="searchResult"> | 			<ol class="users" if={ searchResult.length > 0 } ref="searchResult"> | ||||||
|  | @ -25,13 +25,13 @@ | ||||||
| 						<mk-time time={ created_at }></mk-time> | 						<mk-time time={ created_at }></mk-time> | ||||||
| 					</header> | 					</header> | ||||||
| 					<div class="body"> | 					<div class="body"> | ||||||
| 						<p class="text"><span class="me" if={ is_me }>あなた:</span>{ text }</p> | 						<p class="text"><span class="me" if={ is_me }>%i18n:common.tags.mk-messaging.you%:</span>{ text }</p> | ||||||
| 					</div> | 					</div> | ||||||
| 				</div> | 				</div> | ||||||
| 			</a> | 			</a> | ||||||
| 		</virtual> | 		</virtual> | ||||||
| 	</div> | 	</div> | ||||||
| 	<p class="no-history" if={ history.length == 0 }>履歴はありません。<br/>ユーザーを検索して、いつでもメッセージを送受信できます。</p> | 	<p class="no-history" if={ history.length == 0 }>%i18n:common.tags.mk-messaging.no-history%</p> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
| 			display block | 			display block | ||||||
|  |  | ||||||
|  | @ -1,14 +1,14 @@ | ||||||
| <mk-messaging-message data-is-me={ message.is_me }><a class="avatar-anchor" href={ CONFIG.url + '/' + message.user.username } title={ message.user.username } target="_blank"><img class="avatar" src={ message.user.avatar_url + '?thumbnail&size=64' } alt=""/></a> | <mk-messaging-message data-is-me={ message.is_me }><a class="avatar-anchor" href={ CONFIG.url + '/' + message.user.username } title={ message.user.username } target="_blank"><img class="avatar" src={ message.user.avatar_url + '?thumbnail&size=64' } alt=""/></a> | ||||||
| 	<div class="content-container"> | 	<div class="content-container"> | ||||||
| 		<div class="balloon"> | 		<div class="balloon"> | ||||||
| 			<p class="read" if={ message.is_me && message.is_read }>既読</p> | 			<p class="read" if={ message.is_me && message.is_read }>%i18n:common.tags.mk-messaging-message.is-read%</p> | ||||||
| 			<button class="delete-button" if={ message.is_me } title="メッセージを削除"><img src="/assets/desktop/messaging/delete.png" alt="Delete"/></button> | 			<button class="delete-button" if={ message.is_me } title="%i18n:common.tags.mk-messaging-message.delete%"><img src="/assets/desktop/messaging/delete.png" alt="Delete"/></button> | ||||||
| 			<div class="content" if={ !message.is_deleted }> | 			<div class="content" if={ !message.is_deleted }> | ||||||
| 				<div ref="text"></div> | 				<div ref="text"></div> | ||||||
| 				<div class="image" if={ message.file }><img src={ message.file.url } alt="image" title={ message.file.name }/></div> | 				<div class="image" if={ message.file }><img src={ message.file.url } alt="image" title={ message.file.name }/></div> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="content" if={ message.is_deleted }> | 			<div class="content" if={ message.is_deleted }> | ||||||
| 				<p class="is-deleted">このメッセージは削除されました</p> | 				<p class="is-deleted">%i18n:common.tags.mk-messaging-message.deleted%</p> | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
| 		<footer> | 		<footer> | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| <mk-messaging-room> | <mk-messaging-room> | ||||||
| 	<div class="stream"> | 	<div class="stream"> | ||||||
| 		<p class="init" if={ init }><i class="fa fa-spinner fa-spin"></i>読み込み中</p> | 		<p class="init" if={ init }><i class="fa fa-spinner fa-spin"></i>%i18n:common.tags.mk-messaging-room.loading%</p> | ||||||
| 		<p class="empty" if={ !init && messages.length == 0 }><i class="fa fa-info-circle"></i>このユーザーと話したことはありません</p> | 		<p class="empty" if={ !init && messages.length == 0 }><i class="fa fa-info-circle"></i>%i18n:common.tags.mk-messaging-room.empty%</p> | ||||||
| 		<virtual each={ message, i in messages }> | 		<virtual each={ message, i in messages }> | ||||||
| 			<mk-messaging-message message={ message }></mk-messaging-message> | 			<mk-messaging-message message={ message }></mk-messaging-message> | ||||||
| 			<p class="date" if={ i != messages.length - 1 && message._date != messages[i + 1]._date }><span>{ messages[i + 1]._datetext }</span></p> | 			<p class="date" if={ i != messages.length - 1 && message._date != messages[i + 1]._date }><span>{ messages[i + 1]._datetext }</span></p> | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
| 	</div> | 	</div> | ||||||
| 	<footer> | 	<footer> | ||||||
| 		<div ref="notifications"></div> | 		<div ref="notifications"></div> | ||||||
| 		<div class="grippie" title="ドラッグしてフォームの広さを調整"></div> | 		<div class="grippie" title="%i18n:common.tags.mk-messaging-room.resize-form%"></div> | ||||||
| 		<mk-messaging-form user={ user }></mk-messaging-form> | 		<mk-messaging-form user={ user }></mk-messaging-form> | ||||||
| 	</footer> | 	</footer> | ||||||
| 	<style> | 	<style> | ||||||
|  | @ -186,7 +186,7 @@ | ||||||
| 				this.scrollToBottom(); | 				this.scrollToBottom(); | ||||||
| 			} else if (message.user_id != this.I.id) { | 			} else if (message.user_id != this.I.id) { | ||||||
| 				// Notify | 				// Notify | ||||||
| 				this.notify('新しいメッセージがあります'); | 				this.notify('%i18n:common.tags.mk-messaging-room.new-message%'); | ||||||
| 			} | 			} | ||||||
| 		}; | 		}; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,17 +1,17 @@ | ||||||
| <mk-poll-editor> | <mk-poll-editor> | ||||||
| 	<p class="caution" if={ choices.length < 2 }> | 	<p class="caution" if={ choices.length < 2 }> | ||||||
| 		<i class="fa fa-exclamation-triangle"></i>投票には、選択肢が最低2つ必要です | 		<i class="fa fa-exclamation-triangle"></i>%i18n:common.tags.mk-poll-editor.no-only-one-choice% | ||||||
| 	</p> | 	</p> | ||||||
| 	<ul ref="choices"> | 	<ul ref="choices"> | ||||||
| 		<li each={ choice, i in choices }> | 		<li each={ choice, i in choices }> | ||||||
| 			<input value={ choice } oninput={ oninput.bind(null, i) } placeholder={ '選択肢' + (i + 1) }> | 			<input value={ choice } oninput={ oninput.bind(null, i) } placeholder={ '%i18n:common.tags.mk-poll-editor.choice-n%'.replace('{}', i + 1) }> | ||||||
| 			<button onclick={ remove.bind(null, i) } title="この選択肢を削除"> | 			<button onclick={ remove.bind(null, i) } title="%i18n:common.tags.mk-poll-editor.remove%"> | ||||||
| 				<i class="fa fa-times"></i> | 				<i class="fa fa-times"></i> | ||||||
| 			</button> | 			</button> | ||||||
| 		</li> | 		</li> | ||||||
| 	</ul> | 	</ul> | ||||||
| 	<button class="add" if={ choices.length < 10 } onclick={ add }>+選択肢を追加</button> | 	<button class="add" if={ choices.length < 10 } onclick={ add }>%i18n:common.tags.mk-poll-editor.add%/button> | ||||||
| 	<button class="destroy" onclick={ destroy } title="投票を破棄"> | 	<button class="destroy" onclick={ destroy } title="%i18n:common.tags.mk-poll-editor.destroy%"> | ||||||
| 		<i class="fa fa-times"></i> | 		<i class="fa fa-times"></i> | ||||||
| 	</button> | 	</button> | ||||||
| 	<style> | 	<style> | ||||||
|  |  | ||||||
|  | @ -1,19 +1,19 @@ | ||||||
| <mk-poll data-is-voted={ isVoted }> | <mk-poll data-is-voted={ isVoted }> | ||||||
| 	<ul> | 	<ul> | ||||||
| 		<li each={ poll.choices } onclick={ vote.bind(null, id) } class={ voted: voted } title={ !parent.isVoted ? '「' + text + '」に投票する' : '' }> | 		<li each={ poll.choices } onclick={ vote.bind(null, id) } class={ voted: voted } title={ !parent.isVoted ? '%i18n:common.tags.mk-poll.%'.replace('{}', '%i18n:common.tags.mk-poll.vote-to%') : '' }> | ||||||
| 			<div class="backdrop" style={ 'width:' + (parent.result ? (votes / parent.total * 100) : 0) + '%' }></div> | 			<div class="backdrop" style={ 'width:' + (parent.result ? (votes / parent.total * 100) : 0) + '%' }></div> | ||||||
| 			<span> | 			<span> | ||||||
| 				<i class="fa fa-check" if={ is_voted }></i> | 				<i class="fa fa-check" if={ is_voted }></i> | ||||||
| 				{ text } | 				{ text } | ||||||
| 				<span class="votes" if={ parent.result }>({ votes }票)</span> | 				<span class="votes" if={ parent.result }>({ '%i18n:common.tags.mk-poll.vote-count%'.replace('{}', votes) })</span> | ||||||
| 			</span> | 			</span> | ||||||
| 		</li> | 		</li> | ||||||
| 	</ul> | 	</ul> | ||||||
| 	<p if={ total > 0 }> | 	<p if={ total > 0 }> | ||||||
| 		<span>{ total }人が投票</span> | 		<span>{ '%i18n:common.tags.mk-poll.total-users%'.replace('{}', total) }</span> | ||||||
| 		・ | 		・ | ||||||
| 		<a if={ !isVoted } onclick={ toggleResult }>{ result ? '投票する' : '結果を見る' }</a> | 		<a if={ !isVoted } onclick={ toggleResult }>{ result ? '%i18n:common.tags.mk-poll.vote%' : '%i18n:common.tags.mk-poll.show-result%' }</a> | ||||||
| 		<span if={ isVoted }>投票済み</span> | 		<span if={ isVoted }>%i18n:common.tags.mk-poll.voted%</span> | ||||||
| 	</p> | 	</p> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
|  |  | ||||||
|  | @ -1,12 +1,12 @@ | ||||||
| <mk-signin> | <mk-signin> | ||||||
| 	<form class={ signing: signing } onsubmit={ onsubmit }> | 	<form class={ signing: signing } onsubmit={ onsubmit }> | ||||||
| 		<label class="user-name"> | 		<label class="user-name"> | ||||||
| 			<input ref="username" type="text" pattern="^[a-zA-Z0-9-]+$" placeholder="ユーザー名" autofocus="autofocus" required="required" oninput={ oninput }/><i class="fa fa-at"></i> | 			<input ref="username" type="text" pattern="^[a-zA-Z0-9-]+$" placeholder="%i18n:common.tags.mk-signin.username%" autofocus="autofocus" required="required" oninput={ oninput }/><i class="fa fa-at"></i> | ||||||
| 		</label> | 		</label> | ||||||
| 		<label class="password"> | 		<label class="password"> | ||||||
| 			<input ref="password" type="password" placeholder="パスワード" required="required"/><i class="fa fa-lock"></i> | 			<input ref="password" type="password" placeholder="%i18n:common.tags.mk-signin.password%" required="required"/><i class="fa fa-lock"></i> | ||||||
| 		</label> | 		</label> | ||||||
| 		<button type="submit" disabled={ signing }>{ signing ? 'やっています...' : 'サインイン' }</button> | 		<button type="submit" disabled={ signing }>{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }</button> | ||||||
| 	</form> | 	</form> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
|  |  | ||||||
|  | @ -1,42 +1,42 @@ | ||||||
| <mk-signup> | <mk-signup> | ||||||
| 	<form onsubmit={ onsubmit } autocomplete="off"> | 	<form onsubmit={ onsubmit } autocomplete="off"> | ||||||
| 		<label class="username"> | 		<label class="username"> | ||||||
| 			<p class="caption"><i class="fa fa-at"></i>ユーザー名</p> | 			<p class="caption"><i class="fa fa-at"></i>%i18n:common.tags.mk-signup.username%</p> | ||||||
| 			<input ref="username" type="text" pattern="^[a-zA-Z0-9-]{3,20}$" placeholder="a~z、A~Z、0~9、-" autocomplete="off" required="required" onkeyup={ onChangeUsername }/> | 			<input ref="username" type="text" pattern="^[a-zA-Z0-9-]{3,20}$" placeholder="a~z、A~Z、0~9、-" autocomplete="off" required="required" onkeyup={ onChangeUsername }/> | ||||||
| 			<p class="profile-page-url-preview" if={ refs.username.value != '' && username-state != 'invalidFormat' && username-state != 'minRange' && username-state != 'maxRange' }>{ CONFIG.url + '/' + refs.username.value }</p> | 			<p class="profile-page-url-preview" if={ refs.username.value != '' && username-state != 'invalidFormat' && username-state != 'minRange' && username-state != 'maxRange' }>{ CONFIG.url + '/' + refs.username.value }</p> | ||||||
| 			<p class="info" if={ usernameState == 'wait' } style="color:#999"><i class="fa fa-fw fa-spinner fa-pulse"></i>確認しています...</p> | 			<p class="info" if={ usernameState == 'wait' } style="color:#999"><i class="fa fa-fw fa-spinner fa-pulse"></i>%i18n:common.tags.mk-signup.checking%</p> | ||||||
| 			<p class="info" if={ usernameState == 'ok' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>利用できます</p> | 			<p class="info" if={ usernameState == 'ok' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>%i18n:common.tags.mk-signup.available%</p> | ||||||
| 			<p class="info" if={ usernameState == 'unavailable' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>既に利用されています</p> | 			<p class="info" if={ usernameState == 'unavailable' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>%i18n:common.tags.mk-signup.unavailable%</p> | ||||||
| 			<p class="info" if={ usernameState == 'error' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>通信エラー</p> | 			<p class="info" if={ usernameState == 'error' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>%i18n:common.tags.mk-signup.error%</p> | ||||||
| 			<p class="info" if={ usernameState == 'invalid-format' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>a~z、A~Z、0~9、-(ハイフン)が使えます</p> | 			<p class="info" if={ usernameState == 'invalid-format' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>%i18n:common.tags.mk-signup.invalid-format%</p> | ||||||
| 			<p class="info" if={ usernameState == 'min-range' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>3文字以上でお願いします!</p> | 			<p class="info" if={ usernameState == 'min-range' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>3%i18n:common.tags.mk-signup.too-short%</p> | ||||||
| 			<p class="info" if={ usernameState == 'max-range' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>20文字以内でお願いします</p> | 			<p class="info" if={ usernameState == 'max-range' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>%i18n:common.tags.mk-signup.too-long%</p> | ||||||
| 		</label> | 		</label> | ||||||
| 		<label class="password"> | 		<label class="password"> | ||||||
| 			<p class="caption"><i class="fa fa-lock"></i>パスワード</p> | 			<p class="caption"><i class="fa fa-lock"></i>%i18n:common.tags.mk-signup.password%</p> | ||||||
| 			<input ref="password" type="password" placeholder="8文字以上を推奨します" autocomplete="off" required="required" onkeyup={ onChangePassword }/> | 			<input ref="password" type="password" placeholder="%i18n:common.tags.mk-signup.password-placeholder%" autocomplete="off" required="required" onkeyup={ onChangePassword }/> | ||||||
| 			<div class="meter" if={ passwordStrength != '' } data-strength={ passwordStrength }> | 			<div class="meter" if={ passwordStrength != '' } data-strength={ passwordStrength }> | ||||||
| 				<div class="value" ref="passwordMetar"></div> | 				<div class="value" ref="passwordMetar"></div> | ||||||
| 			</div> | 			</div> | ||||||
| 			<p class="info" if={ passwordStrength == 'low' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>弱いパスワード</p> | 			<p class="info" if={ passwordStrength == 'low' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>%i18n:common.tags.mk-signup.weak-password%</p> | ||||||
| 			<p class="info" if={ passwordStrength == 'medium' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>まあまあのパスワード</p> | 			<p class="info" if={ passwordStrength == 'medium' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>%i18n:common.tags.mk-signup.normal-password%</p> | ||||||
| 			<p class="info" if={ passwordStrength == 'high' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>強いパスワード</p> | 			<p class="info" if={ passwordStrength == 'high' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>%i18n:common.tags.mk-signup.strong-password%</p> | ||||||
| 		</label> | 		</label> | ||||||
| 		<label class="retype-password"> | 		<label class="retype-password"> | ||||||
| 			<p class="caption"><i class="fa fa-lock"></i>パスワード(再入力)</p> | 			<p class="caption"><i class="fa fa-lock"></i>%i18n:common.tags.mk-signup.password%(%i18n:common.tags.mk-signup.retype%)</p> | ||||||
| 			<input ref="passwordRetype" type="password" placeholder="確認のため再入力してください" autocomplete="off" required="required" onkeyup={ onChangePasswordRetype }/> | 			<input ref="passwordRetype" type="password" placeholder="%i18n:common.tags.mk-signup.retype-placeholder%" autocomplete="off" required="required" onkeyup={ onChangePasswordRetype }/> | ||||||
| 			<p class="info" if={ passwordRetypeState == 'match' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>確認されました</p> | 			<p class="info" if={ passwordRetypeState == 'match' } style="color:#3CB7B5"><i class="fa fa-fw fa-check"></i>%i18n:common.tags.mk-signup.password-matched%</p> | ||||||
| 			<p class="info" if={ passwordRetypeState == 'not-match' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>一致していません</p> | 			<p class="info" if={ passwordRetypeState == 'not-match' } style="color:#FF1161"><i class="fa fa-fw fa-exclamation-triangle"></i>%i18n:common.tags.mk-signup.password-not-matched%</p> | ||||||
| 		</label> | 		</label> | ||||||
| 		<label class="recaptcha"> | 		<label class="recaptcha"> | ||||||
| 			<p class="caption"><i class="fa fa-toggle-on" if={ recaptchaed }></i><i class="fa fa-toggle-off" if={ !recaptchaed }></i>認証</p> | 			<p class="caption"><i class="fa fa-toggle-on" if={ recaptchaed }></i><i class="fa fa-toggle-off" if={ !recaptchaed }></i>%i18n:common.tags.mk-signup.recaptcha%</p> | ||||||
| 			<div if={ recaptcha } class="g-recaptcha" data-callback="onRecaptchaed" data-expired-callback="onRecaptchaExpired" data-sitekey={ recaptcha.siteKey }></div> | 			<div if={ recaptcha } class="g-recaptcha" data-callback="onRecaptchaed" data-expired-callback="onRecaptchaExpired" data-sitekey={ recaptcha.siteKey }></div> | ||||||
| 		</label> | 		</label> | ||||||
| 		<label class="agree-tou"> | 		<label class="agree-tou"> | ||||||
| 			<input name="agree-tou" type="checkbox" autocomplete="off" required="required"/> | 			<input name="agree-tou" type="checkbox" autocomplete="off" required="required"/> | ||||||
| 			<p><a href={ CONFIG.aboutUrl + '/tou' } target="_blank">利用規約</a>に同意する</p> | 			<p><a href={ CONFIG.aboutUrl + '/tou' } target="_blank">利用規約</a>に同意する</p> | ||||||
| 		</label> | 		</label> | ||||||
| 		<button onclick={ onsubmit }>アカウント作成</button> | 		<button onclick={ onsubmit }>%i18n:common.tags.mk-signup.create%</button> | ||||||
| 	</form> | 	</form> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
|  | @ -295,7 +295,7 @@ | ||||||
| 					location.href = '/'; | 					location.href = '/'; | ||||||
| 				}); | 				}); | ||||||
| 			}).catch(() => { | 			}).catch(() => { | ||||||
| 				alert('何らかの原因によりアカウントの作成に失敗しました。再度お試しください。'); | 				alert('%i18n:common.tags.mk-signup.some-error%'); | ||||||
| 
 | 
 | ||||||
| 				grecaptcha.reset(); | 				grecaptcha.reset(); | ||||||
| 				this.recaptchaed = false; | 				this.recaptchaed = false; | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| <mk-special-message> | <mk-special-message> | ||||||
| 	<p if={ m == 1 && d == 1 }>Happy New Year! </p> | 	<p if={ m == 1 && d == 1 }>%i18n:common.tags.mk-special-message.new-year%</p> | ||||||
| 	<p if={ m == 12 && d == 25 }>Merry Christmas!</p> | 	<p if={ m == 12 && d == 25 }>%i18n:common.tags.mk-special-message.christmas%</p> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
| 			display block | 			display block | ||||||
|  |  | ||||||
|  | @ -1,10 +1,10 @@ | ||||||
| <mk-twitter-setting> | <mk-twitter-setting> | ||||||
| 	<p>お使いのTwitterアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでTwitterアカウント情報が表示されるようになったり、Twitterを用いた便利なサインインを利用できるようになります。<a href={ CONFIG.aboutUrl + '/link-to-twitter' } target="_blank">詳細...</a></p> | 	<p>%i18n:common.tags.mk-twitter-setting.description%<a href={ CONFIG.aboutUrl + '/link-to-twitter' } target="_blank">%i18n:common.tags.mk-twitter-setting.detail%</a></p> | ||||||
| 	<p class="account" if={ I.twitter } title={ 'Twitter ID: ' + I.twitter.user_id }>次のTwitterアカウントに接続されています: <a href={ 'https://twitter.com/' + I.twitter.screen_name } target="_blank">@{ I.twitter.screen_name }</a></p> | 	<p class="account" if={ I.twitter } title={ 'Twitter ID: ' + I.twitter.user_id }>%i18n:common.tags.mk-twitter-setting.connected-to%: <a href={ 'https://twitter.com/' + I.twitter.screen_name } target="_blank">@{ I.twitter.screen_name }</a></p> | ||||||
| 	<p> | 	<p> | ||||||
| 		<a href={ CONFIG.apiUrl + '/connect/twitter' } target="_blank">{ I.twitter ? '再接続する' : 'Twitterと接続する' }</a> | 		<a href={ CONFIG.apiUrl + '/connect/twitter' } target="_blank">{ I.twitter ? '%i18n:common.tags.mk-twitter-setting.reconnect%' : '%i18n:common.tags.mk-twitter-setting.connect%' }</a> | ||||||
| 		<span if={ I.twitter }> or </span> | 		<span if={ I.twitter }> or </span> | ||||||
| 		<a href={ CONFIG.apiUrl + '/disconnect/twitter' } target="_blank" if={ I.twitter }>切断する</a> | 		<a href={ CONFIG.apiUrl + '/disconnect/twitter' } target="_blank" if={ I.twitter }>%i18n:common.tags.mk-twitter-setting.disconnect%</a> | ||||||
| 	</p> | 	</p> | ||||||
| 	<p class="id" if={ I.twitter }>Twitter ID: { I.twitter.user_id }</p> | 	<p class="id" if={ I.twitter }>Twitter ID: { I.twitter.user_id }</p> | ||||||
| 	<style> | 	<style> | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
| 		<li each={ uploads }> | 		<li each={ uploads }> | ||||||
| 			<div class="img" style="background-image: url({ img })"></div> | 			<div class="img" style="background-image: url({ img })"></div> | ||||||
| 			<p class="name"><i class="fa fa-spinner fa-pulse"></i>{ name }</p> | 			<p class="name"><i class="fa fa-spinner fa-pulse"></i>{ name }</p> | ||||||
| 			<p class="status"><span class="initing" if={ progress == undefined }>待機中 | 			<p class="status"><span class="initing" if={ progress == undefined }>%i18n:common.tags.mk-uploader.waiting% | ||||||
| 					<mk-ellipsis></mk-ellipsis></span><span class="kb" if={ progress != undefined }>{ String(Math.floor(progress.value / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }<i>KB</i> / { String(Math.floor(progress.max / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }<i>KB</i></span><span class="percentage" if={ progress != undefined }>{ Math.floor((progress.value / progress.max) * 100) }</span></p> | 					<mk-ellipsis></mk-ellipsis></span><span class="kb" if={ progress != undefined }>{ String(Math.floor(progress.value / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }<i>KB</i> / { String(Math.floor(progress.max / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }<i>KB</i></span><span class="percentage" if={ progress != undefined }>{ Math.floor((progress.value / progress.max) * 100) }</span></p> | ||||||
| 			<progress if={ progress != undefined && progress.value != progress.max } value={ progress.value } max={ progress.max }></progress> | 			<progress if={ progress != undefined && progress.value != progress.max } value={ progress.value } max={ progress.max }></progress> | ||||||
| 			<div class="progress initing" if={ progress == undefined }></div> | 			<div class="progress initing" if={ progress == undefined }></div> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue