R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
|
|
|
<script setup lang="ts">
|
R Panels: This and Pins on the left, the selection on the right
The left panel is about the circuit you are in: This (challenge and
Check on top, problems, name, statistics, truth table, as a component,
transistors, tools) and Pins. The selection gets its own panel on the
right, there only while something is selected, with its settings and
actions such as making a component out of it. The bars follow the
canvas width and drop labels when it gets narrow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:38:17 +00:00
|
|
|
// A folding group in a side panel. It remembers, per group, whether you
|
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
|
|
|
// left it open, so the panel stays as short as you like it.
|
|
|
|
|
const props = defineProps<{ title: string; id: string; open?: boolean; /** Short note after the title, like a count. */ note?: string }>()
|
|
|
|
|
|
|
|
|
|
const KEY = `logigate:fold:${props.id}`
|
|
|
|
|
const isOpen = ref(props.open ?? false)
|
|
|
|
|
try {
|
|
|
|
|
const saved = localStorage.getItem(KEY)
|
|
|
|
|
if (saved !== null) isOpen.value = saved === '1'
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
|
|
function toggle() {
|
|
|
|
|
isOpen.value = !isOpen.value
|
|
|
|
|
try {
|
|
|
|
|
localStorage.setItem(KEY, isOpen.value ? '1' : '0')
|
|
|
|
|
} catch {}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="fold" :class="{ open: isOpen }">
|
|
|
|
|
<button class="fold-head" :aria-expanded="isOpen" @click="toggle">
|
|
|
|
|
<Icon name="lucide:chevron-right" class="fold-chev size-3.5" />
|
|
|
|
|
<span class="grow">{{ title }}</span>
|
|
|
|
|
<span v-if="note" class="fold-note">{{ note }}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<div v-if="isOpen" class="fold-body"><slot /></div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|