Skip to content
Merged
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
8 changes: 6 additions & 2 deletions src/ext/extension-page/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
const editorMinWidth = "20rem";
function sidebarSwitch() {
if (!sidebarHidden && !$items.find((i) => i.active)) {
log.add("Please select or create a new item first.", "info", true);
return;
}
sidebarHidden = !sidebarHidden;
}
Expand Down Expand Up @@ -168,7 +172,7 @@
cursor: col-resize;
position: fixed;
inset: 0;
z-index: 200;
z-index: 20;
}
.splitter {
Expand All @@ -182,7 +186,7 @@
left: calc(var(--sidebar-fixed-width) - var(--splitter-offset));
width: var(--splitter-width);
height: 100svh;
z-index: 201;
z-index: 21;
transition: background-color 0.2s ease-in-out;
&:hover,
Expand Down
6 changes: 3 additions & 3 deletions src/ext/extension-page/Components/Sidebar/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
}

async function activate(item) {
// if not in ready state or the item is already active
if (!$v4state.includes("ready") || item.active) return;
// if item is empty or already active
if (!item || item.active) return;

// check if there's a temp item and it's not the item to be activated
// can occur when user clicks a non-temp item while a temp item exists
Expand Down Expand Up @@ -228,7 +228,7 @@
title="Open settings"
{disabled}
/>
<Dropdown icon={iconPlus} title="New item" {disabled} right>
<Dropdown icon={iconPlus} title="New item" {disabled}>
<button on:click={() => newItem("js")}>New JS</button>
<button on:click={() => newItem("css")}>New CSS</button>
<button on:click={newRemote}>New Remote</button>
Expand Down