summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2023-01-16 02:37:45 +0900
committerGitHub <noreply@github.com>2023-01-16 02:37:45 +0900
commit678c7d9502c334e21c130e13b381a608e8d5e8be (patch)
tree18e5c6c5b9f6efc659d9e7a223e680634d008d1a
parentDockerfile: copy fluent-emoji assets (#9605) (diff)
downloadmisskey-678c7d9502c334e21c130e13b381a608e8d5e8be.tar.gz
misskey-678c7d9502c334e21c130e13b381a608e8d5e8be.tar.bz2
misskey-678c7d9502c334e21c130e13b381a608e8d5e8be.zip
Fix style of messaging form, use css module (#9602)
* Fix style of messaging form, use css module * clean up
-rw-r--r--packages/frontend/src/pages/messaging/messaging-room.form.vue226
1 files changed, 113 insertions, 113 deletions
diff --git a/packages/frontend/src/pages/messaging/messaging-room.form.vue b/packages/frontend/src/pages/messaging/messaging-room.form.vue
index 6a49d0e89d..d6113668dd 100644
--- a/packages/frontend/src/pages/messaging/messaging-room.form.vue
+++ b/packages/frontend/src/pages/messaging/messaging-room.form.vue
@@ -1,10 +1,12 @@
<template>
<div
- class="pemppnzi"
+ :class="$style['root']"
@dragover.stop="onDragover"
@drop.stop="onDrop"
>
<textarea
+ :class="$style['textarea']"
+ class="_acrylic"
ref="textEl"
v-model="text"
:placeholder="i18n.ts.inputMessageHere"
@@ -12,17 +14,17 @@
@compositionupdate="onCompositionUpdate"
@paste="onPaste"
></textarea>
- <footer>
- <div v-if="file" class="file" @click="file = null">{{ file.name }}</div>
- <div class="buttons">
- <button class="_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="send _button" :disabled="!canSend || sending" :title="i18n.ts.send" @click="send">
+ <footer :class="$style['footer']">
+ <div v-if="file" :class="$style['file']" @click="file = null">{{ file.name }}</div>
+ <div :class="$style['buttons']">
+ <button class="_button" :class="$style['button']" @click="chooseFile"><i class="ti ti-photo-plus"></i></button>
+ <button class="_button" :class="$style['button']" @click="insertEmoji"><i class="ti ti-mood-happy"></i></button>
+ <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>
</button>
</div>
</footer>
- <input ref="fileEl" type="file" @change="onChangeFile"/>
+ <input :class="$style['file-input']" ref="fileEl" type="file" @change="onChangeFile"/>
</div>
</template>
@@ -236,131 +238,129 @@ defineExpose({
});
</script>
-<style lang="scss" scoped>
-.pemppnzi {
+<style lang="scss" module>
+.root {
position: relative;
+}
- > textarea {
- cursor: auto;
- display: block;
- width: 100%;
- min-width: 100%;
- max-width: 100%;
- min-height: 80px;
- margin: 0;
- padding: 16px 16px 0 16px;
- resize: none;
- font-size: 1em;
- font-family: inherit;
- outline: none;
- border: none;
- border-radius: 0;
- box-shadow: none;
- box-sizing: border-box;
- color: var(--fg);
- background: rgba(12, 18, 16, 0.85);
- backdrop-filter: var(--blur, blur(15px));
- }
+.textarea {
+ cursor: auto;
+ display: block;
+ width: 100%;
+ min-width: 100%;
+ max-width: 100%;
+ min-height: 80px;
+ margin: 0;
+ padding: 16px 16px 0 16px;
+ resize: none;
+ font-size: 1em;
+ font-family: inherit;
+ outline: none;
+ border: none;
+ border-radius: 0;
+ box-shadow: none;
+ box-sizing: border-box;
+ color: var(--fg);
+}
- footer {
- position: sticky;
- bottom: 0;
- background: var(--panel);
+.footer {
+ position: sticky;
+ bottom: 0;
+ background: var(--panel);
+}
- > .file {
- padding: 8px;
- color: var(--fg);
- background: transparent;
- cursor: pointer;
- }
- }
+.file {
+ padding: 8px;
+ color: var(--fg);
+ background: transparent;
+ cursor: pointer;
+}
+/*
+.files {
+ display: block;
+ margin: 0;
+ padding: 0 8px;
+ list-style: none;
- .files {
+ &:after {
+ content: '';
display: block;
- margin: 0;
- padding: 0 8px;
- list-style: none;
-
- &:after {
- content: '';
- display: block;
- clear: both;
- }
-
- > li {
- display: block;
- float: left;
- margin: 4px;
- padding: 0;
- width: 64px;
- height: 64px;
- background-color: #eee;
- background-repeat: no-repeat;
- background-position: center center;
- background-size: cover;
- cursor: move;
+ clear: both;
+ }
- &:hover {
- > .remove {
- display: block;
- }
- }
+ > li {
+ display: block;
+ float: left;
+ margin: 4px;
+ padding: 0;
+ width: 64px;
+ height: 64px;
+ background-color: #eee;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-size: cover;
+ cursor: move;
+ &:hover {
> .remove {
- display: none;
- position: absolute;
- right: -6px;
- top: -6px;
- margin: 0;
- padding: 0;
- background: transparent;
- outline: none;
- border: none;
- border-radius: 0;
- box-shadow: none;
- cursor: pointer;
+ display: block;
}
}
}
+}
- .buttons {
- display: flex;
-
- ._button {
- margin: 0;
- padding: 16px;
- font-size: 1em;
- font-weight: normal;
- text-decoration: none;
- transition: color 0.1s ease;
+.file-remove {
+ display: none;
+ position: absolute;
+ right: -6px;
+ top: -6px;
+ margin: 0;
+ padding: 0;
+ background: transparent;
+ outline: none;
+ border: none;
+ border-radius: 0;
+ box-shadow: none;
+ cursor: pointer;
+}
+*/
- &:hover {
- color: var(--accent);
- }
+.buttons {
+ display: flex;
+}
- &:active {
- color: var(--accentDarken);
- transition: color 0s ease;
- }
- }
+.button {
+ margin: 0;
+ padding: 16px;
+ font-size: 1em;
+ font-weight: normal;
+ text-decoration: none;
+ transition: color 0.1s ease;
- > .send {
- margin-left: auto;
- color: var(--accent);
+ &:hover {
+ color: var(--accent);
+ }
- &:hover {
- color: var(--accentLighten);
- }
+ &:active {
+ color: var(--accentDarken);
+ transition: color 0s ease;
+ }
+}
+.send {
+ margin-left: auto;
+ color: var(--accent);
- &:active {
- color: var(--accentDarken);
- transition: color 0s ease;
- }
- }
+ &:hover {
+ color: var(--accentLighten);
}
- input[type=file] {
- display: none;
+ &:active {
+ color: var(--accentDarken);
+ transition: color 0s ease;
}
}
+
+.file-input {
+ display: none;
+}
</style>