@@ -24,8 +24,6 @@ export const Column = memo(function Column({
|
|||||||
const [isCreated, setIsCreated] = useState(false);
|
const [isCreated, setIsCreated] = useState(false);
|
||||||
|
|
||||||
const repositionWebview = useCallback(async () => {
|
const repositionWebview = useCallback(async () => {
|
||||||
if (!container?.current) return console.log("something wrong.");
|
|
||||||
|
|
||||||
const newRect = container.current.getBoundingClientRect();
|
const newRect = container.current.getBoundingClientRect();
|
||||||
await invoke("reposition_column", {
|
await invoke("reposition_column", {
|
||||||
label: webviewLabel,
|
label: webviewLabel,
|
||||||
@@ -35,8 +33,6 @@ export const Column = memo(function Column({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const resizeWebview = useCallback(async () => {
|
const resizeWebview = useCallback(async () => {
|
||||||
if (!container?.current) return console.log("something wrong.");
|
|
||||||
|
|
||||||
const newRect = container.current.getBoundingClientRect();
|
const newRect = container.current.getBoundingClientRect();
|
||||||
await invoke("resize_column", {
|
await invoke("resize_column", {
|
||||||
label: webviewLabel,
|
label: webviewLabel,
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import * as ScrollArea from "@radix-ui/react-scroll-area";
|
|||||||
import * as Tabs from "@radix-ui/react-tabs";
|
import * as Tabs from "@radix-ui/react-tabs";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { invoke } from "@tauri-apps/api/core";
|
|
||||||
import { Menu, MenuItem, PredefinedMenuItem } from "@tauri-apps/api/menu";
|
import { Menu, MenuItem, PredefinedMenuItem } from "@tauri-apps/api/menu";
|
||||||
import { getCurrent } from "@tauri-apps/api/window";
|
import { getCurrent } from "@tauri-apps/api/window";
|
||||||
|
import { exit } from "@tauri-apps/plugin-process";
|
||||||
import { open } from "@tauri-apps/plugin-shell";
|
import { open } from "@tauri-apps/plugin-shell";
|
||||||
import { type ReactNode, useCallback, useEffect, useRef } from "react";
|
import { type ReactNode, useCallback, useEffect, useRef } from "react";
|
||||||
import { Virtualizer } from "virtua";
|
import { Virtualizer } from "virtua";
|
||||||
@@ -98,7 +98,7 @@ function Screen() {
|
|||||||
PredefinedMenuItem.new({ item: "Separator" }),
|
PredefinedMenuItem.new({ item: "Separator" }),
|
||||||
MenuItem.new({
|
MenuItem.new({
|
||||||
text: "Quit",
|
text: "Quit",
|
||||||
action: async () => await invoke("force_quit"),
|
action: async () => await exit(0),
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -447,9 +447,6 @@ try {
|
|||||||
async openMainWindow() : Promise<void> {
|
async openMainWindow() : Promise<void> {
|
||||||
await TAURI_INVOKE("open_main_window");
|
await TAURI_INVOKE("open_main_window");
|
||||||
},
|
},
|
||||||
async forceQuit() : Promise<void> {
|
|
||||||
await TAURI_INVOKE("force_quit");
|
|
||||||
},
|
|
||||||
async setBadge(count: number) : Promise<void> {
|
async setBadge(count: number) : Promise<void> {
|
||||||
await TAURI_INVOKE("set_badge", { count });
|
await TAURI_INVOKE("set_badge", { count });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ tauri = { version = "2.0.0-beta", features = [
|
|||||||
"macos-private-api",
|
"macos-private-api",
|
||||||
"native-tls-vendored",
|
"native-tls-vendored",
|
||||||
"protocol-asset",
|
"protocol-asset",
|
||||||
"devtools",
|
|
||||||
] }
|
] }
|
||||||
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||||
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||||
|
|||||||
@@ -255,9 +255,3 @@ pub fn open_main_window(app: tauri::AppHandle) {
|
|||||||
window.make_transparent().unwrap();
|
window.make_transparent().unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
|
||||||
#[specta::specta]
|
|
||||||
pub fn force_quit() {
|
|
||||||
std::process::exit(0);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ fn main() {
|
|||||||
commands::window::reload_column,
|
commands::window::reload_column,
|
||||||
commands::window::open_window,
|
commands::window::open_window,
|
||||||
commands::window::open_main_window,
|
commands::window::open_main_window,
|
||||||
commands::window::force_quit,
|
|
||||||
commands::window::set_badge
|
commands::window::set_badge
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||||
"productName": "Lume",
|
"productName": "Lume",
|
||||||
"version": "4.0.14",
|
"version": "4.0.13",
|
||||||
"identifier": "nu.lume.Lume",
|
"identifier": "nu.lume.Lume",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeBuildCommand": "pnpm desktop:build",
|
"beforeBuildCommand": "pnpm desktop:build",
|
||||||
|
|||||||
Reference in New Issue
Block a user