Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions icons/copyLine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions icons/newFile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/newGrid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions icons/newLineLink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 15 additions & 10 deletions icons/newList.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions src/svelte/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,20 @@ limitations under the License.

/* Table Stuff */
:global(table) {
/* border: 2px solid #252526; */
/* background-color: var(--vscode-tab-inactiveBackground); */
width: 100%;
text-align: left;
border-collapse: collapse;
background: var(--vscode-editor-background);
}
:global(table td) {
border:3px solid #252526;
padding: 0px;
border-right: 1px solid var(--vscode-panel-border);
border-left: 1px solid var(--vscode-panel-border);
padding: 0px 3px;
/* width: 50% */
}
:global(table td) {
border:3px solid #252526;
padding: 0px;
/* width: 50% */
:global(table tr:nth-child(even)) {
background-color: var(--vscode-tree-tableOddRowsBackground);
}
:global(table tbody td) {
font-size: 13px;
Expand All @@ -187,10 +187,14 @@ limitations under the License.
padding: 5px;
}
:global(table th) {
background: #252526;
border-right: 1px solid var(--vscode-panel-border);
border-left: 1px solid var(--vscode-panel-border);
background: var(--vscode-editor-background);
font-size: 13px;
font-weight: bold;
text-align: left;
position: sticky;
top: 0;
}

</style>
76 changes: 43 additions & 33 deletions src/svelte/Depot/Depot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -781,31 +781,33 @@ function selectedSheetEdit() {
{/if}
{/each}
{/if}
<div>
{#each data.sheets as sheet}
{#if !sheet.hidden}
<button class="sheetButton {data.sheets.indexOf(sheet) == selectedSheet ? "selected" : ""}" title="Select sheet" on:click={focusSheet(data.sheets.indexOf(sheet))} disabled={editorConfig.active}>{sheet.name}</button>
<div class="sheets">
<div>
{#each data.sheets as sheet}
{#if !sheet.hidden}
<button class="sheetButton {data.sheets.indexOf(sheet) == selectedSheet ? "selected" : ""}" title="Select sheet" on:click={focusSheet(data.sheets.indexOf(sheet))} disabled={editorConfig.active}>{sheet.name}</button>
{/if}
{/each}
</div>
<DepotConfigurator debug={debug} data={editorConfig.active ? editorData : {}} config={editorConfig} on:message={handleConfigUpdate}/>
{#if !editorConfig.active}
<!-- hide the table if editing a field to prevent sending the sheetupdate -->
<DepotSheet debug={debug}
showLineGUIDs={showLineGUIDs}
previewDisclosedFields={previewDisclosedFields}
showNestedNames={showNestedNames}
showNestedPaths={showNestedPaths}
allowSchemaEditing={allowSchemaEditing}
allowAddRemoveItems={allowAddRemoveItems}
bind:fullData={data}
bind:sheetData={data.sheets[selectedSheet]}
bind:inputLineData={data.sheets[selectedSheet].lines}
depotInfo={depotFileInfo}
on:message={handleTableAction}
bind:listVisibility={listVisibility}
baseDataPath={data.sheets[selectedSheet].name}/>
{/if}
{/each}
</div>
<DepotConfigurator debug={debug} data={editorConfig.active ? editorData : {}} config={editorConfig} on:message={handleConfigUpdate}/>
{#if !editorConfig.active}
<!-- hide the table if editing a field to prevent sending the sheetupdate -->
<DepotSheet debug={debug}
showLineGUIDs={showLineGUIDs}
previewDisclosedFields={previewDisclosedFields}
showNestedNames={showNestedNames}
showNestedPaths={showNestedPaths}
allowSchemaEditing={allowSchemaEditing}
allowAddRemoveItems={allowAddRemoveItems}
bind:fullData={data}
bind:sheetData={data.sheets[selectedSheet]}
bind:inputLineData={data.sheets[selectedSheet].lines}
depotInfo={depotFileInfo}
on:message={handleTableAction}
bind:listVisibility={listVisibility}
baseDataPath={data.sheets[selectedSheet].name}/>
{/if}
{/if}
{/if}

Expand All @@ -816,16 +818,20 @@ function selectedSheetEdit() {
{/if}

<style>
.sheets {
background-color: var(--vscode-sideBar-background);
}

.buttonIcon {
background-color: #3A3A3A;
background-color: var(--vscode-button-background);
border: none;
color: white;
color: var(--vscode-button-foreground);
display: inline-block;
cursor: pointer;
}

.buttonIcon:hover {
background-color: #2A2D2E;
background-color: var(--vscode-button-hoverBackground);
}

.buttonIcon:focus {
Expand All @@ -845,23 +851,27 @@ function selectedSheetEdit() {
opacity: 40%;
}
.buttonIcon:disabled:hover {
background-color: #3A3A3A;
background-color: var(--vscode-button-background);
}

.sheetButton {
background-color: #3A3A3A;
border: none;
color: white;
background-color: var(--vscode-tab-inactiveBackground);
border: 0px;
border-right: 1px solid var(--vscode-tab-border);
color: var(--vscode-tab-inactiveForeground);
display: inline-block;
cursor: pointer;
margin: 0px 5px 0px 0px;
margin: 0px;
padding: 8px 8px 8px 8px;
}

.sheetButton:hover {
background-color: #252526;
background-color: var(--vscode-tab-unfocusedHoverBackground);
color: var(--vscode-tab-unfocusedHoverForeground);
}
.sheetButton.selected {
background-color: #252526;
background-color: var(--vscode-tab-activeBackground);
color: var(--vscode-tab-activeForeground);
}
.sheetButton:focus {
outline: none;
Expand Down
7 changes: 4 additions & 3 deletions src/svelte/Depot/DepotSheet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,16 @@ function validateID(event,line) {
{/if}

<style>

.buttonIcon {
background-color: #3A3A3A;
background-color: var(--vscode-button-background);
border: none;
color: white;
color: var(--vscode-button-foreground);
display: inline-block;
cursor: pointer;
}
.buttonIcon:hover {
background-color: #2A2D2E;
background-color: var(--vscode-button-hoverBackground);
}
.buttonIcon:focus {
outline: none;
Expand Down
8 changes: 3 additions & 5 deletions src/svelte/Fields/LongTextField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ export let data;
box-sizing: border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing: border-box;
border: 0px;
font-size: 13px;
border-width: 0px;
background-color: #3c3c3c;
color: #f0f0f0;
border: 1px solid var(--vscode-input-border);
background-color: var(--vscode-input-background);
color: var(--vscode-input-foreground);
width: 100%;
height: 100%;
box-sizing: border-box;
}
</style>
8 changes: 3 additions & 5 deletions src/svelte/Fields/NumberField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ export let max;
box-sizing: border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing: border-box;
border: 0px;
font-size: 13px;
border-width: 0px;
background-color: #3c3c3c;
color: #f0f0f0;
border: 1px solid var(--vscode-input-border);
background-color: var(--vscode-input-background);
color: var(--vscode-input-foreground);
width: 100%;
height: 100%;
box-sizing: border-box;
}
</style>
8 changes: 3 additions & 5 deletions src/svelte/Fields/TextField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
box-sizing: border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing: border-box;
border: 0px;
font-size: 13px;
border-width: 0px;
background-color: #3c3c3c;
color: #f0f0f0;
border: 1px solid var(--vscode-input-border);
background-color: var(--vscode-input-background);
color: var(--vscode-input-foreground);
width: 100%;
height: 100%;
box-sizing: border-box;
}
</style>