mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 23:43:55 +01:00
Upgrade Vite deps and fix windows DnD
This commit is contained in:
2251
package-lock.json
generated
2251
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -76,7 +76,7 @@
|
||||
"@types/uuid": "^9.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint": "^8.34.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
@@ -90,13 +90,13 @@
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-nesting": "^11.2.1",
|
||||
"prettier": "^2.8.4",
|
||||
"react-devtools": "^4.28.5",
|
||||
"react-devtools": "^4.27.2",
|
||||
"tailwindcss": "^3.2.7",
|
||||
"typescript": "^5.0.2",
|
||||
"vite": "^5.1.1",
|
||||
"vite-plugin-svgr": "^2.4.0",
|
||||
"vite-plugin-top-level-await": "^1.2.4",
|
||||
"vitest": "^0.29.2"
|
||||
"vite-plugin-svgr": "^4.2.0",
|
||||
"vite-plugin-top-level-await": "^1.4.1",
|
||||
"vitest": "^1.3.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx}": "eslint --cache --fix",
|
||||
|
||||
@@ -1356,7 +1356,7 @@ fn is_dev() -> bool {
|
||||
}
|
||||
|
||||
fn create_window(handle: &AppHandle, url: Option<&str>) -> Window {
|
||||
let app_menu = window_menu::os_default("Yaak".to_string().as_str());
|
||||
// let app_menu = window_menu::os_default("Yaak".to_string().as_str());
|
||||
let window_num = handle.windows().len();
|
||||
let window_id = format!("wnd_{}", window_num);
|
||||
let mut win_builder = tauri::WindowBuilder::new(
|
||||
@@ -1366,6 +1366,7 @@ fn create_window(handle: &AppHandle, url: Option<&str>) -> Window {
|
||||
)
|
||||
.fullscreen(false)
|
||||
.resizable(true)
|
||||
.disable_file_drop_handler() // Required for frontend Dnd on windows
|
||||
.inner_size(1100.0, 600.0)
|
||||
.position(
|
||||
// Randomly offset so windows don't stack exactly
|
||||
|
||||
@@ -480,6 +480,7 @@ function SidebarItems({
|
||||
<Fragment key={child.item.id}>
|
||||
{hoveredIndex === i && hoveredTree?.item.id === tree.item.id && <DropMarker />}
|
||||
<DraggableSidebarItem
|
||||
draggable
|
||||
selected={selectedId === child.item.id}
|
||||
itemId={child.item.id}
|
||||
itemName={child.item.name}
|
||||
@@ -563,6 +564,7 @@ const SidebarItem = forwardRef(function SidebarItem(
|
||||
onSelect,
|
||||
isCollapsed,
|
||||
child,
|
||||
draggable,
|
||||
}: SidebarItemProps,
|
||||
ref: ForwardedRef<HTMLLIElement>,
|
||||
) {
|
||||
@@ -644,7 +646,7 @@ const SidebarItem = forwardRef(function SidebarItem(
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<li ref={ref}>
|
||||
<li ref={ref} draggable={draggable}>
|
||||
<div className={classNames(className, 'block relative group/item px-2 pb-0.5')}>
|
||||
<ContextMenu
|
||||
show={showContextMenu}
|
||||
@@ -864,7 +866,6 @@ function DraggableSidebarItem({
|
||||
return (
|
||||
<SidebarItem
|
||||
ref={ref}
|
||||
draggable
|
||||
className={classNames(isDragging && 'opacity-20')}
|
||||
itemName={itemName}
|
||||
itemId={itemId}
|
||||
|
||||
Reference in New Issue
Block a user