feat: better layout in a lot of places

This commit is contained in:
2023-08-02 01:58:03 +02:00
parent ff3e7f6667
commit 3cfa2274a8
23 changed files with 208 additions and 110 deletions

View File

@ -23,7 +23,9 @@ export const menus: Record<string, Menu> = {
title: "Link:",
entries: [],
};
state.activeMenu.value = "input_link";
state.activeState.value = "input";
const unsub = state.commandInput.subscribe(async (value) => {
if (isValidUrl(value)) {

View File

@ -2,7 +2,7 @@ import { Signal } from "@preact/signals";
export type MenuState = {
activeMenu: Signal<string>;
activeState: Signal<"error" | "normal" | "loading">;
activeState: Signal<"input" | "error" | "normal" | "loading">;
commandInput: Signal<string>;
visible: Signal<boolean>;
menus: Record<string, Menu>;