Skip to content

Commit

Permalink
use logseq settings modal
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrblock committed Jun 4, 2022
1 parent f893182 commit 3f60c4c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -147,6 +148,8 @@ function main(baseInfo: LSPluginBaseInfo) {
</a>
`,
});

logseq.useSettingsSchema(settingSchema);
}

// bootstrap
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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"
},
Expand Down
13 changes: 13 additions & 0 deletions setting-schema.ts
Original file line number Diff line number Diff line change
@@ -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 };

0 comments on commit 3f60c4c

Please sign in to comment.