#splashscreen with v2

9 messages · Page 1 of 1 (latest)

twin birch
#

after upgrade the cargo, tauri to 2.0.0-beta.14, the docs of v1 is work and the window splashscreen id appear, ,
tauri info


> [email protected] tauri
> tauri info


[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 123.0.2420.81
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
    ✔ cargo: 1.77.1 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.12.1
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.14
    - tauri-build [RUST]: 2.0.0-beta.11
    - wry [RUST]: 0.39.0
    - tao [RUST]: 0.27.0
    - @tauri-apps/api [NPM]: 2.0.0-beta.6
    - @tauri-apps/cli [NPM]: 2.0.0-beta.11

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../out
    - devUrl: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack

capabilities

{
  "$schema": "../schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": ["main", "splashscreen"],
  "permissions": [
    "path:default",
    "event:default",
    "window:default",
    "app:default",
    "image:default",
    "resources:default",
    "menu:default",
    "tray:default",
    "shell:allow-open",
    "sql:default",
    "sql:allow-load",
    "sql:allow-select",
    "sql:allow-execute",
    "positioner:allow-move-window",
    "positioner:default",
    "updater:default",
    "process:default",
    "dialog:default",
    "dialog:allow-open",
    "dialog:allow-save",
    "dialog:allow-ask",
    "process:allow-restart",

    "window:allow-start-dragging",
    "window:allow-create",
    "window:allow-minimize",
    "window:allow-toggle-maximize",
    "window:allow-close"
  ]
}
twin birch
#

hi, any solution for splashscreen in v2, i still get same error, when set main windows visible to false, the both windows disappear, when i set the both visible to true and use rust show and hide the two windows appear
NOTE: the problem fixed when i update the cargo, to tauri 2.0.0-beta.14

now i see this error in console : POST http://ipc.localhost/plugin%3Awindow|create 400 (Bad Request)
for this line : const appWindow = new Window("splashscreen");

crystal imp
#

You probably want WebviewWindow instead. Window is a blank window and requires the unstable feature flag for tauri in Cargo.toml.

supple coyote
crystal imp
#

It's a plugin that is built into the core API so you only need to configure the ACL.

#

The ACL permission is "webview:allow-create-webview-window"

twin birch
#

i get this return
"a window with label splashscreen already exists"
when i use this line : const appWindow = new Window("splashscreen");

crystal imp
#

Labels must be unique for each existing window.

#

When the window is closed, you can re-use the label.