Fix types
This commit is contained in:
@ -205,7 +205,8 @@ fn main() {
|
|||||||
{
|
{
|
||||||
_app.get_webview("main").unwrap().open_devtools();
|
_app.get_webview("main").unwrap().open_devtools();
|
||||||
}
|
}
|
||||||
_app.handle().plugin(tauri_plugin_updater::Builder::new().build())?;
|
_app.handle()
|
||||||
|
.plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.invoke_handler(tauri::generate_handler![
|
.invoke_handler(tauri::generate_handler![
|
||||||
|
@ -218,7 +218,7 @@ export const Toolbar = () => {
|
|||||||
onClick={() => commandBarSend({ type: 'Open' })}
|
onClick={() => commandBarSend({ type: 'Open' })}
|
||||||
className="rounded-r-full pr-4 self-stretch border-energy-10 hover:border-energy-10 dark:border-chalkboard-80 bg-energy-10/50 hover:bg-energy-10 dark:bg-chalkboard-80 dark:text-energy-10"
|
className="rounded-r-full pr-4 self-stretch border-energy-10 hover:border-energy-10 dark:border-chalkboard-80 bg-energy-10/50 hover:bg-energy-10 dark:bg-chalkboard-80 dark:text-energy-10"
|
||||||
>
|
>
|
||||||
{platform === 'darwin' ? '⌘K' : 'Ctrl+/'}
|
{platform === 'macos' ? '⌘K' : 'Ctrl+/'}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -54,7 +54,7 @@ export const AppHeader = ({
|
|||||||
>
|
>
|
||||||
Command Palette{' '}
|
Command Palette{' '}
|
||||||
<kbd className="bg-energy-10/50 dark:bg-chalkboard-100 dark:text-energy-10 inline-block px-1 py-0.5 border-energy-10 dark:border-chalkboard-90">
|
<kbd className="bg-energy-10/50 dark:bg-chalkboard-100 dark:text-energy-10 inline-block px-1 py-0.5 border-energy-10 dark:border-chalkboard-90">
|
||||||
{platform === 'darwin' ? '⌘K' : 'Ctrl+/'}
|
{platform === 'macos' ? '⌘K' : 'Ctrl+/'}
|
||||||
</kbd>
|
</kbd>
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
)}
|
)}
|
||||||
|
@ -120,7 +120,10 @@ function ProjectCard({
|
|||||||
}`}
|
}`}
|
||||||
</span>
|
</span>
|
||||||
<span className="text-chalkboard-60 text-xs">
|
<span className="text-chalkboard-60 text-xs">
|
||||||
Edited {getDisplayedTime(project.entrypointMetadata.mtime)}
|
Edited{' '}
|
||||||
|
{project.entrypointMetadata.mtime
|
||||||
|
? getDisplayedTime(project.entrypointMetadata.mtime)
|
||||||
|
: 'never'}
|
||||||
</span>
|
</span>
|
||||||
<div className="absolute z-10 bottom-2 right-2 flex gap-1 items-center opacity-0 group-hover:opacity-100 group-focus-within:opacity-100">
|
<div className="absolute z-10 bottom-2 right-2 flex gap-1 items-center opacity-0 group-hover:opacity-100 group-focus-within:opacity-100">
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
@ -17,23 +17,24 @@ const projectWellFormed = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
entrypointMetadata: {
|
entrypointMetadata: {
|
||||||
accessedAt: now,
|
atime: now,
|
||||||
blksize: 32,
|
blksize: 32,
|
||||||
blocks: 32,
|
blocks: 32,
|
||||||
createdAt: now,
|
birthtime: now,
|
||||||
dev: 1,
|
dev: 1,
|
||||||
gid: 1,
|
gid: 1,
|
||||||
ino: 1,
|
ino: 1,
|
||||||
isDir: false,
|
isDirectory: false,
|
||||||
isFile: true,
|
isFile: true,
|
||||||
isSymlink: false,
|
isSymlink: false,
|
||||||
mode: 1,
|
mode: 1,
|
||||||
modifiedAt: now,
|
mtime: now,
|
||||||
nlink: 1,
|
nlink: 1,
|
||||||
permissions: { readonly: false, mode: 1 },
|
readonly: false,
|
||||||
rdev: 1,
|
rdev: 1,
|
||||||
size: 32,
|
size: 32,
|
||||||
uid: 1,
|
uid: 1,
|
||||||
|
fileAttributes: null,
|
||||||
},
|
},
|
||||||
} satisfies ProjectWithEntryPointMetadata
|
} satisfies ProjectWithEntryPointMetadata
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ const ProjectSidebarMenu = ({
|
|||||||
<div className="flex flex-col items-start py-0.5">
|
<div className="flex flex-col items-start py-0.5">
|
||||||
<span className="hidden text-sm text-chalkboard-110 dark:text-chalkboard-20 whitespace-nowrap lg:block">
|
<span className="hidden text-sm text-chalkboard-110 dark:text-chalkboard-20 whitespace-nowrap lg:block">
|
||||||
{isTauri() && file?.name
|
{isTauri() && file?.name
|
||||||
? file.name.slice(file.name.lastIndexOf(sep) + 1)
|
? file.name.slice(file.name.lastIndexOf(sep()) + 1)
|
||||||
: APP_NAME}
|
: APP_NAME}
|
||||||
</span>
|
</span>
|
||||||
{isTauri() && project?.name && (
|
{isTauri() && project?.name && (
|
||||||
|
@ -25,7 +25,7 @@ export async function exportSave(data: ArrayBuffer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write the file.
|
// Write the file.
|
||||||
await writeFile(filePath, file.contents)
|
await writeFile(filePath, new Uint8Array(file.contents))
|
||||||
} else {
|
} else {
|
||||||
// Download the file to the user's computer.
|
// Download the file to the user's computer.
|
||||||
// Now we need to download the files to the user's downloads folder.
|
// Now we need to download the files to the user's downloads folder.
|
||||||
|
@ -22,7 +22,7 @@ export default function CmdK() {
|
|||||||
<h2 className="text-2xl font-bold">Command Bar</h2>
|
<h2 className="text-2xl font-bold">Command Bar</h2>
|
||||||
<p className="my-4">
|
<p className="my-4">
|
||||||
Press{' '}
|
Press{' '}
|
||||||
{platformName === 'darwin' ? (
|
{platformName === 'macos' ? (
|
||||||
<>
|
<>
|
||||||
<kbd>⌘</kbd> + <kbd>K</kbd>
|
<kbd>⌘</kbd> + <kbd>K</kbd>
|
||||||
</>
|
</>
|
||||||
|
Reference in New Issue
Block a user