Fix style of messaging form, use css module (#9602)
* Fix style of messaging form, use css module * clean up
This commit is contained in:
		
							parent
							
								
									91a3c3943d
								
							
						
					
					
						commit
						678c7d9502
					
				
					 1 changed files with 123 additions and 123 deletions
				
			
		|  | @ -1,10 +1,12 @@ | ||||||
| <template> | <template> | ||||||
| <div | <div | ||||||
| 	class="pemppnzi" | 	:class="$style['root']" | ||||||
| 	@dragover.stop="onDragover" | 	@dragover.stop="onDragover" | ||||||
| 	@drop.stop="onDrop" | 	@drop.stop="onDrop" | ||||||
| > | > | ||||||
| 	<textarea | 	<textarea | ||||||
|  | 		:class="$style['textarea']" | ||||||
|  | 		class="_acrylic" | ||||||
| 		ref="textEl" | 		ref="textEl" | ||||||
| 		v-model="text" | 		v-model="text" | ||||||
| 		:placeholder="i18n.ts.inputMessageHere" | 		:placeholder="i18n.ts.inputMessageHere" | ||||||
|  | @ -12,17 +14,17 @@ | ||||||
| 		@compositionupdate="onCompositionUpdate" | 		@compositionupdate="onCompositionUpdate" | ||||||
| 		@paste="onPaste" | 		@paste="onPaste" | ||||||
| 	></textarea> | 	></textarea> | ||||||
| 	<footer> | 	<footer :class="$style['footer']"> | ||||||
| 		<div v-if="file" class="file" @click="file = null">{{ file.name }}</div> | 		<div v-if="file" :class="$style['file']" @click="file = null">{{ file.name }}</div> | ||||||
| 		<div class="buttons"> | 		<div :class="$style['buttons']"> | ||||||
| 			<button class="_button" @click="chooseFile"><i class="ti ti-photo-plus"></i></button> | 			<button class="_button" :class="$style['button']" @click="chooseFile"><i class="ti ti-photo-plus"></i></button> | ||||||
| 			<button class="_button" @click="insertEmoji"><i class="ti ti-mood-happy"></i></button> | 			<button class="_button" :class="$style['button']" @click="insertEmoji"><i class="ti ti-mood-happy"></i></button> | ||||||
| 			<button class="send _button" :disabled="!canSend || sending" :title="i18n.ts.send" @click="send"> | 			<button class="_button" :class="[$style['button'], $style['send']]" :disabled="!canSend || sending" :title="i18n.ts.send" @click="send"> | ||||||
| 				<template v-if="!sending"><i class="ti ti-send"></i></template><template v-if="sending"><MkLoading :em="true"/></template> | 				<template v-if="!sending"><i class="ti ti-send"></i></template><template v-if="sending"><MkLoading :em="true"/></template> | ||||||
| 			</button> | 			</button> | ||||||
| 		</div> | 		</div> | ||||||
| 	</footer> | 	</footer> | ||||||
| 	<input ref="fileEl" type="file" @change="onChangeFile"/> | 	<input :class="$style['file-input']" ref="fileEl" type="file" @change="onChangeFile"/> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | @ -236,11 +238,12 @@ defineExpose({ | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <style lang="scss" scoped> | <style lang="scss" module> | ||||||
| .pemppnzi { | .root { | ||||||
| 	position: relative; | 	position: relative; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 	> textarea { | .textarea { | ||||||
| 	cursor: auto; | 	cursor: auto; | ||||||
| 	display: block; | 	display: block; | ||||||
| 	width: 100%; | 	width: 100%; | ||||||
|  | @ -258,24 +261,22 @@ defineExpose({ | ||||||
| 	box-shadow: none; | 	box-shadow: none; | ||||||
| 	box-sizing: border-box; | 	box-sizing: border-box; | ||||||
| 	color: var(--fg); | 	color: var(--fg); | ||||||
| 		background: rgba(12, 18, 16, 0.85); | } | ||||||
| 		backdrop-filter: var(--blur, blur(15px)); |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	footer { | .footer { | ||||||
| 	position: sticky; | 	position: sticky; | ||||||
| 	bottom: 0; | 	bottom: 0; | ||||||
| 	background: var(--panel); | 	background: var(--panel); | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 		> .file { | .file { | ||||||
| 	padding: 8px; | 	padding: 8px; | ||||||
| 	color: var(--fg); | 	color: var(--fg); | ||||||
| 	background: transparent; | 	background: transparent; | ||||||
| 	cursor: pointer; | 	cursor: pointer; | ||||||
| 		} | } | ||||||
| 	} | /* | ||||||
| 
 | .files { | ||||||
| 	.files { |  | ||||||
| 	display: block; | 	display: block; | ||||||
| 	margin: 0; | 	margin: 0; | ||||||
| 	padding: 0 8px; | 	padding: 0 8px; | ||||||
|  | @ -305,8 +306,10 @@ defineExpose({ | ||||||
| 				display: block; | 				display: block; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 			> .remove { | .file-remove { | ||||||
| 	display: none; | 	display: none; | ||||||
| 	position: absolute; | 	position: absolute; | ||||||
| 	right: -6px; | 	right: -6px; | ||||||
|  | @ -319,14 +322,14 @@ defineExpose({ | ||||||
| 	border-radius: 0; | 	border-radius: 0; | ||||||
| 	box-shadow: none; | 	box-shadow: none; | ||||||
| 	cursor: pointer; | 	cursor: pointer; | ||||||
| 			} | } | ||||||
| 		} | */ | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	.buttons { | .buttons { | ||||||
| 	display: flex; | 	display: flex; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 		._button { | .button { | ||||||
| 	margin: 0; | 	margin: 0; | ||||||
| 	padding: 16px; | 	padding: 16px; | ||||||
| 	font-size: 1em; | 	font-size: 1em; | ||||||
|  | @ -342,9 +345,8 @@ defineExpose({ | ||||||
| 		color: var(--accentDarken); | 		color: var(--accentDarken); | ||||||
| 		transition: color 0s ease; | 		transition: color 0s ease; | ||||||
| 	} | 	} | ||||||
| 		} | } | ||||||
| 
 | .send { | ||||||
| 		> .send { |  | ||||||
| 	margin-left: auto; | 	margin-left: auto; | ||||||
| 	color: var(--accent); | 	color: var(--accent); | ||||||
| 
 | 
 | ||||||
|  | @ -356,11 +358,9 @@ defineExpose({ | ||||||
| 		color: var(--accentDarken); | 		color: var(--accentDarken); | ||||||
| 		transition: color 0s ease; | 		transition: color 0s ease; | ||||||
| 	} | 	} | ||||||
| 		} | } | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	input[type=file] { | .file-input { | ||||||
| 	display: none; | 	display: none; | ||||||
| 	} |  | ||||||
| } | } | ||||||
| </style> | </style> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue