From 3f60c4cd0f1bdf0be7d3101f38cb4c03fa368025 Mon Sep 17 00:00:00 2001 From: Scott Block Date: Fri, 3 Jun 2022 23:29:53 -0400 Subject: [PATCH] use logseq settings modal --- index.ts | 3 +++ package.json | 4 ++-- setting-schema.ts | 13 +++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 setting-schema.ts diff --git a/index.ts b/index.ts index cd50d0f..bca9eb7 100644 --- a/index.ts +++ b/index.ts @@ -4,6 +4,7 @@ import { loadPtnData, markItemSynced } from "./ptn"; import { format } from "date-fns"; import { FeedItem, itemToNode, PtnNode } from "ptn-helpers"; import { LSPluginBaseInfo, IBatchBlock } from "@logseq/libs/dist/LSPlugin.user"; +import { settingSchema } from "./setting-schema"; /** * main entry @@ -147,6 +148,8 @@ function main(baseInfo: LSPluginBaseInfo) { `, }); + + logseq.useSettingsSchema(settingSchema); } // bootstrap diff --git a/package.json b/package.json index f64c955..5da5676 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phonetonote-logseq", - "version": "0.2.10", + "version": "0.2.11", "description": "sync phonetonote messages to logseq", "main": "dist/index.html", "targets": { @@ -22,7 +22,7 @@ "icon": "./icon.png" }, "dependencies": { - "@logseq/libs": "^0.0.1-alpha.33", + "@logseq/libs": "^0.0.6", "date-fns": "^2.27.0", "ptn-helpers": "^0.0.13" }, diff --git a/setting-schema.ts b/setting-schema.ts new file mode 100644 index 0000000..8b5ae6d --- /dev/null +++ b/setting-schema.ts @@ -0,0 +1,13 @@ +import { SettingSchemaDesc } from "@logseq/libs/dist/LSPlugin"; + +const settingSchema: SettingSchemaDesc[] = [ + { + key: "ptn_key", + title: "ptn key", + description: "you ptn key, grab it from the phonetonote dashboard", + type: "string", + default: "", + }, +]; + +export { settingSchema };