app store scripts

This commit is contained in:
pj committed 2026-09-01 22:32:34 +05:30
1 parent 585933c8a1
commit e8772e6699
6 files changed
+134 -15

No files matched your search

+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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` });