mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-19 11:43:30 +00:00
fix crash on windows
This commit is contained in:
parent
74ff49b8db
commit
7cef6efa6f
@ -17,7 +17,6 @@ tauri-build = { version = "1.4", features = [] }
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.4", features = [
|
tauri = { version = "1.4", features = [
|
||||||
"macos-private-api",
|
|
||||||
"window-close",
|
"window-close",
|
||||||
"window-print",
|
"window-print",
|
||||||
"window-create",
|
"window-create",
|
||||||
@ -54,6 +53,8 @@ sqlx-cli = { version = "0.7.0", default-features = false, features = [
|
|||||||
] }
|
] }
|
||||||
rust-argon2 = "1.0"
|
rust-argon2 = "1.0"
|
||||||
webpage = { version = "1.6.0", features = ["serde"] }
|
webpage = { version = "1.6.0", features = ["serde"] }
|
||||||
|
|
||||||
|
[target.'cfg(any(target_os = "macos"))'.dependencies]
|
||||||
cocoa = "0.25.0"
|
cocoa = "0.25.0"
|
||||||
objc = "0.2.7"
|
objc = "0.2.7"
|
||||||
|
|
||||||
|
@ -114,14 +114,16 @@ fn main() {
|
|||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
window.set_transparent_titlebar(true);
|
window.set_transparent_titlebar(true);
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
window.position_traffic_lights(16.0, 25.0);
|
window.position_traffic_lights(16.0, 25.0);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.on_window_event(|e| {
|
.on_window_event(|e| {
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
if let WindowEvent::Resized(..) = e.event() {
|
if let WindowEvent::Resized(..) = e.event() {
|
||||||
let window = e.window();
|
let window = e.window();
|
||||||
window.position_traffic_lights(16., 25.);
|
window.position_traffic_lights(16.0, 25.0);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.plugin(
|
.plugin(
|
||||||
|
@ -81,7 +81,7 @@ export function ImportStep3Screen() {
|
|||||||
</button>
|
</button>
|
||||||
<span className="text-center text-sm text-white/50">
|
<span className="text-center text-sm text-white/50">
|
||||||
By clicking 'Continue', Lume will sync your old relay list and
|
By clicking 'Continue', Lume will sync your old relay list and
|
||||||
metadata. It may take a bit
|
metadata.<br/>It may take a bit, please be patient.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,8 @@ import { useSidebar } from '@stores/sidebar';
|
|||||||
import { compactNumber } from '@utils/number';
|
import { compactNumber } from '@utils/number';
|
||||||
|
|
||||||
export function Navigation() {
|
export function Navigation() {
|
||||||
const [totalNewActivities] = useActivities((state) => [state.totalNewActivities]);
|
const totalNewActivities = useActivities((state) => state.totalNewActivities);
|
||||||
|
|
||||||
const [chats, toggleChats] = useSidebar((state) => [state.chats, state.toggleChats]);
|
const [chats, toggleChats] = useSidebar((state) => [state.chats, state.toggleChats]);
|
||||||
const [integrations, toggleIntegrations] = useSidebar((state) => [
|
const [integrations, toggleIntegrations] = useSidebar((state) => [
|
||||||
state.integrations,
|
state.integrations,
|
||||||
|
@ -4,12 +4,15 @@ import { useEffect, useState } from 'react';
|
|||||||
import { useStorage } from '@libs/storage/provider';
|
import { useStorage } from '@libs/storage/provider';
|
||||||
|
|
||||||
import { useNostr } from '@utils/hooks/useNostr';
|
import { useNostr } from '@utils/hooks/useNostr';
|
||||||
|
import { useStronghold } from '@stores/stronghold';
|
||||||
|
|
||||||
export function EmptyList() {
|
export function EmptyList() {
|
||||||
const { db } = useStorage();
|
const { db } = useStorage();
|
||||||
const { getAllEventsSinceLastLogin } = useNostr();
|
const { getAllEventsSinceLastLogin } = useNostr();
|
||||||
|
|
||||||
|
const setIsFetched = useStronghold((state) => state.setIsFetched);
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const [progress, setProgress] = useState(0);
|
const [progress, setProgress] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -21,6 +24,7 @@ export function EmptyList() {
|
|||||||
|
|
||||||
if (promises) {
|
if (promises) {
|
||||||
setProgress(100);
|
setProgress(100);
|
||||||
|
setIsFetched();
|
||||||
// invalidate queries
|
// invalidate queries
|
||||||
queryClient.invalidateQueries(['local-network-widget']);
|
queryClient.invalidateQueries(['local-network-widget']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user