✌️
This commit is contained in:
		
							parent
							
								
									1d828c9784
								
							
						
					
					
						commit
						e7fbf873ef
					
				
					 12 changed files with 80 additions and 28 deletions
				
			
		|  | @ -170,6 +170,13 @@ ch: | ||||||
|       new: "Create new channel" |       new: "Create new channel" | ||||||
|       channel-title: "Channel title" |       channel-title: "Channel title" | ||||||
| 
 | 
 | ||||||
|  |     mk-channel-form: | ||||||
|  |       textarea: "Write here" | ||||||
|  |       upload: "Upload" | ||||||
|  |       drive: "Drive" | ||||||
|  |       post: "Do" | ||||||
|  |       posting: "Doing" | ||||||
|  | 
 | ||||||
| desktop: | desktop: | ||||||
|   tags: |   tags: | ||||||
|     mk-api-info: |     mk-api-info: | ||||||
|  |  | ||||||
|  | @ -170,6 +170,13 @@ ch: | ||||||
|       new: "チャンネルを作成" |       new: "チャンネルを作成" | ||||||
|       channel-title: "チャンネルのタイトル" |       channel-title: "チャンネルのタイトル" | ||||||
| 
 | 
 | ||||||
|  |     mk-channel-form: | ||||||
|  |       textarea: "書いて" | ||||||
|  |       upload: "アップロード" | ||||||
|  |       drive: "ドライブ" | ||||||
|  |       post: "やる" | ||||||
|  |       posting: "やってます" | ||||||
|  | 
 | ||||||
| desktop: | desktop: | ||||||
|   tags: |   tags: | ||||||
|     mk-api-info: |     mk-api-info: | ||||||
|  |  | ||||||
|  | @ -5,8 +5,6 @@ json('../../const.json') | ||||||
| $theme-color = themeColor | $theme-color = themeColor | ||||||
| $theme-color-foreground = themeColorForeground | $theme-color-foreground = themeColorForeground | ||||||
| 
 | 
 | ||||||
| @import './reset' |  | ||||||
| 
 |  | ||||||
| /* | /* | ||||||
| 	::selection | 	::selection | ||||||
| 		background $theme-color | 		background $theme-color | ||||||
|  | @ -14,6 +12,9 @@ $theme-color-foreground = themeColorForeground | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| * | * | ||||||
|  | 	position relative | ||||||
|  | 	box-sizing border-box | ||||||
|  | 	background-clip padding-box !important | ||||||
| 	tap-highlight-color rgba($theme-color, 0.7) | 	tap-highlight-color rgba($theme-color, 0.7) | ||||||
| 	-webkit-tap-highlight-color rgba($theme-color, 0.7) | 	-webkit-tap-highlight-color rgba($theme-color, 0.7) | ||||||
| 
 | 
 | ||||||
|  | @ -29,6 +30,9 @@ html | ||||||
| 		&, * | 		&, * | ||||||
| 			cursor progress !important | 			cursor progress !important | ||||||
| 
 | 
 | ||||||
|  | body | ||||||
|  | 	overflow-wrap break-word | ||||||
|  | 
 | ||||||
| #error | #error | ||||||
| 	padding 32px | 	padding 32px | ||||||
| 	color #fff | 	color #fff | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
|  | @import "../reset" | ||||||
| 
 | 
 | ||||||
| html | html | ||||||
| 	background #eee | 	background #eee | ||||||
|  |  | ||||||
|  | @ -1,5 +1,10 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
| 
 | 
 | ||||||
| html | html | ||||||
| 	padding 8px | 	padding 8px | ||||||
| 	background #efefef | 	background #efefef | ||||||
|  | 
 | ||||||
|  | #wait | ||||||
|  | 	top auto | ||||||
|  | 	bottom 15px | ||||||
|  | 	left 15px | ||||||
|  |  | ||||||
|  | @ -49,6 +49,9 @@ | ||||||
| 				> .body | 				> .body | ||||||
| 					margin 8px 0 0 0 | 					margin 8px 0 0 0 | ||||||
| 
 | 
 | ||||||
|  | 				> mk-channel-form | ||||||
|  | 					max-width 500px | ||||||
|  | 
 | ||||||
| 	</style> | 	</style> | ||||||
| 	<script> | 	<script> | ||||||
| 		import Progress from '../../common/scripts/loading'; | 		import Progress from '../../common/scripts/loading'; | ||||||
|  | @ -240,20 +243,45 @@ | ||||||
| 
 | 
 | ||||||
| <mk-channel-form> | <mk-channel-form> | ||||||
| 	<p if={ reply }><b>>>{ reply.index }</b> ({ reply.user.name }): <a onclick={ clearReply }>[x]</a></p> | 	<p if={ reply }><b>>>{ reply.index }</b> ({ reply.user.name }): <a onclick={ clearReply }>[x]</a></p> | ||||||
| 	<textarea ref="text" disabled={ wait } oninput={ update } onkeydown={ onkeydown } onpaste={ onpaste }></textarea> | 	<textarea ref="text" disabled={ wait } oninput={ update } onkeydown={ onkeydown } onpaste={ onpaste } placeholder="%i18n:ch.tags.mk-channel-form.textarea%"></textarea> | ||||||
| 	<button class={ wait: wait } ref="submit" disabled={ wait || (refs.text.value.length == 0) } onclick={ post }> | 	<div class="actions"> | ||||||
| 		{ wait ? 'やってます' : 'やる' }<mk-ellipsis if={ wait }/> | 		<button onclick={ selectFile }><i class="fa fa-upload"></i>%i18n:ch.tags.mk-channel-form.upload%</button> | ||||||
| 	</button> | 		<button onclick={ drive }><i class="fa fa-cloud"></i>%i18n:ch.tags.mk-channel-form.drive%</button> | ||||||
| 	<br> | 		<button class={ wait: wait } ref="submit" disabled={ wait || (refs.text.value.length == 0) } onclick={ post }> | ||||||
| 	<button onclick={ drive }>ドライブ</button> | 			<i class="fa fa-paper-plane" if={ !wait }></i>{ wait ? '%i18n:ch.tags.mk-channel-form.posting%' : '%i18n:ch.tags.mk-channel-form.post%' }<mk-ellipsis if={ wait }/> | ||||||
|  | 		</button> | ||||||
|  | 	</div> | ||||||
| 	<mk-uploader ref="uploader"/> | 	<mk-uploader ref="uploader"/> | ||||||
| 	<ol if={ files }> | 	<ol if={ files }> | ||||||
| 		<li each={ files }>{ name }</li> | 		<li each={ files }>{ name }</li> | ||||||
| 	</ol> | 	</ol> | ||||||
|  | 	<input ref="file" type="file" accept="image/*" multiple="multiple" onchange={ changeFile }/> | ||||||
| 	<style> | 	<style> | ||||||
| 		:scope | 		:scope | ||||||
| 			display block | 			display block | ||||||
| 
 | 
 | ||||||
|  | 			> textarea | ||||||
|  | 				width 100% | ||||||
|  | 				max-width 100% | ||||||
|  | 				min-width 100% | ||||||
|  | 				min-height 5em | ||||||
|  | 
 | ||||||
|  | 			> .actions | ||||||
|  | 				display flex | ||||||
|  | 
 | ||||||
|  | 				> button | ||||||
|  | 					> i | ||||||
|  | 						margin-right 0.25em | ||||||
|  | 
 | ||||||
|  | 					&:last-child | ||||||
|  | 						margin-left auto | ||||||
|  | 
 | ||||||
|  | 					&.wait | ||||||
|  | 						cursor wait | ||||||
|  | 
 | ||||||
|  | 			> input[type='file'] | ||||||
|  | 				display none | ||||||
|  | 
 | ||||||
| 	</style> | 	</style> | ||||||
| 	<script> | 	<script> | ||||||
| 		import CONFIG from '../../common/scripts/config'; | 		import CONFIG from '../../common/scripts/config'; | ||||||
|  | @ -314,6 +342,14 @@ | ||||||
| 			}); | 			}); | ||||||
| 		}; | 		}; | ||||||
| 
 | 
 | ||||||
|  | 		this.changeFile = () => { | ||||||
|  | 			this.refs.file.files.forEach(this.upload); | ||||||
|  | 		}; | ||||||
|  | 
 | ||||||
|  | 		this.selectFile = () => { | ||||||
|  | 			this.refs.file.click(); | ||||||
|  | 		}; | ||||||
|  | 
 | ||||||
| 		this.drive = () => { | 		this.drive = () => { | ||||||
| 			window['cb'] = files => { | 			window['cb'] = files => { | ||||||
| 				this.update({ | 				this.update({ | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
|  | @import "../reset" | ||||||
| @import "../../../../node_modules/cropperjs/dist/cropper.css" | @import "../../../../node_modules/cropperjs/dist/cropper.css" | ||||||
| 
 | 
 | ||||||
| *::input-placeholder | *::input-placeholder | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
|  | @import "../reset" | ||||||
| 
 | 
 | ||||||
| html | html | ||||||
| 	background-color #fff | 	background-color #fff | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
|  | @import "../reset" | ||||||
| 
 | 
 | ||||||
| #wait | #wait | ||||||
| 	top auto | 	top auto | ||||||
|  |  | ||||||
|  | @ -1,16 +1,3 @@ | ||||||
| * |  | ||||||
| 	position relative |  | ||||||
| 	box-sizing border-box |  | ||||||
| 	background-clip padding-box !important |  | ||||||
| 
 |  | ||||||
| html |  | ||||||
| body |  | ||||||
| 	margin 0 |  | ||||||
| 	padding 0 |  | ||||||
| 
 |  | ||||||
| body |  | ||||||
| 	overflow-wrap break-word |  | ||||||
| 
 |  | ||||||
| input:not([type]) | input:not([type]) | ||||||
| input[type='text'] | input[type='text'] | ||||||
| input[type='password'] | input[type='password'] | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
|  | @import "../reset" | ||||||
| 
 | 
 | ||||||
| html | html | ||||||
| 	color #456267 | 	color #456267 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| @import "../base" | @import "../app" | ||||||
|  | @import "../reset" | ||||||
| 
 | 
 | ||||||
| html | html | ||||||
| 	color #456267 | 	color #456267 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue