mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 01:44:19 +01:00
linux webview change
This commit is contained in:
@@ -119,7 +119,7 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.GET_PUBLIC_KEY,
|
// checkPermission(context, AppType.WEB, code, AuthType.GET_PUBLIC_KEY,
|
||||||
// (app) {
|
// (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) {
|
// }, (app, signer) {
|
||||||
// print("confirm get pubkey");
|
// print("confirm get pubkey");
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
// var eventKind = eventObj["kind"];
|
// var eventKind = eventObj["kind"];
|
||||||
// if (eventKind is int) {
|
// if (eventKind is int) {
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.SIGN_EVENT,
|
// checkPermission(context, AppType.WEB, code, AuthType.SIGN_EVENT,
|
||||||
// eventKind: eventKind, authDetail: content, (app) {
|
// eventKind: eventKind, authDetail: content, (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) async {
|
// }, (app, signer) async {
|
||||||
// var tags = eventObj["tags"];
|
// var tags = eventObj["tags"];
|
||||||
@@ -184,23 +184,23 @@
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.GET_RELAYS, (app) {
|
// checkPermission(context, AppType.WEB, code, AuthType.GET_RELAYS, (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) {
|
// }, (app, signer) {
|
||||||
// // TODO handle getRelays
|
// // TODO handle getRelays
|
||||||
// // var app = appProvider.getApp(AppType.WEB, code);
|
// var app = appProvider.getApp(AppType.WEB, code);
|
||||||
// // if (app != null) {
|
// if (app != null) {
|
||||||
// // var relayMaps = {};
|
// var relayMaps = {};
|
||||||
// // var relayAddrs = relayProvider.relayAddrs;
|
// // var relayAddrs = relayProvider.relayAddrs;
|
||||||
// // for (var relayAddr in relayAddrs) {
|
// // for (var relayAddr in relayAddrs) {
|
||||||
// // relayMaps[relayAddr] = {"read": true, "write": true};
|
// // relayMaps[relayAddr] = {"read": true, "write": true};
|
||||||
// // }
|
// // }
|
||||||
// // var resultStr = jsonEncode(relayMaps);
|
// var resultStr = jsonEncode(relayMaps);
|
||||||
// // resultStr = resultStr.replaceAll("\"", "\\\"");
|
// resultStr = resultStr.replaceAll("\"", "\\\"");
|
||||||
// // var script =
|
// var script =
|
||||||
// // "window.nostr.callback(\"$resultId\", JSON.parse(\"$resultStr\"));";
|
// "window.nostr.callback(\"$resultId\", JSON.parse(\"$resultStr\"));";
|
||||||
// // webViewController!.evaluateJavascript(source: script);
|
// controller.evaluateJavascript(script);
|
||||||
// // }
|
// }
|
||||||
// });
|
// });
|
||||||
// },)
|
// },)
|
||||||
// );
|
// );
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.NIP04_ENCRYPT,
|
// checkPermission(context, AppType.WEB, code, AuthType.NIP04_ENCRYPT,
|
||||||
// (app) {
|
// (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) async {
|
// }, (app, signer) async {
|
||||||
// var resultStr = await signer.encrypt(pubkey, plaintext);
|
// var resultStr = await signer.encrypt(pubkey, plaintext);
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.NIP04_DECRYPT,
|
// checkPermission(context, AppType.WEB, code, AuthType.NIP04_DECRYPT,
|
||||||
// (app) {
|
// (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) async {
|
// }, (app, signer) async {
|
||||||
// var app = appProvider.getApp(AppType.WEB, code);
|
// var app = appProvider.getApp(AppType.WEB, code);
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.NIP44_ENCRYPT,
|
// checkPermission(context, AppType.WEB, code, AuthType.NIP44_ENCRYPT,
|
||||||
// (app) {
|
// (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) async {
|
// }, (app, signer) async {
|
||||||
// var resultStr = await signer.nip44Encrypt(pubkey, plaintext);
|
// var resultStr = await signer.nip44Encrypt(pubkey, plaintext);
|
||||||
@@ -317,7 +317,7 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// checkPermission(context, AppType.WEB, code, AuthType.NIP44_DECRYPT,
|
// checkPermission(context, AppType.WEB, code, AuthType.NIP44_DECRYPT,
|
||||||
// (app) {
|
// (app, signer) {
|
||||||
// nip07Reject(resultId, "Forbid");
|
// nip07Reject(resultId, "Forbid");
|
||||||
// }, (app, signer) async {
|
// }, (app, signer) async {
|
||||||
// var resultStr = await signer.nip44Decrypt(pubkey, ciphertext);
|
// var resultStr = await signer.nip44Decrypt(pubkey, ciphertext);
|
||||||
|
|||||||
Reference in New Issue
Block a user