Skip to content

Commit

Permalink
Merge pull request #21 from Zuoqiu-Yingyi/dev
Browse files Browse the repository at this point in the history
chore: release v0.2.1
  • Loading branch information
Zuoqiu-Yingyi authored Nov 30, 2023
2 parents 5d85179 + 759a92e commit 04e96b6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

env:
PACKAGE_NAME: keepass
PACKAGE_VERSION: 0.2.0
PACKAGE_VERSION: 0.2.1

jobs:
release-please:
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "keepass",
"private": true,
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -16,17 +16,17 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.6",
"@sveltejs/vite-plugin-svelte": "^2.5.3",
"@tsconfig/svelte": "^5.0.2",
"@types/lodash": "^4.14.200",
"@types/lodash": "^4.14.202",
"idb": "^7.1.1",
"keeweb-plugin": "^0.1.12",
"less": "^4.2.0",
"svelte": "^4.2.2",
"svelte-check": "^3.5.2",
"svelte": "^4.2.7",
"svelte-check": "^3.6.2",
"svelte-preprocess-less": "^0.4.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"typescript": "^5.3.2",
"vite": "^4.5.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "keepass",
"author": "Zuoqiu Yingyi",
"url": "https://github.com/Zuoqiu-Yingyi/siyuan-plugin-keepass",
"version": "0.2.0",
"version": "0.2.1",
"minAppVersion": "2.10.3",
"backends": [
"all"
Expand Down
21 changes: 14 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import type {
TDBStoreName,
} from "./types/idb-schema";
import { src2url } from "@workspace/utils/misc/url";
import { trimPrefix } from "@workspace/utils/misc/string";

declare var globalThis: ISiyuanGlobal;

Expand Down Expand Up @@ -288,11 +289,16 @@ export default class KeepassPlugin extends siyuan.Plugin {
label: this.i18n.menu.command.openKeeWebWindow.text,
click: () => this.openKeeWebWindow(false),
});
menu.open({
x: globalThis.siyuan.coordinates.pageX,
y: globalThis.siyuan.coordinates.pageY,
isLeft: true,
});
if (FLAG_MOBILE) {
menu.fullscreen();
}
else {
menu.open({
x: globalThis.siyuan?.coordinates?.pageX ?? 0,
y: globalThis.siyuan?.coordinates?.pageY ?? 0,
isLeft: true,
});
}
},
});
}
Expand Down Expand Up @@ -419,7 +425,8 @@ export default class KeepassPlugin extends siyuan.Plugin {
const local_storage_keys = Object.keys(local_storage);

const entries = sync1<string>(local_siyuan_keys, local_storage_keys);
this.logger.debug(entries);
// this.logger.debug(entries);

entries.delete.forEach(entry => globalThis.localStorage.removeItem(entry));
this.setLocalStorageItems(this.local);
return local_siyuan;
Expand Down Expand Up @@ -856,7 +863,7 @@ export default class KeepassPlugin extends siyuan.Plugin {
title: "KeeWeb",
id: this.CUSTOM_TAB_ID_KEEWEB,
data: {
src: this.KEEWEB_INDEX_URL.href,
src: trimPrefix(this.KEEWEB_INDEX_URL.href, globalThis.document.baseURI),
title: "KeeWeb",
},
},
Expand Down

0 comments on commit 04e96b6

Please # to comment.