Improve the properties panel
This commit is contained in:
parent
bfcacb184f
commit
9712599f9b
2 changed files with 38 additions and 16 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted, watch } from 'vue'
|
import { ref, computed, onMounted, watch } from 'vue'
|
||||||
import PrimitivesSidebar from './PrimitivesSidebar.vue'
|
import PrimitivesSidebar from './PrimitivesSidebar.vue'
|
||||||
|
import PropertiesPanel from './PropertiesPanel.vue'
|
||||||
|
|
||||||
const STORAGE_KEY = 'rapidmodel-sidebar-state'
|
const STORAGE_KEY = 'rapidmodel-sidebar-state'
|
||||||
|
|
||||||
|
|
@ -63,9 +64,9 @@ onMounted(() => {
|
||||||
<slot name="left-sidebar" />
|
<slot name="left-sidebar" />
|
||||||
</PrimitivesSidebar>
|
</PrimitivesSidebar>
|
||||||
|
|
||||||
<aside class="right-sidebar">
|
<PropertiesPanel class="properties-panel">
|
||||||
<slot name="right-sidebar" />
|
<slot name="properties-panel" />
|
||||||
</aside>
|
</PropertiesPanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="status-bar">
|
<footer class="status-bar">
|
||||||
|
|
@ -119,18 +120,6 @@ onMounted(() => {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-sidebar {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: var(--sidebar-width);
|
|
||||||
background: rgba(30, 30, 46, 0.85);
|
|
||||||
border-left: 1px solid var(--color-border);
|
|
||||||
overflow-y: auto;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-bar {
|
.status-bar {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
height: var(--status-bar-height);
|
height: var(--status-bar-height);
|
||||||
|
|
@ -152,7 +141,7 @@ onMounted(() => {
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.left-sidebar,
|
.left-sidebar,
|
||||||
.right-sidebar {
|
.properties-panel {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
src/components/PropertiesPanel.vue
Normal file
33
src/components/PropertiesPanel.vue
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<aside class="properties-panel">
|
||||||
|
<div class="content">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.properties-panel {
|
||||||
|
position: absolute;
|
||||||
|
top: var(--space-md);
|
||||||
|
right: var(--space-md);
|
||||||
|
bottom: var(--space-md);
|
||||||
|
width: var(--sidebar-width);
|
||||||
|
background: rgba(30, 30, 46, 0.85);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: var(--space-sm);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue