From 30a39a296dcea701deb1cf5ac323aa1e6bcee13f Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 20 Jun 2022 13:20:28 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=E3=83=81=E3=83=A3=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=83=AB=E3=83=BC=E3=83=A0=E3=82=92Composition=20API?= =?UTF-8?q?=E5=8C=96=20(#8850)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * pick form * pick message * pick room * fix lint * fix scroll? * fix scroll.ts * fix directives/sticky-container * update global/sticky-container.vue * fix, :art: * test.1 --- package.json | 2 +- .../components/global/sticky-container.vue | 92 ++- .../client/src/directives/sticky-container.ts | 2 + .../pages/messaging/messaging-room.form.vue | 460 ++++++------- .../messaging/messaging-room.message.vue | 52 +- .../src/pages/messaging/messaging-room.vue | 623 ++++++++---------- packages/client/src/scripts/scroll.ts | 15 +- 7 files changed, 585 insertions(+), 661 deletions(-) diff --git a/package.json b/package.json index a035745727..fd565f7cec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.111.1", + "version": "12.111.1-test.1", "codename": "indigo", "repository": { "type": "git", diff --git a/packages/client/src/components/global/sticky-container.vue b/packages/client/src/components/global/sticky-container.vue index 89d397f082..98a7ee9c30 100644 --- a/packages/client/src/components/global/sticky-container.vue +++ b/packages/client/src/components/global/sticky-container.vue @@ -1,71 +1,63 @@ - diff --git a/packages/client/src/directives/sticky-container.ts b/packages/client/src/directives/sticky-container.ts index 9610eba4da..3cf813054b 100644 --- a/packages/client/src/directives/sticky-container.ts +++ b/packages/client/src/directives/sticky-container.ts @@ -5,8 +5,10 @@ export default { //const query = binding.value; const header = src.children[0]; + const body = src.children[1]; const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop') || '0px'; src.style.setProperty('--stickyTop', `calc(${currentStickyTop} + ${header.offsetHeight}px)`); + if (body) body.dataset.stickyContainerHeaderHeight = header.offsetHeight.toString(); header.style.setProperty('--stickyTop', currentStickyTop); header.style.position = 'sticky'; header.style.top = 'var(--stickyTop)'; diff --git a/packages/client/src/pages/messaging/messaging-room.form.vue b/packages/client/src/pages/messaging/messaging-room.form.vue index 8e779c4f39..38bab90502 100644 --- a/packages/client/src/pages/messaging/messaging-room.form.vue +++ b/packages/client/src/pages/messaging/messaging-room.form.vue @@ -1,222 +1,222 @@ - @@ -230,7 +230,7 @@ export default defineComponent({ width: 100%; min-width: 100%; max-width: 100%; - height: 80px; + min-height: 80px; margin: 0; padding: 16px 16px 0 16px; resize: none; @@ -245,26 +245,16 @@ export default defineComponent({ color: var(--fg); } - > .file { - padding: 8px; - color: #444; - background: #eee; - cursor: pointer; - } - - > .send { - position: absolute; + footer { + position: sticky; bottom: 0; - right: 0; - margin: 0; - padding: 16px; - font-size: 1em; - transition: color 0.1s ease; - color: var(--accent); + background: var(--panel); - &:active { - color: var(--accentDarken); - transition: color 0s ease; + > .file { + padding: 8px; + color: var(--fg); + background: transparent; + cursor: pointer; } } @@ -316,21 +306,39 @@ export default defineComponent({ } } - ._button { - margin: 0; - padding: 16px; - font-size: 1em; - font-weight: normal; - text-decoration: none; - transition: color 0.1s ease; + .buttons { + display: flex; - &:hover { - color: var(--accent); + ._button { + margin: 0; + padding: 16px; + font-size: 1em; + font-weight: normal; + text-decoration: none; + transition: color 0.1s ease; + + &:hover { + color: var(--accent); + } + + &:active { + color: var(--accentDarken); + transition: color 0s ease; + } } - &:active { - color: var(--accentDarken); - transition: color 0s ease; + > .send { + margin-left: auto; + color: var(--accent); + + &:hover { + color: var(--accentLighten); + } + + &:active { + color: var(--accentDarken); + transition: color 0s ease; + } } } diff --git a/packages/client/src/pages/messaging/messaging-room.message.vue b/packages/client/src/pages/messaging/messaging-room.message.vue index 4315bbecdb..393d2a17b2 100644 --- a/packages/client/src/pages/messaging/messaging-room.message.vue +++ b/packages/client/src/pages/messaging/messaging-room.message.vue @@ -35,45 +35,28 @@ -