[bugfix] Fix window geometry bug that was not save and restore. changes the way how to get appWindow instance from Tauri.
This commit is contained in:
@@ -4,7 +4,7 @@ import { StartUpProgressContainer } from "./start_up_progress_container/StartUpP
|
||||
import { DownloadModelsContainer } from "./download_models_container/DownloadModelsContainer/";
|
||||
import MegaphoneSvg from "@images/megaphone.svg?react";
|
||||
import XMarkSvg from "@images/cancel.svg?react";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { useWindow } from "@logics_common";
|
||||
import clsx from "clsx";
|
||||
|
||||
export const SplashComponent = () => {
|
||||
@@ -73,13 +73,10 @@ const AnnouncementsContainer = () => {
|
||||
|
||||
|
||||
const CloseButtonContainer = () => {
|
||||
const asyncClose = async () => {
|
||||
const appWindow = await getCurrentWindow();
|
||||
appWindow.close();
|
||||
};
|
||||
const { asyncCloseApp } = useWindow();
|
||||
|
||||
return (
|
||||
<button className={styles.close_button_wrapper} onClick={asyncClose}>
|
||||
<button className={styles.close_button_wrapper} onClick={asyncCloseApp}>
|
||||
<div className={styles.close_button}>
|
||||
<XMarkSvg className={styles.x_mark_svg}/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user