From 5a7266d63e00a43503c3ee7bbf7e677e20333b12 Mon Sep 17 00:00:00 2001 From: AruSeito <41471697+AruSeito@users.noreply.github.com> Date: Tue, 7 May 2024 18:44:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20custom=20desktop=20menu=20&?= =?UTF-8?q?=20tray?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/agent/package.json | 4 +- apps/agent/src-tauri/Cargo.lock | 76 +++++++++++ apps/agent/src-tauri/Cargo.toml | 2 +- apps/agent/src-tauri/src/cmd.rs | 31 +++++ apps/agent/src-tauri/src/main.rs | 38 +++++- apps/agent/src-tauri/src/menu.rs | 51 ++++++++ apps/agent/src-tauri/src/tray.rs | 44 +++++++ apps/agent/src-tauri/tauri.conf.json | 9 +- .../components/Tab/TipisTab/mobile/index.tsx | 2 +- .../components/Tab/TipisTab/pc/index.tsx | 2 +- .../UserInfoPopoverContent/index.tsx | 3 +- apps/agent/src/Layout/Workspace/index.tsx | 3 + .../components/ResourceCard/suggestCard.tsx | 3 +- .../ShareContent/index.tsx | 4 +- .../Function/modules/DocPanel/index.tsx | 3 +- apps/agent/src/utils/routeHelper/rustRoute.ts | 54 ++++++++ packages | 2 +- pnpm-lock.yaml | 122 +++++------------- 18 files changed, 349 insertions(+), 104 deletions(-) create mode 100644 apps/agent/src-tauri/src/cmd.rs create mode 100644 apps/agent/src-tauri/src/menu.rs create mode 100644 apps/agent/src-tauri/src/tray.rs create mode 100644 apps/agent/src/utils/routeHelper/rustRoute.ts diff --git a/apps/agent/package.json b/apps/agent/package.json index 66db4a3e..df9969b1 100644 --- a/apps/agent/package.json +++ b/apps/agent/package.json @@ -1,7 +1,7 @@ { "name": "agent", "private": true, - "version": "0.0.0", + "version": "0.1.2", "type": "module", "scripts": { "dev": "vite --force", @@ -42,7 +42,6 @@ "@illa-public/illa-net": "workspace:^", "@illa-public/illa-storage": "workspace:^", "@illa-public/illa-web-socket": "workspace:^", - "@illa-public/invite-modal": "workspace:^", "@illa-public/layout-auto-change": "workspace:^", "@illa-public/market-share": "workspace:^", "@illa-public/new-invite-modal": "workspace:^", @@ -56,6 +55,7 @@ "@illa-public/user-data": "workspace:^", "@illa-public/user-role-utils": "workspace:^", "@illa-public/utils": "workspace:^", + "@illa-public/cross-platform-utils": "workspace:^", "@mui/material": "^5.15.3", "@mui/x-data-grid-premium": "^6.19.6", "@reduxjs/toolkit": "^2.2.1", diff --git a/apps/agent/src-tauri/Cargo.lock b/apps/agent/src-tauri/Cargo.lock index 779e35c2..0c187a56 100644 --- a/apps/agent/src-tauri/Cargo.lock +++ b/apps/agent/src-tauri/Cargo.lock @@ -1852,6 +1852,16 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "open" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +dependencies = [ + "pathdiff", + "windows-sys 0.42.0", +] + [[package]] name = "openssl" version = "0.10.64" @@ -1950,6 +1960,12 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -3004,9 +3020,11 @@ dependencies = [ "minisign-verify", "objc", "once_cell", + "open", "percent-encoding", "rand 0.8.5", "raw-window-handle", + "regex", "reqwest", "rfd", "semver", @@ -3065,6 +3083,7 @@ dependencies = [ "png", "proc-macro2", "quote", + "regex", "semver", "serde", "serde_json", @@ -3883,6 +3902,21 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3946,6 +3980,12 @@ dependencies = [ "windows-targets 0.52.4", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -3970,6 +4010,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3994,6 +4040,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4018,6 +4070,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4042,6 +4100,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4054,6 +4118,12 @@ version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4078,6 +4148,12 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" diff --git a/apps/agent/src-tauri/Cargo.toml b/apps/agent/src-tauri/Cargo.toml index 060ce6b8..5d956edd 100644 --- a/apps/agent/src-tauri/Cargo.toml +++ b/apps/agent/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ tauri-build = { version = "1.5.1", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.6.1", features = [ "updater", "system-tray"] } +tauri = { version = "1.6.1", features = [ "shell-open", "updater", "system-tray"] } [features] # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. diff --git a/apps/agent/src-tauri/src/cmd.rs b/apps/agent/src-tauri/src/cmd.rs new file mode 100644 index 00000000..467e1337 --- /dev/null +++ b/apps/agent/src-tauri/src/cmd.rs @@ -0,0 +1,31 @@ +use tauri::{api, command, AppHandle, Manager}; + +#[command] +pub fn open_link(app: AppHandle, url: String) { + api::shell::open(&app.shell_scope(), url, None).unwrap(); +} + +#[command] +pub fn set_enabled_new_chat(app: AppHandle, enabled: bool) { + let main_window = app.get_window("main").unwrap(); + + let menu_handle = main_window.menu_handle(); + let tray_menu_handle = app.tray_handle(); + + let item = menu_handle.get_item("new_chat"); + item.set_enabled(enabled).unwrap(); + + let tray_item = tray_menu_handle.get_item("new_chat"); + tray_item.set_enabled(enabled).unwrap() +} + +#[command] +pub fn set_enabled_explore_tipi(app: AppHandle, enabled: bool) { + let tray_menu_handle = app.tray_handle(); + + let tray_item = tray_menu_handle.get_item("explore_tipi"); + tray_item.set_enabled(enabled).unwrap() +} + +// #[command] +// pub fn diff --git a/apps/agent/src-tauri/src/main.rs b/apps/agent/src-tauri/src/main.rs index f5c5be23..8d08b12b 100644 --- a/apps/agent/src-tauri/src/main.rs +++ b/apps/agent/src-tauri/src/main.rs @@ -1,8 +1,40 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +use tauri::Manager; +mod cmd; +mod menu; +mod tray; + fn main() { - tauri::Builder::default() - .run(tauri::generate_context!()) - .expect("error while running tauri application"); + let context = tauri::generate_context!(); + + tauri::Builder::default() + .system_tray(tray::create()) + .on_system_tray_event(tray::handler) + .menu(menu::create_menu(&context)) + .on_menu_event(menu::menu_handler) + .invoke_handler(tauri::generate_handler![ + cmd::open_link, + cmd::set_enabled_new_chat, + cmd::set_enabled_explore_tipi, + ]) + .on_window_event(|event| match event.event() { + tauri::WindowEvent::CloseRequested { api, .. } => { + #[cfg(not(target_os = "macos"))] + { + event.window().hide().unwrap(); + } + + #[cfg(target_os = "macos")] + { + tauri::AppHandle::hide(&event.window().app_handle()).unwrap(); + } + api.prevent_close(); + } + + _ => {} + }) + .run(context) + .expect("error while running tauri application"); } diff --git a/apps/agent/src-tauri/src/menu.rs b/apps/agent/src-tauri/src/menu.rs new file mode 100644 index 00000000..7c500e70 --- /dev/null +++ b/apps/agent/src-tauri/src/menu.rs @@ -0,0 +1,51 @@ +use tauri::utils::assets::EmbeddedAssets; +use tauri::{AboutMetadata, Context, CustomMenuItem, Menu, MenuItem, Submenu, WindowMenuEvent}; + +pub fn create_menu(context: &Context) -> Menu { + let app_name: &String = &context.package_info().name; + + let app_menu = Submenu::new( + "", + Menu::new() + .add_native_item(MenuItem::About(app_name.into(), AboutMetadata::new())) + .add_item(CustomMenuItem::new("settings", "Settings")) + .add_native_item(MenuItem::Separator) + .add_native_item(MenuItem::Hide) + .add_native_item(MenuItem::HideOthers) + .add_native_item(MenuItem::Quit), + ); + + let mut new_chat = CustomMenuItem::new("new_chat".to_string(), "Start new chat"); + + new_chat.enabled = false; + + let file_menu = Submenu::new("Chat", Menu::new().add_item(new_chat)); + + let edit_menu = Submenu::new( + "Edit", + Menu::new() + .add_native_item(MenuItem::Undo) + .add_native_item(MenuItem::Redo) + .add_native_item(MenuItem::Separator) + .add_native_item(MenuItem::Cut) + .add_native_item(MenuItem::Copy) + .add_native_item(MenuItem::Paste), + ); + + Menu::new() + .add_submenu(app_menu) + .add_submenu(file_menu) + .add_submenu(edit_menu) +} + +pub fn menu_handler(event: WindowMenuEvent) { + let win = Some(event.window()); + + match event.menu_item_id() { + "new_chat" => { + win.unwrap().emit("open_new_chat", "").unwrap(); + } + + _ => {} + } +} diff --git a/apps/agent/src-tauri/src/tray.rs b/apps/agent/src-tauri/src/tray.rs new file mode 100644 index 00000000..69a07753 --- /dev/null +++ b/apps/agent/src-tauri/src/tray.rs @@ -0,0 +1,44 @@ +use tauri::{ + AppHandle, CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu, + SystemTrayMenuItem, +}; + +pub fn create() -> SystemTray { + let mut new_chat = CustomMenuItem::new("new_chat".to_string(), "Start a new chat"); + new_chat.enabled = false; + + let mut explore_tipis = CustomMenuItem::new("explore_tipi".to_string(), "Explore Tipi"); + explore_tipis.enabled = false; + + let tray_menu: SystemTrayMenu = SystemTrayMenu::new() + .add_item(new_chat) + .add_item(explore_tipis) + .add_item(CustomMenuItem::new("show".to_string(), "Open Tipis AI")) + .add_native_item(SystemTrayMenuItem::Separator) + .add_item(CustomMenuItem::new("quit".to_string(), "Quit")); + + SystemTray::new().with_menu(tray_menu) +} + +pub fn handler(app: &AppHandle, event: SystemTrayEvent) { + let window = app.get_window("main").unwrap(); + match event { + SystemTrayEvent::MenuItemClick { id, .. } => match id.as_str() { + "quit" => { + std::process::exit(0); + } + "show" => { + window.show().unwrap(); + window.set_focus().unwrap(); + } + "new_chat" => { + window.emit("open_new_chat", "").unwrap(); + } + "explore_tipi" => { + window.emit("open_explore_tipi", "").unwrap(); + } + _ => {} + }, + _ => {} + } +} diff --git a/apps/agent/src-tauri/tauri.conf.json b/apps/agent/src-tauri/tauri.conf.json index 528c1bb5..a5e7f362 100644 --- a/apps/agent/src-tauri/tauri.conf.json +++ b/apps/agent/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "Tipis", - "version": "0.1.0" + "version": "../package.json" }, "$schema": "../node_modules/@tauri-apps/cli/schema.json", "build": { @@ -16,7 +16,10 @@ "iconAsTemplate": true }, "allowlist": { - "all": false + "all": false, + "shell": { + "open": true + } }, "bundle": { "active": true, @@ -72,7 +75,7 @@ "height": 720, "minWidth": 1280, "minHeight": 720, - "resizable": false, + "resizable": true, "fullscreen": false } ] diff --git a/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/mobile/index.tsx b/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/mobile/index.tsx index 5de6f07f..a9af8770 100644 --- a/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/mobile/index.tsx +++ b/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/mobile/index.tsx @@ -47,7 +47,7 @@ const MobileTipisTab: FC = (props) => { async function removeTab() { await deleteTab(tabID) - if (newTabs.length === 1) { + if (newTabs.length === 0) { navigate(getChatPath(currentTeamInfo?.identifier ?? "")) return } diff --git a/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/pc/index.tsx b/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/pc/index.tsx index 79527c04..dfeba2a4 100644 --- a/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/pc/index.tsx +++ b/apps/agent/src/Layout/Workspace/components/Tab/TipisTab/pc/index.tsx @@ -59,7 +59,7 @@ const PCTipisTab: FC = (props) => { async function removeTab() { await deleteTab(tabID) - if (newTabs.length === 1) { + if (newTabs.length === 0) { navigate(getChatPath(currentTeamInfo?.identifier ?? "")) return } diff --git a/apps/agent/src/Layout/Workspace/components/UserInfoPopoverContent/index.tsx b/apps/agent/src/Layout/Workspace/components/UserInfoPopoverContent/index.tsx index b8dddd63..0ae402df 100644 --- a/apps/agent/src/Layout/Workspace/components/UserInfoPopoverContent/index.tsx +++ b/apps/agent/src/Layout/Workspace/components/UserInfoPopoverContent/index.tsx @@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next" import { useSelector } from "react-redux" import { Link } from "react-router-dom" import { useIntercom } from "react-use-intercom" +import { openLinkOnNewTab } from "@illa-public/cross-platform-utils" import { TipisTrack } from "@illa-public/track-utils" import { getCurrentTeamInfo, @@ -47,7 +48,7 @@ const UserInfoPopoverContent: FC = () => { const onClickOpenDocs = () => { TipisTrack.track("open_docs") - window.open("https://help.tipis.ai", "_blank") + openLinkOnNewTab("https://help.tipis.ai") } return ( { useBeforeUnload(trackLeave) + useInitRustEvent() + return ( { const { t } = useTranslation() const handleClickTellUs = () => { - window.open("https://forms.gle/ngEoRvBtWvrTuWDNA", "_blank") + openLinkOnNewTab("https://forms.gle/ngEoRvBtWvrTuWDNA") } return ( diff --git a/apps/agent/src/components/ContributeTipisModalContent/ShareContent/index.tsx b/apps/agent/src/components/ContributeTipisModalContent/ShareContent/index.tsx index a57dc631..20c1a22d 100644 --- a/apps/agent/src/components/ContributeTipisModalContent/ShareContent/index.tsx +++ b/apps/agent/src/components/ContributeTipisModalContent/ShareContent/index.tsx @@ -2,6 +2,7 @@ import Icon from "@ant-design/icons" import { App, Button, Input, Modal } from "antd" import { FC } from "react" import { useTranslation } from "react-i18next" +import { openLinkOnNewTab } from "@illa-public/cross-platform-utils" import { CopyIcon } from "@illa-public/icon" import { ShareBlockPC } from "@illa-public/market-share" import { @@ -56,8 +57,9 @@ const ShareContentModal: FC = ({ } const handleOpenLink = () => { - window.open(link) + openLinkOnNewTab(link) } + return ( { } const openDocs = () => { - window.open(INTEGRATION_TYPE_MAP_DOC[integrationType], "_blank") + openLinkOnNewTab(INTEGRATION_TYPE_MAP_DOC[integrationType]) } return ( diff --git a/apps/agent/src/utils/routeHelper/rustRoute.ts b/apps/agent/src/utils/routeHelper/rustRoute.ts new file mode 100644 index 00000000..1f576260 --- /dev/null +++ b/apps/agent/src/utils/routeHelper/rustRoute.ts @@ -0,0 +1,54 @@ +import { UnlistenFn } from "@tauri-apps/api/event" +import { invoke } from "@tauri-apps/api/tauri" +import { appWindow } from "@tauri-apps/api/window" +import { useEffect, useRef } from "react" +import { v4 } from "uuid" +import { useGetCurrentTeamInfo } from "../team" +import { useNavigateToExploreTipis, useNavigateToNewChat } from "./hook" + +export const useRustNavigateToNewChat = () => { + const navigateToNewChat = useNavigateToNewChat() + + return () => { + navigateToNewChat(v4()) + } +} + +export const useInitRustEvent = () => { + const currentTeamInfo = useGetCurrentTeamInfo() + const rustNavigateToNewChat = useRustNavigateToNewChat() + const navigateToExploreTipi = useNavigateToExploreTipis() + + const openNewChatListenerRef = useRef>() + const openExploreTipiListenerRef = useRef>() + + useEffect(() => { + const chatListener = openNewChatListenerRef.current + const exploreListener = openExploreTipiListenerRef.current + if (!currentTeamInfo) { + invoke("set_enabled_new_chat", { enabled: false }) + invoke("set_enabled_explore_tipi", { enabled: false }) + if (chatListener) { + chatListener.then((f) => f()) + } + if (exploreListener) { + exploreListener.then((f) => f()) + } + } else { + invoke("set_enabled_new_chat", { enabled: true }) + invoke("set_enabled_explore_tipi", { enabled: true }) + if (!chatListener) { + openNewChatListenerRef.current = appWindow.listen( + "open_new_chat", + rustNavigateToNewChat, + ) + } + if (!exploreListener) { + openExploreTipiListenerRef.current = appWindow.listen( + "open_explore_tipi", + navigateToExploreTipi, + ) + } + } + }, [currentTeamInfo, navigateToExploreTipi, rustNavigateToNewChat]) +} diff --git a/packages b/packages index c4d4f346..f547a990 160000 --- a/packages +++ b/packages @@ -1 +1 @@ -Subproject commit c4d4f346ca0f148d47949858de7ab79c142a4ee1 +Subproject commit f547a990899335fbde869ab6e310a04ec0f991d3 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6b959ef..300e57bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -133,6 +133,9 @@ importers: '@illa-public/color-scheme': specifier: workspace:^ version: link:../../packages/utils/colorScheme + '@illa-public/cross-platform-utils': + specifier: workspace:^ + version: link:../../packages/utils/crossPlatform '@illa-public/draggable-modal': specifier: workspace:* version: link:../../packages/components/DraggableModal @@ -154,9 +157,6 @@ importers: '@illa-public/illa-web-socket': specifier: workspace:^ version: link:../../packages/utils/ILLAWebSocket - '@illa-public/invite-modal': - specifier: workspace:^ - version: link:../../packages/components/InviteModal '@illa-public/layout-auto-change': specifier: workspace:^ version: link:../../packages/components/LayoutAutoChange @@ -524,91 +524,6 @@ importers: specifier: workspace:* version: link:../../devConfigs/tsconfig - packages/components/InviteModal: - dependencies: - '@ant-design/icons': - specifier: 5.3.6 - version: 5.3.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@emotion/react': - specifier: ^11.11.4 - version: 11.11.4(@types/react@18.2.79)(react@18.2.0) - '@illa-public/auth-shown': - specifier: workspace:* - version: link:../AuthShown - '@illa-public/avatar': - specifier: workspace:* - version: link:../Avatar - '@illa-public/color-scheme': - specifier: workspace:^ - version: link:../../utils/colorScheme - '@illa-public/icon': - specifier: workspace:* - version: link:../Icon - '@illa-public/illa-net': - specifier: workspace:* - version: link:../../utils/ILLANet - '@illa-public/layout-auto-change': - specifier: workspace:* - version: link:../LayoutAutoChange - '@illa-public/public-types': - specifier: workspace:* - version: link:../../others/publicTypes - '@illa-public/role-selector': - specifier: workspace:* - version: link:../RoleSelector - '@illa-public/track-utils': - specifier: workspace:* - version: link:../../utils/trackUtils - '@illa-public/upgrade-modal': - specifier: workspace:* - version: link:../UpgradeModal - '@illa-public/user-data': - specifier: workspace:^ - version: link:../UserData - '@illa-public/user-role-utils': - specifier: workspace:* - version: link:../../utils/UserRoleUtils - '@illa-public/utils': - specifier: workspace:* - version: link:../../utils/public - '@types/react': - specifier: ^18.2.79 - version: 18.2.79 - '@types/react-dom': - specifier: ^18.2.25 - version: 18.2.25 - antd: - specifier: ^5.16.4 - version: 5.16.4(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - copy-to-clipboard: - specifier: ^3.3.2 - version: 3.3.3 - i18next: - specifier: ^23.11.2 - version: 23.11.2 - lodash-es: - specifier: ^4.17.21 - version: 4.17.21 - react: - specifier: ^18.2.0 - version: 18.2.0 - react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) - react-i18next: - specifier: ^14.1.1 - version: 14.1.1(i18next@23.11.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - react-share: - specifier: ^4.4.1 - version: 4.4.1(react@18.2.0) - devDependencies: - '@types/lodash-es': - specifier: ^4.17.12 - version: 4.17.12 - tsconfig: - specifier: workspace:* - version: link:../../devConfigs/tsconfig - packages/components/LayoutAutoChange: dependencies: '@emotion/react': @@ -1195,6 +1110,37 @@ importers: specifier: workspace:* version: link:../../devConfigs/tsconfig + packages/utils/crossPlatform: + dependencies: + '@emotion/react': + specifier: ^11.11.4 + version: 11.11.4(@types/react@18.2.79)(react@18.2.0) + '@tauri-apps/api': + specifier: ^1.5.3 + version: 1.5.4 + '@types/react': + specifier: ^18.2.79 + version: 18.2.79 + '@types/react-dom': + specifier: ^18.2.25 + version: 18.2.25 + i18next: + specifier: ^23.11.2 + version: 23.11.2 + react: + specifier: ^18.2.0 + version: 18.2.0 + react-dom: + specifier: ^18.2.0 + version: 18.2.0(react@18.2.0) + react-i18next: + specifier: ^14.1.1 + version: 14.1.1(i18next@23.11.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + devDependencies: + tsconfig: + specifier: workspace:* + version: link:../../devConfigs/tsconfig + packages/utils/dynamicStringUtils: dependencies: acorn: