refactor clinet

This commit is contained in:
syuilo 2021-10-23 23:22:20 +09:00
parent ae5d537197
commit 4d1c723496
15 changed files with 171 additions and 244 deletions

View File

@ -10,7 +10,7 @@
</span> </span>
<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button> <button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button>
</div> </div>
<div class="body _fitSide_"> <div class="body">
<keep-alive> <keep-alive>
<component :is="component" v-bind="props" :ref="changePage"/> <component :is="component" v-bind="props" :ref="changePage"/>
</keep-alive> </keep-alive>

View File

@ -16,7 +16,7 @@
<template #headerLeft> <template #headerLeft>
<button v-if="history.length > 0" class="_button" @click="back()" v-tooltip="$ts.goBack"><i class="fas fa-arrow-left"></i></button> <button v-if="history.length > 0" class="_button" @click="back()" v-tooltip="$ts.goBack"><i class="fas fa-arrow-left"></i></button>
</template> </template>
<div class="yrolvcoq _fitSide_"> <div class="yrolvcoq">
<component :is="component" v-bind="props" :ref="changePage"/> <component :is="component" v-bind="props" :ref="changePage"/>
</div> </div>
</XWindow> </XWindow>

View File

@ -153,10 +153,4 @@ export default defineComponent({
} }
} }
} }
._fitSide_ .ssazuxis {
> header {
padding: 0 16px;
}
}
</style> </style>

View File

@ -42,8 +42,4 @@ export default defineComponent({
margin-right: 4px; margin-right: 4px;
} }
} }
._fitSide_ .fpezltsf {
border-radius: 0;
}
</style> </style>

View File

@ -343,7 +343,6 @@ export default defineComponent({
> .main { > .main {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
--baseContentWidth: 100%;
} }
} }

View File

@ -2,7 +2,8 @@
<div> <div>
<MkHeader :info="header"/> <MkHeader :info="header"/>
<div class="yweeujhr _root" v-size="{ max: [400] }"> <MkSpacer :content-max="800">
<div class="yweeujhr" v-size="{ max: [400] }">
<MkButton @click="start" primary class="start"><i class="fas fa-plus"></i> {{ $ts.startMessaging }}</MkButton> <MkButton @click="start" primary class="start"><i class="fas fa-plus"></i> {{ $ts.startMessaging }}</MkButton>
<div class="history" v-if="messages.length > 0"> <div class="history" v-if="messages.length > 0">
@ -37,6 +38,7 @@
</div> </div>
<MkLoading v-if="fetching"/> <MkLoading v-if="fetching"/>
</div> </div>
</MkSpacer>
</div> </div>
</template> </template>
@ -177,7 +179,7 @@ export default defineComponent({
.yweeujhr { .yweeujhr {
> .start { > .start {
margin: var(--margin) auto var(--margin) auto; margin: 0 auto var(--margin) auto;
} }
> .history { > .history {

View File

@ -1,6 +1,6 @@
<template> <template>
<MkSpacer :content-max="800">
<div class="fcuexfpr"> <div class="fcuexfpr">
<div class="_root">
<transition name="fade" mode="out-in"> <transition name="fade" mode="out-in">
<div v-if="note" class="note"> <div v-if="note" class="note">
<div class="_gap" v-if="showNext"> <div class="_gap" v-if="showNext">
@ -34,7 +34,7 @@
<MkLoading v-else/> <MkLoading v-else/>
</transition> </transition>
</div> </div>
</div> </MkSpacer>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -153,7 +153,6 @@ export default defineComponent({
.fcuexfpr { .fcuexfpr {
background: var(--bg); background: var(--bg);
> ._root {
> .note { > .note {
> .main { > .main {
> .load { > .load {
@ -207,5 +206,4 @@ export default defineComponent({
} }
} }
} }
}
</style> </style>

View File

@ -311,7 +311,6 @@ export default defineComponent({
flex: 1; flex: 1;
min-width: 0; min-width: 0;
overflow: auto; overflow: auto;
--baseContentWidth: 100%;
} }
} }
} }

View File

@ -65,11 +65,4 @@ export default defineComponent({
background: var(--bg); background: var(--bg);
} }
} }
._fitSide_ .yrzkoczt {
> .tab {
padding-left: var(--margin);
padding-right: var(--margin);
}
}
</style> </style>

View File

@ -81,7 +81,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="ftskorzw narrow _root" v-else-if="user && narrow === true" v-size="{ max: [500] }"> <MkSpacer v-else-if="user && narrow === true" :content-max="800">
<div class="ftskorzw narrow" v-size="{ max: [500] }">
<!-- TODO --> <!-- TODO -->
<!-- <div class="punished" v-if="user.isSuspended"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSuspended }}</div> --> <!-- <div class="punished" v-if="user.isSuspended"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSuspended }}</div> -->
<!-- <div class="punished" v-if="user.isSilenced"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSilenced }}</div> --> <!-- <div class="punished" v-if="user.isSilenced"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSilenced }}</div> -->
@ -187,6 +188,7 @@
<XGallery v-else-if="page === 'gallery'" :user="user" class="_gap"/> <XGallery v-else-if="page === 'gallery'" :user="user" class="_gap"/>
</div> </div>
</div> </div>
</MkSpacer>
<MkError v-else-if="error" @retry="fetch()"/> <MkError v-else-if="error" @retry="fetch()"/>
<MkLoading v-else/> <MkLoading v-else/>
</transition> </transition>
@ -833,16 +835,4 @@ export default defineComponent({
} }
} }
} }
._fitSide_ .ftskorzw.narrow {
> .profile {
> .warn {
margin: 0;
}
> .main {
margin-top: 0;
}
}
}
</style> </style>

View File

@ -1,7 +1,6 @@
@charset "utf-8"; @charset "utf-8";
:root { :root {
--baseContentWidth: 760px;
--radius: 12px; --radius: 12px;
--marginFull: 16px; --marginFull: 16px;
--marginHalf: 10px; --marginHalf: 10px;
@ -349,22 +348,6 @@ hr {
contain: layout; // ふき出しがボックスから飛び出て表示されるようなデザインをする場合もあるので paint contain することができない contain: layout; // ふき出しがボックスから飛び出て表示されるようなデザインをする場合もあるので paint contain することができない
} }
// TODO: 廃止
._root {
box-sizing: border-box;
margin: var(--root-margin, 32px) auto;
max-width: min(var(--baseContentWidth), calc(100% - (var(--root-margin, 32px) * 2)));
// 子marginが突き抜けるのを防ぐため
// https://stackoverflow.com/questions/1762539/margin-on-child-element-moves-parent-element
padding-top: 1px;
margin-top: calc(var(--root-margin, 32px) - 1px);
@media (max-width: 500px) {
--root-margin: 10px;
}
}
._monolithic_ { ._monolithic_ {
._section:not(:empty) { ._section:not(:empty) {
box-sizing: border-box; box-sizing: border-box;
@ -380,33 +363,6 @@ hr {
} }
} }
._fitSide_ {
--root-margin: 0px;
--baseContentWidth: 100%;
--panelBorder: none;
._block {
//border-top: solid 0.5px var(--divider);
//border-bottom: solid 0.5px var(--divider);
border-radius: 0;
box-shadow: none;
}
._isolated {
margin: var(--margin);
}
._block._isolated {
border-radius: var(--radius);
}
@media (max-width: 500px) {
._root {
--root-margin: 0px;
}
}
}
._narrow_ ._card { ._narrow_ ._card {
> ._title { > ._title {
padding: 16px; padding: 16px;

View File

@ -3,7 +3,7 @@
<header class="header" @contextmenu.prevent.stop="onContextmenu"> <header class="header" @contextmenu.prevent.stop="onContextmenu">
<MkHeader class="title" :info="pageInfo" :center="false"/> <MkHeader class="title" :info="pageInfo" :center="false"/>
</header> </header>
<component :is="component" v-bind="props" :ref="changePage" class="body _fitSide_"/> <component :is="component" v-bind="props" :ref="changePage" class="body"/>
</div> </div>
</template> </template>

View File

@ -7,7 +7,7 @@
</template> </template>
</template> </template>
<router-view v-slot="{ Component }" class="_fitSide_"> <router-view v-slot="{ Component }">
<transition> <transition>
<keep-alive :include="['timeline']"> <keep-alive :include="['timeline']">
<component :is="Component" :ref="changePage" @contextmenu.stop="onContextmenu"/> <component :is="Component" :ref="changePage" @contextmenu.stop="onContextmenu"/>

View File

@ -13,7 +13,7 @@
</template> </template>
<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }"> <main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }">
<div class="content" :class="{ _fitSide_: !fullView }"> <div class="content">
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition"> <transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
<keep-alive :include="['timeline']"> <keep-alive :include="['timeline']">

View File

@ -3,7 +3,7 @@
<template #header><i class="fas fa-bell"></i>{{ $ts.notifications }}</template> <template #header><i class="fas fa-bell"></i>{{ $ts.notifications }}</template>
<template #func><button @click="configure()" class="_button"><i class="fas fa-cog"></i></button></template> <template #func><button @click="configure()" class="_button"><i class="fas fa-cog"></i></button></template>
<div class="_fitSide_"> <div>
<XNotifications :include-types="props.includingTypes"/> <XNotifications :include-types="props.includingTypes"/>
</div> </div>
</MkContainer> </MkContainer>