2020-10-17 04:12:00 -07:00
|
|
|
<template>
|
2020-12-18 17:55:52 -08:00
|
|
|
<transition :name="$store.state.animation ? 'window' : ''" appear @after-leave="$emit('closed')">
|
2021-12-10 01:20:41 -08:00
|
|
|
<div v-if="showing" class="ebkgocck">
|
2022-06-26 03:41:21 -07:00
|
|
|
<div class="body _shadow _narrow_" @mousedown="onBodyMousedown" @keydown="onKeydown">
|
2021-02-26 20:08:34 -08:00
|
|
|
<div class="header" :class="{ mini }" @contextmenu.prevent.stop="onContextmenu">
|
2021-10-08 06:03:06 -07:00
|
|
|
<span class="left">
|
2022-06-20 01:38:49 -07:00
|
|
|
<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>
|
2021-10-08 06:03:06 -07:00
|
|
|
</span>
|
2020-10-17 04:12:00 -07:00
|
|
|
<span class="title" @mousedown.prevent="onHeaderMousedown" @touchstart.prevent="onHeaderMousedown">
|
|
|
|
<slot name="header"></slot>
|
|
|
|
</span>
|
2021-10-08 06:03:06 -07:00
|
|
|
<span class="right">
|
2022-06-20 01:38:49 -07:00
|
|
|
<button v-for="button in buttonsRight" v-tooltip="button.title" class="button _button" :class="{ highlighted: button.highlighted }" @click="button.onClick"><i :class="button.icon"></i></button>
|
|
|
|
<button v-if="closeButton" class="button _button" @click="close()"><i class="fas fa-times"></i></button>
|
2021-10-08 06:03:06 -07:00
|
|
|
</span>
|
2020-10-17 04:12:00 -07:00
|
|
|
</div>
|
2022-06-26 03:41:21 -07:00
|
|
|
<div class="body">
|
2020-10-17 04:12:00 -07:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<template v-if="canResize">
|
|
|
|
<div class="handle top" @mousedown.prevent="onTopHandleMousedown"></div>
|
|
|
|
<div class="handle right" @mousedown.prevent="onRightHandleMousedown"></div>
|
|
|
|
<div class="handle bottom" @mousedown.prevent="onBottomHandleMousedown"></div>
|
|
|
|
<div class="handle left" @mousedown.prevent="onLeftHandleMousedown"></div>
|
|
|
|
<div class="handle top-left" @mousedown.prevent="onTopLeftHandleMousedown"></div>
|
|
|
|
<div class="handle top-right" @mousedown.prevent="onTopRightHandleMousedown"></div>
|
|
|
|
<div class="handle bottom-right" @mousedown.prevent="onBottomRightHandleMousedown"></div>
|
|
|
|
<div class="handle bottom-left" @mousedown.prevent="onBottomLeftHandleMousedown"></div>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-11-11 09:02:25 -08:00
|
|
|
import contains from '@/scripts/contains';
|
|
|
|
import * as os from '@/os';
|
2020-10-17 04:12:00 -07:00
|
|
|
|
|
|
|
const minHeight = 50;
|
|
|
|
const minWidth = 250;
|
|
|
|
|
|
|
|
function dragListen(fn) {
|
2022-06-20 01:38:49 -07:00
|
|
|
window.addEventListener('mousemove', fn);
|
|
|
|
window.addEventListener('touchmove', fn);
|
2020-10-17 04:12:00 -07:00
|
|
|
window.addEventListener('mouseleave', dragClear.bind(null, fn));
|
2022-06-20 01:38:49 -07:00
|
|
|
window.addEventListener('mouseup', dragClear.bind(null, fn));
|
|
|
|
window.addEventListener('touchend', dragClear.bind(null, fn));
|
2020-10-17 04:12:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function dragClear(fn) {
|
2022-06-20 01:38:49 -07:00
|
|
|
window.removeEventListener('mousemove', fn);
|
|
|
|
window.removeEventListener('touchmove', fn);
|
2020-10-17 04:12:00 -07:00
|
|
|
window.removeEventListener('mouseleave', dragClear);
|
2022-06-20 01:38:49 -07:00
|
|
|
window.removeEventListener('mouseup', dragClear);
|
|
|
|
window.removeEventListener('touchend', dragClear);
|
2020-10-17 04:12:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
provide: {
|
2022-06-20 01:38:49 -07:00
|
|
|
inWindow: true,
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
initialWidth: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
2022-06-20 01:38:49 -07:00
|
|
|
default: 400,
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
initialHeight: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
2022-06-20 01:38:49 -07:00
|
|
|
default: null,
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
canResize: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-08-05 06:43:14 -07:00
|
|
|
closeButton: {
|
2020-10-24 09:21:41 -07:00
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
2021-08-05 06:43:14 -07:00
|
|
|
default: true,
|
2020-10-24 09:21:41 -07:00
|
|
|
},
|
2021-02-26 20:08:34 -08:00
|
|
|
mini: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
front: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-10-24 09:21:41 -07:00
|
|
|
contextmenu: {
|
|
|
|
type: Array,
|
|
|
|
required: false,
|
2022-06-20 01:38:49 -07:00
|
|
|
},
|
|
|
|
buttonsLeft: {
|
|
|
|
type: Array,
|
|
|
|
required: false,
|
2022-07-04 07:06:46 -07:00
|
|
|
default: () => [],
|
2022-06-20 01:38:49 -07:00
|
|
|
},
|
|
|
|
buttonsRight: {
|
|
|
|
type: Array,
|
|
|
|
required: false,
|
2022-07-04 07:06:46 -07:00
|
|
|
default: () => [],
|
2022-06-20 01:38:49 -07:00
|
|
|
},
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['closed'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
showing: true,
|
|
|
|
id: Math.random().toString(), // TODO: UUIDとかにする
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
if (this.initialWidth) this.applyTransformWidth(this.initialWidth);
|
|
|
|
if (this.initialHeight) this.applyTransformHeight(this.initialHeight);
|
|
|
|
|
|
|
|
this.applyTransformTop((window.innerHeight / 2) - (this.$el.offsetHeight / 2));
|
|
|
|
this.applyTransformLeft((window.innerWidth / 2) - (this.$el.offsetWidth / 2));
|
|
|
|
|
2020-11-01 05:49:08 -08:00
|
|
|
// 他のウィンドウ内のボタンなどを押してこのウィンドウが開かれた場合、親が最前面になろうとするのでそれに隠されないようにする
|
|
|
|
this.top();
|
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
window.addEventListener('resize', this.onBrowserResize);
|
|
|
|
},
|
|
|
|
|
|
|
|
unmounted() {
|
|
|
|
window.removeEventListener('resize', this.onBrowserResize);
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
close() {
|
|
|
|
this.showing = false;
|
|
|
|
},
|
|
|
|
|
2022-05-26 06:53:09 -07:00
|
|
|
onKeydown(evt) {
|
|
|
|
if (evt.which === 27) { // Esc
|
|
|
|
evt.preventDefault();
|
|
|
|
evt.stopPropagation();
|
2020-10-17 04:12:00 -07:00
|
|
|
this.close();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-01-18 04:35:57 -08:00
|
|
|
onContextmenu(ev: MouseEvent) {
|
2020-10-24 09:21:41 -07:00
|
|
|
if (this.contextmenu) {
|
2022-01-18 04:35:57 -08:00
|
|
|
os.contextMenu(this.contextmenu, ev);
|
2020-10-24 09:21:41 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
// 最前面へ移動
|
|
|
|
top() {
|
2021-12-17 19:12:47 -08:00
|
|
|
(this.$el as any).style.zIndex = os.claimZIndex(this.front ? 'middle' : 'low');
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
onBodyMousedown() {
|
|
|
|
this.top();
|
|
|
|
},
|
|
|
|
|
2022-06-20 01:38:49 -07:00
|
|
|
onHeaderMousedown(evt: MouseEvent) {
|
|
|
|
// 右クリックはコンテキストメニューを開こうとした可能性が高いため無視
|
|
|
|
if (evt.button === 2) return;
|
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
const main = this.$el as any;
|
|
|
|
|
|
|
|
if (!contains(main, document.activeElement)) main.focus();
|
|
|
|
|
|
|
|
const position = main.getBoundingClientRect();
|
|
|
|
|
2022-05-26 06:53:09 -07:00
|
|
|
const clickX = evt.touches && evt.touches.length > 0 ? evt.touches[0].clientX : evt.clientX;
|
|
|
|
const clickY = evt.touches && evt.touches.length > 0 ? evt.touches[0].clientY : evt.clientY;
|
2020-10-17 04:12:00 -07:00
|
|
|
const moveBaseX = clickX - position.left;
|
|
|
|
const moveBaseY = clickY - position.top;
|
|
|
|
const browserWidth = window.innerWidth;
|
|
|
|
const browserHeight = window.innerHeight;
|
|
|
|
const windowWidth = main.offsetWidth;
|
|
|
|
const windowHeight = main.offsetHeight;
|
|
|
|
|
|
|
|
// 動かした時
|
|
|
|
dragListen(me => {
|
|
|
|
const x = me.touches && me.touches.length > 0 ? me.touches[0].clientX : me.clientX;
|
|
|
|
const y = me.touches && me.touches.length > 0 ? me.touches[0].clientY : me.clientY;
|
|
|
|
|
|
|
|
let moveLeft = x - moveBaseX;
|
|
|
|
let moveTop = y - moveBaseY;
|
|
|
|
|
|
|
|
// 下はみ出し
|
|
|
|
if (moveTop + windowHeight > browserHeight) moveTop = browserHeight - windowHeight;
|
|
|
|
|
|
|
|
// 左はみ出し
|
|
|
|
if (moveLeft < 0) moveLeft = 0;
|
|
|
|
|
|
|
|
// 上はみ出し
|
|
|
|
if (moveTop < 0) moveTop = 0;
|
|
|
|
|
|
|
|
// 右はみ出し
|
|
|
|
if (moveLeft + windowWidth > browserWidth) moveLeft = browserWidth - windowWidth;
|
|
|
|
|
|
|
|
this.$el.style.left = moveLeft + 'px';
|
|
|
|
this.$el.style.top = moveTop + 'px';
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
// 上ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onTopHandleMousedown(evt) {
|
2020-10-17 04:12:00 -07:00
|
|
|
const main = this.$el as any;
|
|
|
|
|
2022-05-26 06:53:09 -07:00
|
|
|
const base = evt.clientY;
|
2020-10-17 04:12:00 -07:00
|
|
|
const height = parseInt(getComputedStyle(main, '').height, 10);
|
|
|
|
const top = parseInt(getComputedStyle(main, '').top, 10);
|
|
|
|
|
|
|
|
// 動かした時
|
|
|
|
dragListen(me => {
|
|
|
|
const move = me.clientY - base;
|
|
|
|
if (top + move > 0) {
|
|
|
|
if (height + -move > minHeight) {
|
|
|
|
this.applyTransformHeight(height + -move);
|
|
|
|
this.applyTransformTop(top + move);
|
|
|
|
} else { // 最小の高さより小さくなろうとした時
|
|
|
|
this.applyTransformHeight(minHeight);
|
|
|
|
this.applyTransformTop(top + (height - minHeight));
|
|
|
|
}
|
|
|
|
} else { // 上のはみ出し時
|
|
|
|
this.applyTransformHeight(top + height);
|
|
|
|
this.applyTransformTop(0);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
// 右ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onRightHandleMousedown(evt) {
|
2020-10-17 04:12:00 -07:00
|
|
|
const main = this.$el as any;
|
|
|
|
|
2022-05-26 06:53:09 -07:00
|
|
|
const base = evt.clientX;
|
2020-10-17 04:12:00 -07:00
|
|
|
const width = parseInt(getComputedStyle(main, '').width, 10);
|
|
|
|
const left = parseInt(getComputedStyle(main, '').left, 10);
|
|
|
|
const browserWidth = window.innerWidth;
|
|
|
|
|
|
|
|
// 動かした時
|
|
|
|
dragListen(me => {
|
|
|
|
const move = me.clientX - base;
|
|
|
|
if (left + width + move < browserWidth) {
|
|
|
|
if (width + move > minWidth) {
|
|
|
|
this.applyTransformWidth(width + move);
|
|
|
|
} else { // 最小の幅より小さくなろうとした時
|
|
|
|
this.applyTransformWidth(minWidth);
|
|
|
|
}
|
|
|
|
} else { // 右のはみ出し時
|
|
|
|
this.applyTransformWidth(browserWidth - left);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
// 下ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onBottomHandleMousedown(evt) {
|
2020-10-17 04:12:00 -07:00
|
|
|
const main = this.$el as any;
|
|
|
|
|
2022-05-26 06:53:09 -07:00
|
|
|
const base = evt.clientY;
|
2020-10-17 04:12:00 -07:00
|
|
|
const height = parseInt(getComputedStyle(main, '').height, 10);
|
|
|
|
const top = parseInt(getComputedStyle(main, '').top, 10);
|
|
|
|
const browserHeight = window.innerHeight;
|
|
|
|
|
|
|
|
// 動かした時
|
|
|
|
dragListen(me => {
|
|
|
|
const move = me.clientY - base;
|
|
|
|
if (top + height + move < browserHeight) {
|
|
|
|
if (height + move > minHeight) {
|
|
|
|
this.applyTransformHeight(height + move);
|
|
|
|
} else { // 最小の高さより小さくなろうとした時
|
|
|
|
this.applyTransformHeight(minHeight);
|
|
|
|
}
|
|
|
|
} else { // 下のはみ出し時
|
|
|
|
this.applyTransformHeight(browserHeight - top);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
// 左ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onLeftHandleMousedown(evt) {
|
2020-10-17 04:12:00 -07:00
|
|
|
const main = this.$el as any;
|
|
|
|
|
2022-05-26 06:53:09 -07:00
|
|
|
const base = evt.clientX;
|
2020-10-17 04:12:00 -07:00
|
|
|
const width = parseInt(getComputedStyle(main, '').width, 10);
|
|
|
|
const left = parseInt(getComputedStyle(main, '').left, 10);
|
|
|
|
|
|
|
|
// 動かした時
|
|
|
|
dragListen(me => {
|
|
|
|
const move = me.clientX - base;
|
|
|
|
if (left + move > 0) {
|
|
|
|
if (width + -move > minWidth) {
|
|
|
|
this.applyTransformWidth(width + -move);
|
|
|
|
this.applyTransformLeft(left + move);
|
|
|
|
} else { // 最小の幅より小さくなろうとした時
|
|
|
|
this.applyTransformWidth(minWidth);
|
|
|
|
this.applyTransformLeft(left + (width - minWidth));
|
|
|
|
}
|
|
|
|
} else { // 左のはみ出し時
|
|
|
|
this.applyTransformWidth(left + width);
|
|
|
|
this.applyTransformLeft(0);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
// 左上ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onTopLeftHandleMousedown(evt) {
|
|
|
|
this.onTopHandleMousedown(evt);
|
|
|
|
this.onLeftHandleMousedown(evt);
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
// 右上ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onTopRightHandleMousedown(evt) {
|
|
|
|
this.onTopHandleMousedown(evt);
|
|
|
|
this.onRightHandleMousedown(evt);
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
// 右下ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onBottomRightHandleMousedown(evt) {
|
|
|
|
this.onBottomHandleMousedown(evt);
|
|
|
|
this.onRightHandleMousedown(evt);
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
// 左下ハンドル掴み時
|
2022-05-26 06:53:09 -07:00
|
|
|
onBottomLeftHandleMousedown(evt) {
|
|
|
|
this.onBottomHandleMousedown(evt);
|
|
|
|
this.onLeftHandleMousedown(evt);
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
// 高さを適用
|
|
|
|
applyTransformHeight(height) {
|
2020-10-19 03:42:55 -07:00
|
|
|
if (height > window.innerHeight) height = window.innerHeight;
|
2020-10-17 04:12:00 -07:00
|
|
|
(this.$el as any).style.height = height + 'px';
|
|
|
|
},
|
|
|
|
|
|
|
|
// 幅を適用
|
|
|
|
applyTransformWidth(width) {
|
2020-10-19 03:42:55 -07:00
|
|
|
if (width > window.innerWidth) width = window.innerWidth;
|
2020-10-17 04:12:00 -07:00
|
|
|
(this.$el as any).style.width = width + 'px';
|
|
|
|
},
|
|
|
|
|
|
|
|
// Y座標を適用
|
|
|
|
applyTransformTop(top) {
|
|
|
|
(this.$el as any).style.top = top + 'px';
|
|
|
|
},
|
|
|
|
|
|
|
|
// X座標を適用
|
|
|
|
applyTransformLeft(left) {
|
|
|
|
(this.$el as any).style.left = left + 'px';
|
|
|
|
},
|
|
|
|
|
|
|
|
onBrowserResize() {
|
|
|
|
const main = this.$el as any;
|
|
|
|
const position = main.getBoundingClientRect();
|
|
|
|
const browserWidth = window.innerWidth;
|
|
|
|
const browserHeight = window.innerHeight;
|
|
|
|
const windowWidth = main.offsetWidth;
|
|
|
|
const windowHeight = main.offsetHeight;
|
2022-06-20 01:38:49 -07:00
|
|
|
if (position.left < 0) main.style.left = 0; // 左はみ出し
|
|
|
|
if (position.top + windowHeight > browserHeight) main.style.top = browserHeight - windowHeight + 'px'; // 下はみ出し
|
|
|
|
if (position.left + windowWidth > browserWidth) main.style.left = browserWidth - windowWidth + 'px'; // 右はみ出し
|
|
|
|
if (position.top < 0) main.style.top = 0; // 上はみ出し
|
|
|
|
},
|
|
|
|
},
|
2020-10-17 04:12:00 -07:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.window-enter-active, .window-leave-active {
|
2021-10-16 03:30:31 -07:00
|
|
|
transition: opacity 0.2s, transform 0.2s !important;
|
2020-10-17 04:12:00 -07:00
|
|
|
}
|
|
|
|
.window-enter-from, .window-leave-to {
|
|
|
|
pointer-events: none;
|
|
|
|
opacity: 0;
|
|
|
|
transform: scale(0.9);
|
|
|
|
}
|
|
|
|
|
|
|
|
.ebkgocck {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2021-02-26 20:08:34 -08:00
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
> .body {
|
2021-03-02 05:57:16 -08:00
|
|
|
overflow: hidden;
|
2020-10-17 04:12:00 -07:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
contain: content;
|
|
|
|
width: 100%;
|
2022-06-26 03:41:21 -07:00
|
|
|
height: 100%;
|
|
|
|
border-radius: var(--radius);
|
2020-10-17 04:12:00 -07:00
|
|
|
|
|
|
|
> .header {
|
2022-06-22 04:47:53 -07:00
|
|
|
--height: 45px;
|
2021-02-26 20:08:34 -08:00
|
|
|
|
|
|
|
&.mini {
|
|
|
|
--height: 38px;
|
|
|
|
}
|
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
display: flex;
|
|
|
|
position: relative;
|
2020-10-18 00:10:28 -07:00
|
|
|
z-index: 1;
|
2020-10-17 04:12:00 -07:00
|
|
|
flex-shrink: 0;
|
|
|
|
user-select: none;
|
2021-02-26 20:08:34 -08:00
|
|
|
height: var(--height);
|
2022-06-26 03:41:21 -07:00
|
|
|
background: var(--windowHeader);
|
|
|
|
-webkit-backdrop-filter: var(--blur, blur(15px));
|
|
|
|
backdrop-filter: var(--blur, blur(15px));
|
2022-06-28 02:09:42 -07:00
|
|
|
//border-bottom: solid 1px var(--divider);
|
2022-06-22 04:47:53 -07:00
|
|
|
font-size: 95%;
|
2022-06-28 22:19:40 -07:00
|
|
|
font-weight: bold;
|
2020-10-17 04:12:00 -07:00
|
|
|
|
2021-10-08 06:03:06 -07:00
|
|
|
> .left, > .right {
|
2022-06-20 01:38:49 -07:00
|
|
|
> .button {
|
2021-10-08 06:03:06 -07:00
|
|
|
height: var(--height);
|
|
|
|
width: var(--height);
|
2020-10-17 04:12:00 -07:00
|
|
|
|
2021-10-08 06:03:06 -07:00
|
|
|
&:hover {
|
|
|
|
color: var(--fgHighlighted);
|
|
|
|
}
|
2022-06-20 01:38:49 -07:00
|
|
|
|
|
|
|
&.highlighted {
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
2020-10-17 04:12:00 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-23 19:34:24 -08:00
|
|
|
> .left {
|
2022-06-20 01:38:49 -07:00
|
|
|
margin-right: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .right {
|
2021-12-23 19:34:24 -08:00
|
|
|
min-width: 16px;
|
|
|
|
}
|
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
> .title {
|
|
|
|
flex: 1;
|
|
|
|
position: relative;
|
2021-02-26 20:08:34 -08:00
|
|
|
line-height: var(--height);
|
2020-10-17 04:12:00 -07:00
|
|
|
white-space: nowrap;
|
2021-03-02 05:57:16 -08:00
|
|
|
overflow: hidden;
|
2020-10-17 04:12:00 -07:00
|
|
|
text-overflow: ellipsis;
|
2020-10-19 03:29:04 -07:00
|
|
|
cursor: move;
|
2020-10-17 04:12:00 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .body {
|
|
|
|
flex: 1;
|
|
|
|
overflow: auto;
|
2022-06-26 03:41:21 -07:00
|
|
|
background: var(--panel);
|
2020-10-17 04:12:00 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .handle {
|
|
|
|
$size: 8px;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
&.top {
|
|
|
|
top: -($size);
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: $size;
|
|
|
|
cursor: ns-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.right {
|
|
|
|
top: 0;
|
|
|
|
right: -($size);
|
|
|
|
width: $size;
|
|
|
|
height: 100%;
|
|
|
|
cursor: ew-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.bottom {
|
|
|
|
bottom: -($size);
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: $size;
|
|
|
|
cursor: ns-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.left {
|
|
|
|
top: 0;
|
|
|
|
left: -($size);
|
|
|
|
width: $size;
|
|
|
|
height: 100%;
|
|
|
|
cursor: ew-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.top-left {
|
|
|
|
top: -($size);
|
|
|
|
left: -($size);
|
|
|
|
width: $size * 2;
|
|
|
|
height: $size * 2;
|
|
|
|
cursor: nwse-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.top-right {
|
|
|
|
top: -($size);
|
|
|
|
right: -($size);
|
|
|
|
width: $size * 2;
|
|
|
|
height: $size * 2;
|
|
|
|
cursor: nesw-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.bottom-right {
|
|
|
|
bottom: -($size);
|
|
|
|
right: -($size);
|
|
|
|
width: $size * 2;
|
|
|
|
height: $size * 2;
|
|
|
|
cursor: nwse-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.bottom-left {
|
|
|
|
bottom: -($size);
|
|
|
|
left: -($size);
|
|
|
|
width: $size * 2;
|
|
|
|
height: $size * 2;
|
|
|
|
cursor: nesw-resize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|