Skip to content

[docs] Please update the system tray documentation #1798

Description

@dibadibadiudiu

If I follow this document to do, I will get the following error.

https://tauri.studio/en/docs/guides/system-tray

err:
Finished dev [unoptimized + debuginfo] target(s) in 9.01s
Running target/debug/app
tauri.conf.json error on tauri: Additional property 'systemTray' is not allowed

When I enter the following code, I get error

tauri::Builder::default()
    .system_tray(tray_menu_items)

err:
no method named system_tray found for struct tauri::Builder<std::string::String, std::string::String, std::string::String, std::string::String, _, tauri::Wry> in the current scope

my tauri.conf.json


{
  "package": {
    "productName": "test",
    "version": "0.0.1"
  },
  "build": {
    "distDir": "../dist",
    "devPath": "http://localhost:8080",
    "beforeDevCommand": "",
    "beforeBuildCommand": ""
  },
  "tauri": {
    "bundle": {
      "active": true,
      "targets": "all",
      "identifier": "com.tauri.dev",
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
        "icons/128x128@2x.png",
        "icons/icon.icns",
        "icons/icon.ico"
      ],
      "resources": [],
      "externalBin": [],
      "copyright": "",
      "category": "DeveloperTool",
      "shortDescription": "",
      "longDescription": "",
      "deb": {
        "depends": [],
        "useBootstrapper": false
      },
      "macOS": {
        "frameworks": [],
        "minimumSystemVersion": "",
        "useBootstrapper": false,
        "exceptionDomain": "",
        "signingIdentity": null,
        "entitlements": null
      },
      "windows": {
        "certificateThumbprint": null,
        "digestAlgorithm": "sha256",
        "timestampUrl": ""
      }
    },
    "updater": {
      "active": true,
      "endpoints": [
        "https://xxx/update/{{target}}/{{current_version}}"
      ],
      "dialog": false
    },
    "allowlist": {
      "all": true
    },
    "windows": [
      {
        "title": "xxx",
        "width": 750,
        "height": 450,
        "resizable": true,
        "fullscreen": false
      }
    ],
    "security": {
      "csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline' 'self'"
    }
  }
}

tauri info


Operating System - Mac OS, version 11.2.3 X64

Node.js environment
Node.js - 15.8.0
@tauri-apps/cli - 1.0.0-beta-rc.4
@tauri-apps/api - 1.0.0-beta-rc.3

Global packages
npm - 7.5.1
yarn - 1.22.10

Rust environment
rustc - 1.52.1
cargo - 1.52.0

App directory structure
/dist
/node_modules
/public
/src-tauri
/.git
/src

App
tauri.rs - 1.0.0-beta.0
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'
distDir - ../dist
devPath - http://localhost:8080

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions