✨ recent project
This commit is contained in:
@@ -88,6 +88,8 @@ export default function App(): JSX.Element {
|
||||
} else if (action === 'openProject') {
|
||||
const picked = await window.api.pickProjectFolder()
|
||||
if (picked) await switchProject(picked)
|
||||
} else if (action.startsWith('openRecent:')) {
|
||||
await switchProject(action.slice('openRecent:'.length))
|
||||
} else if (action === 'exportPDF') {
|
||||
if (activeFilePath && activeFileContent) {
|
||||
const fileName = activeFilePath.split('/').pop()?.replace(/\.md$/, '') ?? 'document'
|
||||
|
||||
@@ -100,20 +100,6 @@ export function SettingsDialog({ onClose, onProjectChanged, isSetup }: Props): J
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="settings-field">
|
||||
<label className="settings-label" htmlFor="settings-project-title">Project Title</label>
|
||||
<input
|
||||
id="settings-project-title"
|
||||
className="settings-input"
|
||||
type="text"
|
||||
value={projectTitle}
|
||||
onChange={(e) => setProjectTitle(e.target.value)}
|
||||
placeholder="My Novel"
|
||||
spellCheck={false}
|
||||
/>
|
||||
<p className="settings-hint">Used as the title in PDF exports. Defaults to the project folder name if left blank.</p>
|
||||
</div>
|
||||
|
||||
<div className="settings-field">
|
||||
<label className="settings-label" htmlFor="settings-api-key">Anthropic API Key</label>
|
||||
<input
|
||||
@@ -131,6 +117,20 @@ export function SettingsDialog({ onClose, onProjectChanged, isSetup }: Props): J
|
||||
|
||||
<div className="settings-section-divider"><span>Manuscript</span></div>
|
||||
|
||||
<div className="settings-field">
|
||||
<label className="settings-label" htmlFor="settings-project-title">Project Title</label>
|
||||
<input
|
||||
id="settings-project-title"
|
||||
className="settings-input"
|
||||
type="text"
|
||||
value={projectTitle}
|
||||
onChange={(e) => setProjectTitle(e.target.value)}
|
||||
placeholder="My Novel"
|
||||
spellCheck={false}
|
||||
/>
|
||||
<p className="settings-hint">Used as the title in PDF exports. Defaults to the project folder name if left blank.</p>
|
||||
</div>
|
||||
|
||||
<div className="settings-field">
|
||||
<label className="settings-label" htmlFor="settings-author-name">Author Name</label>
|
||||
<input
|
||||
@@ -201,7 +201,7 @@ export function SettingsDialog({ onClose, onProjectChanged, isSetup }: Props): J
|
||||
</div>
|
||||
|
||||
<div className="settings-footer">
|
||||
<span className="settings-config-path">Config: ~/.hohoff/config.json</span>
|
||||
<span className="settings-config-path">Global: ~/.hohoff/config.json · Project: .hohoff/project.json</span>
|
||||
<div className="settings-footer-actions">
|
||||
{!isSetup && (
|
||||
<button className="settings-btn settings-btn--secondary" onClick={onClose}>Cancel</button>
|
||||
|
||||
Reference in New Issue
Block a user