mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-04 20:17:03 +00:00
app store scripts
This commit is contained in:
1 parent
585933c8a1
commit
e8772e6699
6 files changed
+134
-15
No files matched your search
@@ -87,7 +87,7 @@ export function BackupSettings() {
|
||||
) : !connected ? (
|
||||
<div className="backup-intro">
|
||||
<p>
|
||||
Connect Google Drive to keep a private backup of every book. margin only ever sees the files it
|
||||
Connect Google Drive to keep a private backup of every project. margin only ever sees the files it
|
||||
creates in a <strong>margin</strong> folder, never the rest of your Drive.
|
||||
</p>
|
||||
<button className="btn-primary" disabled={working} onClick={connect}>
|
||||
|
||||
+2
-2
@@ -30,10 +30,10 @@ export async function loadBook(id: string): Promise<Book> {
|
||||
try {
|
||||
book = JSON.parse(contents) as Book;
|
||||
} catch {
|
||||
throw new Error("the book file is corrupt or unreadable");
|
||||
throw new Error("the project file is corrupt or unreadable");
|
||||
}
|
||||
if (schemaVersion(book.schema) > SCHEMA_VERSION) {
|
||||
throw new Error("this book was made with a newer version of Margin; update the app to open it");
|
||||
throw new Error("this project was made with a newer version of Margin; update the app to open it");
|
||||
}
|
||||
return book;
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { save, open } from "@tauri-apps/plugin-dialog";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import type { Book } from "./model/book";
|
||||
|
||||
const FILTERS = [{ name: "margin book", extensions: ["margin"] }];
|
||||
const FILTERS = [{ name: "margin project", extensions: ["margin"] }];
|
||||
|
||||
export async function chooseSavePath(book: Book): Promise<string | null> {
|
||||
return save({ filters: FILTERS, defaultPath: `${book.metadata.title || "Untitled"}.margin` });
|
||||
|
||||
Reference in new issue
Block a user