summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-06-26 19:41:21 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-06-26 19:41:21 +0900
commit0ec266abf7cb17f1e1fe02c151377c3b7960af4b (patch)
treeb5f2ecd77ab470545169592a86156059d61e0464
parentfix: mocha テストが動かないのを修正 v2 (#8892) (diff)
downloadmisskey-0ec266abf7cb17f1e1fe02c151377c3b7960af4b.tar.gz
misskey-0ec266abf7cb17f1e1fe02c151377c3b7960af4b.tar.bz2
misskey-0ec266abf7cb17f1e1fe02c151377c3b7960af4b.zip
chore(client): tweak client
-rw-r--r--packages/client/src/components/modal-page-window.vue6
-rw-r--r--packages/client/src/components/ui/modal-window.vue16
-rw-r--r--packages/client/src/components/ui/window.vue21
-rw-r--r--packages/client/src/style.scss8
4 files changed, 20 insertions, 31 deletions
diff --git a/packages/client/src/components/modal-page-window.vue b/packages/client/src/components/modal-page-window.vue
index aef70f113b..a810bd2144 100644
--- a/packages/client/src/components/modal-page-window.vue
+++ b/packages/client/src/components/modal-page-window.vue
@@ -1,6 +1,6 @@
<template>
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
- <div ref="rootEl" class="hrmcaedk _window _narrow_" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
+ <div ref="rootEl" class="hrmcaedk _narrow_" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
<div class="header" @contextmenu="onContextmenu">
<button v-if="history.length > 0" v-tooltip="$ts.goBack" class="_button" @click="back()"><i class="fas fa-arrow-left"></i></button>
<span v-else style="display: inline-block; width: 20px"></span>
@@ -121,6 +121,7 @@ function onContextmenu(ev: MouseEvent) {
display: flex;
flex-direction: column;
contain: content;
+ border-radius: var(--radius);
--root-margin: 24px;
@@ -139,6 +140,9 @@ function onContextmenu(ev: MouseEvent) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+ background: var(--windowHeader);
+ -webkit-backdrop-filter: var(--blur, blur(15px));
+ backdrop-filter: var(--blur, blur(15px));
box-shadow: 0px 1px var(--divider);
> button {
diff --git a/packages/client/src/components/ui/modal-window.vue b/packages/client/src/components/ui/modal-window.vue
index d2b2ccff7a..bf9be971fc 100644
--- a/packages/client/src/components/ui/modal-window.vue
+++ b/packages/client/src/components/ui/modal-window.vue
@@ -1,6 +1,6 @@
<template>
<MkModal ref="modal" :prefer-type="'dialog'" @click="onBgClick" @closed="$emit('closed')">
- <div ref="rootEl" class="ebkgoccj _window _narrow_" :style="{ width: `${width}px`, height: scroll ? (height ? `${height}px` : null) : (height ? `min(${height}px, 100%)` : '100%') }" @keydown="onKeydown">
+ <div ref="rootEl" class="ebkgoccj _narrow_" :style="{ width: `${width}px`, height: scroll ? (height ? `${height}px` : null) : (height ? `min(${height}px, 100%)` : '100%') }" @keydown="onKeydown">
<div ref="headerEl" class="header">
<button v-if="withOkButton" class="_button" @click="$emit('close')"><i class="fas fa-times"></i></button>
<span class="title">
@@ -9,12 +9,7 @@
<button v-if="!withOkButton" class="_button" @click="$emit('close')"><i class="fas fa-times"></i></button>
<button v-if="withOkButton" class="_button" :disabled="okButtonDisabled" @click="$emit('ok')"><i class="fas fa-check"></i></button>
</div>
- <div v-if="padding" class="body">
- <div class="_section">
- <slot :width="bodyWidth" :height="bodyHeight"></slot>
- </div>
- </div>
- <div v-else class="body">
+ <div class="body">
<slot :width="bodyWidth" :height="bodyHeight"></slot>
</div>
</div>
@@ -28,14 +23,12 @@ import MkModal from './modal.vue';
const props = withDefaults(defineProps<{
withOkButton: boolean;
okButtonDisabled: boolean;
- padding: boolean;
width: number;
height: number | null;
scroll: boolean;
}>(), {
withOkButton: false,
okButtonDisabled: false,
- padding: false,
width: 400,
height: null,
scroll: true,
@@ -96,6 +89,7 @@ defineExpose({
display: flex;
flex-direction: column;
contain: content;
+ border-radius: var(--radius);
--root-margin: 24px;
@@ -108,6 +102,9 @@ defineExpose({
$height-narrow: 42px;
display: flex;
flex-shrink: 0;
+ background: var(--windowHeader);
+ -webkit-backdrop-filter: var(--blur, blur(15px));
+ backdrop-filter: var(--blur, blur(15px));
box-shadow: 0px 1px var(--divider);
> button {
@@ -143,6 +140,7 @@ defineExpose({
> .body {
overflow: auto;
+ background: var(--panel);
}
}
</style>
diff --git a/packages/client/src/components/ui/window.vue b/packages/client/src/components/ui/window.vue
index a5efab154b..25f937ef10 100644
--- a/packages/client/src/components/ui/window.vue
+++ b/packages/client/src/components/ui/window.vue
@@ -1,7 +1,7 @@
<template>
<transition :name="$store.state.animation ? 'window' : ''" appear @after-leave="$emit('closed')">
<div v-if="showing" class="ebkgocck">
- <div class="body _window _shadow _narrow_" @mousedown="onBodyMousedown" @keydown="onKeydown">
+ <div class="body _shadow _narrow_" @mousedown="onBodyMousedown" @keydown="onKeydown">
<div class="header" :class="{ mini }" @contextmenu.prevent.stop="onContextmenu">
<span class="left">
<button v-for="button in buttonsLeft" v-tooltip="button.title" class="button _button" :class="{ highlighted: button.highlighted }" @click="button.onClick"><i :class="button.icon"></i></button>
@@ -14,12 +14,7 @@
<button v-if="closeButton" class="button _button" @click="close()"><i class="fas fa-times"></i></button>
</span>
</div>
- <div v-if="padding" class="body">
- <div class="_section">
- <slot></slot>
- </div>
- </div>
- <div v-else class="body">
+ <div class="body">
<slot></slot>
</div>
</div>
@@ -67,11 +62,6 @@ export default defineComponent({
},
props: {
- padding: {
- type: Boolean,
- required: false,
- default: false,
- },
initialWidth: {
type: Number,
required: false,
@@ -399,7 +389,8 @@ export default defineComponent({
flex-direction: column;
contain: content;
width: 100%;
- height: 100%;
+ height: 100%;
+ border-radius: var(--radius);
> .header {
--height: 45px;
@@ -414,6 +405,9 @@ export default defineComponent({
flex-shrink: 0;
user-select: none;
height: var(--height);
+ background: var(--windowHeader);
+ -webkit-backdrop-filter: var(--blur, blur(15px));
+ backdrop-filter: var(--blur, blur(15px));
border-bottom: solid 1px var(--divider);
font-size: 95%;
@@ -454,6 +448,7 @@ export default defineComponent({
> .body {
flex: 1;
overflow: auto;
+ background: var(--panel);
}
}
diff --git a/packages/client/src/style.scss b/packages/client/src/style.scss
index 44dac26265..94b5dd8cbf 100644
--- a/packages/client/src/style.scss
+++ b/packages/client/src/style.scss
@@ -338,14 +338,6 @@ hr {
}
}
-._window {
- background: var(--windowHeader);
- border-radius: var(--radius);
- contain: content;
- -webkit-backdrop-filter: var(--blur, blur(15px));
- backdrop-filter: var(--blur, blur(15px));
-}
-
._popup {
background: var(--popup);
border-radius: var(--radius);