Conflicts from PR #122 from @pngwyn

This commit is contained in:
Michael Shanks 2020-02-26 16:36:30 +00:00
parent a43ffdf2f2
commit c9b203bcbe
5 changed files with 38 additions and 27 deletions

View File

@ -56,7 +56,6 @@
height: 48px; height: 48px;
background: white; background: white;
padding: 0px 15px 0 1.8rem; padding: 0px 15px 0 1.8rem;
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;

View File

@ -37,7 +37,6 @@
appearance: none; appearance: none;
background: #fff; background: #fff;
border: 1px solid #ccc; border: 1px solid #ccc;
height: 35px;
} }
.arrow { .arrow {

View File

@ -35,13 +35,16 @@
$: templatesByComponent = groupBy(t => t.component)($store.templates) $: templatesByComponent = groupBy(t => t.component)($store.templates)
$: hierarchy = $store.hierarchy $: hierarchy = $store.hierarchy
$: libraryModules = $store.libraries $: libraryModules = $store.libraries
$: standaloneTemplates = pipe(templatesByComponent, [ $: standaloneTemplates = pipe(
templatesByComponent,
[
values, values,
flatten, flatten,
filter(t => !$store.components.some(c => c.name === t.component)), filter(t => !$store.components.some(c => c.name === t.component)),
map(t => ({ name: splitName(t.component).componentName, template: t })), map(t => ({ name: splitName(t.component).componentName, template: t })),
uniqBy(t => t.name), uniqBy(t => t.name),
]) ]
)
const addRootComponent = (component, allComponents) => { const addRootComponent = (component, allComponents) => {
const { libName } = splitName(component.name) const { libName } = splitName(component.name)
@ -122,7 +125,7 @@
</Select> </Select>
<div class="library-container"> <div class="library-container">
<ul> <!-- <ul>
<li> <li>
<button <button
class:selected={current_view === 'text'} class:selected={current_view === 'text'}
@ -144,7 +147,7 @@
<ImageIcon /> <ImageIcon />
</button> </button>
</li> </li>
</ul> </ul> -->
{#if componentLibrary} {#if componentLibrary}
{#each generate_components_list(componentLibrary.components) as component} {#each generate_components_list(componentLibrary.components) as component}
@ -221,9 +224,10 @@
} }
.library-container { .library-container {
padding: 0 0 10px 10px; padding: 0 0 10px 0;
flex: 1 1 auto; flex: 1 1 auto;
min-height: 0px; min-height: 0px;
margin-top: 20px;
} }
.component-container { .component-container {
@ -237,7 +241,7 @@
cursor: pointer; cursor: pointer;
border: 1px solid #ebebeb; border: 1px solid #ebebeb;
border-radius: 2px; border-radius: 2px;
margin: 10px 0; margin: 5px 0;
height: 40px; height: 40px;
box-sizing: border-box; box-sizing: border-box;
color: #163057; color: #163057;
@ -300,7 +304,7 @@
border-radius: 5px; border-radius: 5px;
} }
li button { /* li button {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: none; background: none;
@ -309,12 +313,12 @@
padding: 12px; padding: 12px;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
} } */
.selected { /* .selected {
color: var(--button-text); color: var(--button-text);
background: var(--background-button) !important; background: var(--background-button) !important;
} } */
.open { .open {
color: rgba(0, 85, 255, 1); color: rgba(0, 85, 255, 1);

View File

@ -21,18 +21,18 @@
{#if $store.currentFrontEndType === 'page' || $store.screens.length} {#if $store.currentFrontEndType === 'page' || $store.screens.length}
<div class="switcher"> <div class="switcher">
<button
class:selected={selected === PROPERTIES_TAB}
on:click={() => selectTab(PROPERTIES_TAB)}>
Properties
</button>
<button <button
class:selected={selected === COMPONENT_SELECTION_TAB} class:selected={selected === COMPONENT_SELECTION_TAB}
on:click={() => selectTab(COMPONENT_SELECTION_TAB)}> on:click={() => selectTab(COMPONENT_SELECTION_TAB)}>
Components Components
</button> </button>
<button
class:selected={selected === PROPERTIES_TAB}
on:click={() => selectTab(PROPERTIES_TAB)}>
Properties
</button>
</div> </div>
<div class="panel"> <div class="panel">
@ -56,13 +56,14 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 2rem 1.5rem 2rem 1.5rem; padding: 2rem 0;
} }
.switcher { .switcher {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 25px; margin-bottom: 25px;
padding: 0 1.5rem;
} }
.switcher > button { .switcher > button {
@ -86,5 +87,6 @@
flex: 1 1 auto; flex: 1 1 auto;
height: 0px; height: 0px;
overflow-y: auto; overflow-y: auto;
padding: 0 1.5rem 1.5rem 1.5rem;
} }
</style> </style>

View File

@ -119,9 +119,11 @@
.ui-nav { .ui-nav {
grid-column: 1; grid-column: 1;
background-color: var(--secondary5); background-color: var(--secondary5);
height: 100%; height: calc(100vh - 49px);
padding: 0 1.5rem 0rem 0; padding: 0;
overflow-y: auto; overflow: hidden;
display: flex;
flex-direction: column;
} }
.preview-pane { .preview-pane {
@ -209,4 +211,9 @@
margin-top: 1.5rem; margin-top: 1.5rem;
width: calc(100% + 1.5rem); width: calc(100% + 1.5rem);
} }
.components-list-container {
overflow: auto;
padding: 0 30px 0 0;
}
</style> </style>