This commit is contained in:
syuilo 2021-10-14 18:51:15 +09:00
parent 3dc70f9878
commit 955b3e313b
7 changed files with 89 additions and 66 deletions

View file

@ -1,5 +1,5 @@
<template>
<div class="fdidabkb" :class="{ slim: narrow, thin }" :style="{ background: bg }" @click="onClick" ref="el">
<div class="fdidabkb" :class="{ slim: narrow, thin: thin_ }" :style="{ background: bg }" @click="onClick" ref="el">
<template v-if="info">
<div class="titleContainer" @click="showTabsPopup">
<i v-if="info.icon" class="icon" :class="info.icon"></i>
@ -37,7 +37,7 @@
</template>
<script lang="ts">
import { computed, defineComponent, onMounted, onUnmounted, PropType, ref } from 'vue';
import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, inject } from 'vue';
import * as tinycolor from 'tinycolor2';
import { popupMenu } from '@client/os';
import { url } from '@client/config';
@ -182,6 +182,7 @@ export default defineComponent({
showTabsPopup,
preventDrag,
onClick,
thin_: props.thin || inject('shouldHeaderThin', false)
};
},
});

View file

@ -44,7 +44,8 @@ export default defineComponent({
return {
navHook: (path) => {
this.navigate(path);
}
},
shouldHeaderThin: true,
};
},

View file

@ -46,7 +46,8 @@ export default defineComponent({
return {
navHook: (path) => {
this.navigate(path);
}
},
shouldHeaderThin: true,
};
},

View file

@ -1,6 +1,6 @@
<template>
<div class="gafaadew" :class="{ modal, _popup: modal }"
v-size="{ max: [500] }"
v-size="{ max: [310, 500] }"
@dragover.stop="onDragover"
@dragenter="onDragenter"
@dragleave="onDragleave"
@ -914,5 +914,17 @@ export default defineComponent({
}
}
}
&.max-width_310px {
> .form {
> footer {
> button {
font-size: 14px;
width: 44px;
height: 44px;
}
}
}
}
}
</style>

View file

@ -1,5 +1,8 @@
<template>
<div class="_root">
<div>
<MkHeader :info="header"/>
<div class="_root">
<transition name="fade" mode="out-in">
<div v-if="page" class="xcukqgmh" :key="page.id" v-size="{ max: [450] }">
<div class="_block main">
@ -56,6 +59,7 @@
<MkError v-else-if="error" @retry="fetch()"/>
<MkLoading v-else/>
</transition>
</div>
</div>
</template>
@ -97,6 +101,10 @@ export default defineComponent({
[symbols.PAGE_INFO]: computed(() => this.page ? {
title: computed(() => this.page.title || this.page.name),
avatar: this.page.user,
} : null),
header: computed(() => this.page ? {
title: computed(() => this.page.title || this.page.name),
avatar: this.page.user,
path: `/@${this.page.user.username}/pages/${this.page.name}`,
share: {
title: this.page.title || this.page.name,

View file

@ -215,6 +215,10 @@ export default defineComponent({
}
}
> .post-form {
border-radius: var(--radius);
}
> .tl {
background: var(--bg);
border-radius: var(--radius);

View file

@ -37,6 +37,10 @@ import { updateColumn, swapLeftColumn, swapRightColumn, swapUpColumn, swapDownCo
import { deckStore } from './deck-store';
export default defineComponent({
provide: {
shouldHeaderThin: true
},
props: {
column: {
type: Object,
@ -267,6 +271,7 @@ export default defineComponent({
height: 100%;
overflow: hidden;
contain: content;
box-shadow: 0 0 8px 0 var(--shadow);
&.draghover {
box-shadow: 0 0 0 2px var(--focus);
@ -320,15 +325,6 @@ export default defineComponent({
&.paged {
background: var(--bg) !important;
> header {
background: transparent;
box-shadow: none;
> button {
color: var(--fg);
}
}
}
> header {