mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-24 23:26:07 +09:00
🎨
This commit is contained in:
parent
5eb51a8aab
commit
65b965db45
@ -2,12 +2,16 @@
|
|||||||
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
|
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
|
||||||
<div class="hrmcaedk _window _narrow_" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
|
<div class="hrmcaedk _window _narrow_" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
|
||||||
<div class="header" @contextmenu="onContextmenu">
|
<div class="header" @contextmenu="onContextmenu">
|
||||||
<span class="title">
|
<button v-if="history.length > 0" class="_button" @click="back()"><i class="fas fa-arrow-left"></i></button>
|
||||||
|
<span v-else style="display: inline-block; width: 20px"></span>
|
||||||
|
<span v-if="pageInfo" class="title">
|
||||||
|
<i v-if="pageInfo.icon" class="icon" :class="pageInfo.icon"></i>
|
||||||
|
<span>{{ pageInfo.title }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="body _flat_">
|
<div class="body _flat_">
|
||||||
<XHeader :info="pageInfo"/>
|
<XHeader v-if="!pageInfo?.hide" :info="pageInfo"/>
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="component" v-bind="props" :ref="changePage"/>
|
<component :is="component" v-bind="props" :ref="changePage"/>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
@ -173,19 +177,39 @@ export default defineComponent({
|
|||||||
$height-narrow: 42px;
|
$height-narrow: 42px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
height: $height;
|
||||||
|
line-height: $height;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
box-shadow: 0px 1px var(--divider);
|
box-shadow: 0px 1px var(--divider);
|
||||||
|
|
||||||
|
> button {
|
||||||
|
height: $height;
|
||||||
|
width: $height;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--fgHighlighted);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 500px) {
|
||||||
|
height: $height-narrow;
|
||||||
|
line-height: $height-narrow;
|
||||||
|
padding-left: 16px;
|
||||||
|
|
||||||
|
> button {
|
||||||
|
height: $height-narrow;
|
||||||
|
width: $height-narrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .title {
|
> .title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: $height;
|
|
||||||
font-weight: bold;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
@media (max-width: 500px) {
|
> .icon {
|
||||||
height: $height-narrow;
|
margin-right: 0.5em;
|
||||||
padding-left: 16px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,10 +82,11 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.narrow = this.$el.offsetWidth < 500;
|
if (this.$el.parentElement == null) return;
|
||||||
|
this.narrow = this.$el.parentElement.offsetWidth < 500;
|
||||||
new ResizeObserver((entries, observer) => {
|
new ResizeObserver((entries, observer) => {
|
||||||
this.narrow = this.$el.offsetWidth < 500;
|
this.narrow = this.$el.parentElement.offsetWidth < 500;
|
||||||
}).observe(this.$el);
|
}).observe(this.$el.parentElement);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -144,6 +145,7 @@ export default defineComponent({
|
|||||||
.fdidabkb {
|
.fdidabkb {
|
||||||
--height: 60px;
|
--height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
&.thin {
|
&.thin {
|
||||||
--height: 50px;
|
--height: 50px;
|
||||||
|
Loading…
Reference in New Issue
Block a user