✨ Publisher pack
This commit is contained in:
@@ -38,6 +38,15 @@ export default function App(): JSX.Element {
|
||||
console.error('[App] openStoryBible failed:', err)
|
||||
}
|
||||
}
|
||||
|
||||
const handleOpenPublisherPack = async (): Promise<void> => {
|
||||
try {
|
||||
const { path, content } = await window.api.openPublisherPack()
|
||||
setActiveFile(path, content)
|
||||
} catch (err) {
|
||||
console.error('[App] openPublisherPack failed:', err)
|
||||
}
|
||||
}
|
||||
const [sidebarOpen, setSidebarOpen] = useState(
|
||||
() => localStorage.getItem('sidebarOpen') !== 'false'
|
||||
)
|
||||
@@ -212,16 +221,23 @@ export default function App(): JSX.Element {
|
||||
<button
|
||||
className="sidebar-nav-btn"
|
||||
onClick={handleOpenStoryBible}
|
||||
title="Open Story Bible"
|
||||
title="Story Bible"
|
||||
>
|
||||
<span className="sidebar-nav-icon">📖</span>
|
||||
</button>
|
||||
<button
|
||||
className="sidebar-nav-btn"
|
||||
onClick={handleOpenPublisherPack}
|
||||
title="Publisher Pack"
|
||||
>
|
||||
<span className="sidebar-nav-label">Pack</span>
|
||||
</button>
|
||||
<button
|
||||
className={`sidebar-nav-btn${showSubmissions ? ' active' : ''}`}
|
||||
onClick={goSubmissions}
|
||||
title="Submissions"
|
||||
>
|
||||
<span className="sidebar-nav-icon">✉</span>
|
||||
<span className="sidebar-nav-label">Sub</span>
|
||||
</button>
|
||||
</div>
|
||||
<FileTree />
|
||||
|
||||
@@ -207,6 +207,15 @@
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.sidebar-nav-label {
|
||||
font-family: var(--font-sans);
|
||||
font-size: 9px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* ─── Editor area ──────────────────────────────────────────────── */
|
||||
.editor-area {
|
||||
grid-row: 2;
|
||||
|
||||
1
src/renderer/types/global.d.ts
vendored
1
src/renderer/types/global.d.ts
vendored
@@ -32,6 +32,7 @@ declare global {
|
||||
moveFile: (sourcePath: string, targetDirPath: string) => Promise<string>
|
||||
openStoryBible: () => Promise<{ path: string; content: string }>
|
||||
writeStoryBible: (content: string) => Promise<string>
|
||||
openPublisherPack: () => Promise<{ path: string; content: string }>
|
||||
onMenuAction: (handler: (action: string) => void) => () => void
|
||||
searchFiles: (query: string, options: SearchOptions) => Promise<SearchFileResult[]>
|
||||
replaceInFiles: (query: string, replacement: string, options: SearchOptions, filePaths: string[]) => Promise<string[]>
|
||||
|
||||
Reference in New Issue
Block a user