chore: restructure project and add i18n support
- Reorganize project structure with new electron and shared directories - Add comprehensive i18n support with Chinese, English, and Japanese locales - Update build configurations and TypeScript paths for new structure - Add various UI components including chat interface and task management - Include Windows release binaries and localization files - Update dependencies and fix import paths throughout the codebase
This commit is contained in:
31
src/hooks/useWinManager.ts
Normal file
31
src/hooks/useWinManager.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export function useWinManager() {
|
||||
const isMaximized = ref(false)
|
||||
|
||||
function closeWindow() {
|
||||
window.api.closeWindow();
|
||||
}
|
||||
|
||||
function minimizeWindow() {
|
||||
window.api.minimizeWindow();
|
||||
}
|
||||
|
||||
function maximizeWindow() {
|
||||
window.api.maximizeWindow();
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await nextTick();
|
||||
window.api.viewIsReady();
|
||||
isMaximized.value = await window.api.isWindowMaximized();
|
||||
window.api.onWindowMaximized((_isMaximized: boolean) => isMaximized.value = _isMaximized);
|
||||
})
|
||||
|
||||
return {
|
||||
isMaximized,
|
||||
closeWindow,
|
||||
minimizeWindow,
|
||||
maximizeWindow
|
||||
}
|
||||
};
|
||||
|
||||
export default useWinManager;
|
||||
Reference in New Issue
Block a user