revert to alpha10, with windows fix

Niko PLP 1 year ago
parent c420c4728c
commit 7b98db1fc8
  1. 723
      Cargo.lock
  2. 8
      ng-app/README.md
  3. 4
      ng-app/package.json
  4. 9
      ng-app/src-tauri/Cargo.toml
  5. 6
      ng-app/src/App.svelte
  6. 7
      ng-app/src/routes/WalletCreate.svelte
  7. 4
      ngaccount/src/main.rs
  8. 6
      ngaccount/web/index.html
  9. 4
      ngaccount/web/package.json
  10. 23
      ngaccount/web/pnpm-lock.yaml
  11. 4
      ngaccount/web/src/routes/Create.svelte
  12. 23
      pnpm-lock.yaml

723
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -15,7 +15,7 @@ cd ../ng-app
```
```
cargo install tauri-cli --version "^2.0.0-alpha"
cargo install tauri-cli --version "=2.0.0-alpha.10" --frozen
npm install -g pnpm
pnpm install
```
@ -59,11 +59,11 @@ to run the dev env :
```
## on macos
cargo tauri dev
cargo tauri dev --no-watch
## on linux
cargo tauri dev --target x86_64-unknown-linux-gnu
cargo tauri dev --no-watch --target x86_64-unknown-linux-gnu
## on win
cargo tauri dev --target x86_64-pc-windows-msvc
cargo tauri dev --no-watch --target x86_64-pc-windows-msvc
```
to build the production app installer :

@ -17,8 +17,8 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"@tauri-apps/api": "2.0.0-alpha.6",
"@tauri-apps/plugin-window": "2.0.0-alpha.1",
"@tauri-apps/api": "2.0.0-alpha.5",
"@tauri-apps/plugin-window": "2.0.0-alpha.0",
"async-proxy": "^0.4.1",
"classnames": "^2.3.2",
"flowbite": "^1.6.5",

@ -14,17 +14,20 @@ crate-type = ["staticlib", "cdylib", "rlib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "2.0.0-alpha.5", features = [] }
tauri-build = { version = "=2.0.0-alpha.6", features = [] }
tauri-macros = { version = "=2.0.0-alpha.6" }
tauri-codegen = { version = "=2.0.0-alpha.6" }
tauri-utils = { version = "=2.0.0-alpha.6" }
[dependencies]
tauri = { version = "2.0.0-alpha.11", features = [] }
tauri = { git = "https://git.nextgraph.org/NextGraph/tauri.git", branch="alpha.10-nextgraph", features = [] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
p2p-repo = { path = "../../p2p-repo" }
p2p-net = { path = "../../p2p-net" }
ng-wallet = { path = "../../ng-wallet" }
async-std = { version = "1.12.0", features = ["attributes", "unstable"] }
tauri-plugin-window = "2.0.0-alpha.1"
tauri-plugin-window = { git = "https://git.nextgraph.org/NextGraph/plugins-workspace.git", branch="window-alpha.0-nextgraph" }
[features]
# this feature is used for production builds or when `devPath` points to the filesystem

@ -57,15 +57,15 @@
let window_api = await import("@tauri-apps/plugin-window");
let event_api = await import("@tauri-apps/api/event");
let main = window_api.Window.getByLabel("main");
let main = window_api.WebviewWindow.getByLabel("main");
unsub_main_close = await main.onCloseRequested(async (event) => {
console.log("onCloseRequested main");
await event_api.emit("close_all", {});
let registration = window_api.Window.getByLabel("registration");
let registration = window_api.WebviewWindow.getByLabel("registration");
if (registration) {
await registration.close();
}
let viewer = window_api.Window.getByLabel("viewer");
let viewer = window_api.WebviewWindow.getByLabel("viewer");
if (viewer) {
await viewer.close();
}

@ -323,7 +323,7 @@
async (event) => {
console.log("got accepted with payload", event.payload);
unsub_register();
let reg_popup = window_api.Window.getByLabel("registration");
let reg_popup = window_api.WebviewWindow.getByLabel("registration");
await reg_popup.close();
registration_success = bsp_name;
invitation = await ng.decode_invitation(event.payload.invite);
@ -334,11 +334,12 @@
if (event.payload) registration_error = event.payload.error;
else intro = true;
unsub_register();
let reg_popup = window_api.Window.getByLabel("registration");
let reg_popup = window_api.WebviewWindow.getByLabel("registration");
await reg_popup.close();
});
await tick();
let reg_popup = window_api.Window.getByLabel("registration");
await new Promise((resolve) => setTimeout(resolve, 1000));
let reg_popup = window_api.WebviewWindow.getByLabel("registration");
unsub_register_close = await reg_popup.onCloseRequested(async (event) => {
console.log("onCloseRequested");
intro = true;

@ -262,14 +262,14 @@ async fn main() -> anyhow::Result<()> {
#[cfg(debug_assertions)]
"default-src 'self' data:; connect-src ipc: https://ipc.localhost 'self' http://192.168.192.2:3031",
#[cfg(not(debug_assertions))]
"default-src 'self' data: 'unsafe-inline'; connect-src ipc: https://ipc.localhost 'self'",
"default-src 'self' data:; connect-src ipc: https://ipc.localhost 'self'",
),
);
let static_files = warp::get()
.and(warp_embed::embed(&Static))
.with(warp::reply::with::headers(headers))
//.with(warp::reply::with::headers(headers))
.boxed();
let mut cors = warp::cors()

@ -56,12 +56,6 @@
<body>
<div id="app"></div>
<script>
window.__TAURI__.convertFileSrc = function convertFileSrc(filePath, protocol = 'asset') {
const path = encodeURIComponent(filePath)
return `${protocol}://localhost/${path}`
}
</script>
<script type="module" src="/src/main.js"></script>
</body>
</html>

@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.6",
"@tauri-apps/plugin-window": "2.0.0-alpha.1",
"@tauri-apps/api": "2.0.0-alpha.5",
"@tauri-apps/plugin-window": "2.0.0-alpha.0",
"flowbite": "^1.6.5",
"flowbite-svelte": "^0.37.1",
"svelte-spa-router": "^3.3.0"

@ -2,8 +2,8 @@ lockfileVersion: 5.4
specifiers:
'@sveltejs/vite-plugin-svelte': ^2.0.4
'@tauri-apps/api': 2.0.0-alpha.6
'@tauri-apps/plugin-window': 2.0.0-alpha.1
'@tauri-apps/api': 2.0.0-alpha.5
'@tauri-apps/plugin-window': 2.0.0-alpha.0
autoprefixer: ^10.4.14
cross-env: ^7.0.3
flowbite: ^1.6.5
@ -18,8 +18,8 @@ specifiers:
vite-plugin-svelte-svg: ^2.2.1
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
'@tauri-apps/plugin-window': 2.0.0-alpha.1
'@tauri-apps/api': 2.0.0-alpha.5
'@tauri-apps/plugin-window': 2.0.0-alpha.0
flowbite: 1.6.6
flowbite-svelte: 0.37.5_svelte@3.59.1
svelte-spa-router: 3.3.0
@ -336,15 +336,20 @@ packages:
- supports-color
dev: true
/@tauri-apps/api/2.0.0-alpha.6:
resolution: {integrity: sha512-ZMOc3eu9amwvkC6M69h3hWt4/EsFaAXmtkiw4xd2LN59/lTb4ZQiVfq2QKlRcu1rj3n/Tcr7U30ZopvHwXBGIg==}
/@tauri-apps/api/2.0.0-alpha.4:
resolution: {integrity: sha512-gWe5fFHbwFM+dmdDPtlDvVDVtoMneGRM+S8mECevWhKpXYxId0yxznE56YGAvPSJXC3vgsXw16mOmkTnEVKnaw==}
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
dev: false
/@tauri-apps/plugin-window/2.0.0-alpha.1:
resolution: {integrity: sha512-dFOAgal/3Txz3SQ+LNQq0AK1EPC+acdaFlwPVB/6KXUZYmaFleIlzgxDVoJCQ+/xOhxvYrdQaFLefh0I/Kldbg==}
/@tauri-apps/api/2.0.0-alpha.5:
resolution: {integrity: sha512-OqysC4c819itGxic50RoDMrmd+ofX+MMNkXKeRS0BV2rkKqrnuV17o3TrQXFI1xs/kXRmmPC+3Y42P9Y5uNvRg==}
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
dev: false
/@tauri-apps/plugin-window/2.0.0-alpha.0:
resolution: {integrity: sha512-ZXFXOu9m8QiDB8d8LFFgwcfxIAbr0bhzj06YvmZDB3isuVtlFP9EyU4D+zmumWEWvNN2XP7xgpn68ivOVhmNNQ==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
'@tauri-apps/api': 2.0.0-alpha.4
dev: false
/@trysound/sax/0.2.0:

@ -58,7 +58,7 @@
error = "Closing due to " + (result.error || "an error");
}
let window_api = await import("@tauri-apps/plugin-window");
let main = window_api.Window.getByLabel("main");
let main = window_api.WebviewWindow.getByLabel("main");
if (main) {
await main.emit("error", result);
} else {
@ -79,7 +79,7 @@
// @ts-ignore
if (window.__TAURI__) {
let window_api = await import("@tauri-apps/plugin-window");
let main = window_api.Window.getByLabel("main");
let main = window_api.WebviewWindow.getByLabel("main");
if (main) {
await main.emit("accepted", result);
} else {

@ -9,9 +9,9 @@ importers:
specifiers:
'@popperjs/core': ^2.11.8
'@sveltejs/vite-plugin-svelte': ^2.0.0
'@tauri-apps/api': 2.0.0-alpha.6
'@tauri-apps/api': 2.0.0-alpha.5
'@tauri-apps/cli': 2.0.0-alpha.11
'@tauri-apps/plugin-window': 2.0.0-alpha.1
'@tauri-apps/plugin-window': 2.0.0-alpha.0
'@tsconfig/svelte': ^3.0.0
'@types/node': ^18.7.10
async-proxy: ^0.4.1
@ -39,8 +39,8 @@ importers:
vite-plugin-wasm: ^3.2.2
dependencies:
'@popperjs/core': 2.11.8
'@tauri-apps/api': 2.0.0-alpha.6
'@tauri-apps/plugin-window': 2.0.0-alpha.1
'@tauri-apps/api': 2.0.0-alpha.5
'@tauri-apps/plugin-window': 2.0.0-alpha.0
async-proxy: 0.4.1
classnames: 2.3.2
flowbite: 1.6.5
@ -502,8 +502,13 @@ packages:
'@swc/core-win32-x64-msvc': 1.3.62
dev: false
/@tauri-apps/api/2.0.0-alpha.6:
resolution: {integrity: sha512-ZMOc3eu9amwvkC6M69h3hWt4/EsFaAXmtkiw4xd2LN59/lTb4ZQiVfq2QKlRcu1rj3n/Tcr7U30ZopvHwXBGIg==}
/@tauri-apps/api/2.0.0-alpha.4:
resolution: {integrity: sha512-gWe5fFHbwFM+dmdDPtlDvVDVtoMneGRM+S8mECevWhKpXYxId0yxznE56YGAvPSJXC3vgsXw16mOmkTnEVKnaw==}
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
dev: false
/@tauri-apps/api/2.0.0-alpha.5:
resolution: {integrity: sha512-OqysC4c819itGxic50RoDMrmd+ofX+MMNkXKeRS0BV2rkKqrnuV17o3TrQXFI1xs/kXRmmPC+3Y42P9Y5uNvRg==}
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
dev: false
@ -614,10 +619,10 @@ packages:
'@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.11
dev: true
/@tauri-apps/plugin-window/2.0.0-alpha.1:
resolution: {integrity: sha512-dFOAgal/3Txz3SQ+LNQq0AK1EPC+acdaFlwPVB/6KXUZYmaFleIlzgxDVoJCQ+/xOhxvYrdQaFLefh0I/Kldbg==}
/@tauri-apps/plugin-window/2.0.0-alpha.0:
resolution: {integrity: sha512-ZXFXOu9m8QiDB8d8LFFgwcfxIAbr0bhzj06YvmZDB3isuVtlFP9EyU4D+zmumWEWvNN2XP7xgpn68ivOVhmNNQ==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
'@tauri-apps/api': 2.0.0-alpha.4
dev: false
/@trysound/sax/0.2.0:

Loading…
Cancel
Save