mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 16:06:47 -05:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71adfd4701 | ||
|
|
c9da5cac18 | ||
|
|
83aad5eb54 |
+1
-1
@@ -120,7 +120,7 @@ export function GlobalFileDropHandler() {
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
return () => { unlisteners.forEach((fn) => fn()); };
|
||||
|
||||
} else {
|
||||
|
||||
@@ -256,7 +256,7 @@ export const ImageTo3DExperience = ({
|
||||
};
|
||||
|
||||
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
handleFiles(event.target.files);
|
||||
void handleFiles(event.target.files);
|
||||
event.target.value = "";
|
||||
};
|
||||
|
||||
@@ -264,7 +264,7 @@ export const ImageTo3DExperience = ({
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
setDragActive(false);
|
||||
handleFiles(event.dataTransfer?.files);
|
||||
void handleFiles(event.dataTransfer?.files);
|
||||
};
|
||||
|
||||
const handlePickFromLibrary = () => {
|
||||
@@ -716,7 +716,7 @@ export const ImageTo3DExperience = ({
|
||||
e.stopPropagation();
|
||||
setDragActive(false);
|
||||
if (e.dataTransfer?.files)
|
||||
handleWorldFiles(
|
||||
void handleWorldFiles(
|
||||
Array.from(e.dataTransfer.files).filter((f) =>
|
||||
f.type.startsWith("image/"),
|
||||
),
|
||||
@@ -1177,7 +1177,7 @@ export const ImageTo3DExperience = ({
|
||||
className="hidden"
|
||||
onChange={(e) => {
|
||||
if (e.target.files) {
|
||||
handleWorldFiles(Array.from(e.target.files));
|
||||
void handleWorldFiles(Array.from(e.target.files));
|
||||
}
|
||||
e.target.value = "";
|
||||
}}
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ function ItemActions({
|
||||
e.stopPropagation();
|
||||
const url = item.fullImage || item.thumbnail;
|
||||
if (!url) return;
|
||||
applyMakeVideoFromImage(url, item.id);
|
||||
void applyMakeVideoFromImage(url, item.id);
|
||||
},
|
||||
[item.fullImage, item.thumbnail, item.id],
|
||||
);
|
||||
|
||||
+2
-2
@@ -295,8 +295,8 @@ export function useDesktopGenerationFeed(options: {
|
||||
cancelled = true;
|
||||
clearInterval(intervalId);
|
||||
window.removeEventListener("task-queue-update", handleTaskUpdate);
|
||||
unlistenComplete.then((f) => f());
|
||||
unlistenFailed.then((f) => f());
|
||||
void unlistenComplete.then((f) => f());
|
||||
void unlistenFailed.then((f) => f());
|
||||
};
|
||||
}, [load]);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export function useDesktopUsername(): string | null {
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
(async () => {
|
||||
void (async () => {
|
||||
try {
|
||||
const session = await new UsersApi().GetSession();
|
||||
if (!cancelled && session.success && session.data?.user) {
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ export const UploadFilesMedia = ({
|
||||
return;
|
||||
}
|
||||
|
||||
uploadPlane({
|
||||
void uploadPlane({
|
||||
title: uploadTitle.value,
|
||||
assetFile: assetFile.value,
|
||||
progressCallback: onUploadProgress,
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function ProfileDropdown() {
|
||||
label: "Logout",
|
||||
icon: LogOutIcon,
|
||||
onClick: () => {
|
||||
logout();
|
||||
void logout();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -67,7 +67,7 @@ export const SceneTitleInput = ({ pageName }: Props) => {
|
||||
e.currentTarget.focus();
|
||||
} else if (scene.value.token) {
|
||||
setIsSaving(true);
|
||||
renameScene(
|
||||
void renameScene(
|
||||
scene.value.title!, //guarunteed by input
|
||||
scene.value.token,
|
||||
);
|
||||
|
||||
@@ -164,7 +164,7 @@ const CopyPromptButton = ({ prompt }: { prompt: string }) => {
|
||||
aria-label="Copy prompt"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigator.clipboard.writeText(prompt);
|
||||
void navigator.clipboard.writeText(prompt);
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 3000);
|
||||
}}
|
||||
@@ -869,7 +869,7 @@ export const TaskQueue = () => {
|
||||
};
|
||||
|
||||
cleanupOldEntries();
|
||||
load();
|
||||
void load();
|
||||
const id = setInterval(load, 5000);
|
||||
|
||||
// Listen for cover image uploads to refresh and show new thumbnails
|
||||
@@ -883,17 +883,17 @@ export const TaskQueue = () => {
|
||||
|
||||
let unlistenComplete: Promise<UnlistenFn> | null = null;
|
||||
let unlistenFailed: Promise<UnlistenFn> | null = null;
|
||||
(async () => {
|
||||
void (async () => {
|
||||
// Update immediately when Tauri signals a generation completion
|
||||
unlistenComplete = listen("generation-complete-event", () => {
|
||||
if (!cancelled) {
|
||||
load();
|
||||
void load();
|
||||
}
|
||||
});
|
||||
// Also update immediately when a generation fails
|
||||
unlistenFailed = listen("generation-failed-event", () => {
|
||||
if (!cancelled) {
|
||||
load();
|
||||
void load();
|
||||
// Refunded credits may take a moment to settle in the database
|
||||
setTimeout(() => {
|
||||
useCreditsState.getState().fetchFromServer();
|
||||
@@ -906,10 +906,10 @@ export const TaskQueue = () => {
|
||||
clearInterval(id);
|
||||
window.removeEventListener("cover-image-uploaded", handleCoverUploaded);
|
||||
if (unlistenComplete) {
|
||||
unlistenComplete.then((f) => f());
|
||||
void unlistenComplete.then((f) => f());
|
||||
}
|
||||
if (unlistenFailed) {
|
||||
unlistenFailed.then((f) => f());
|
||||
void unlistenFailed.then((f) => f());
|
||||
}
|
||||
};
|
||||
}, [
|
||||
|
||||
@@ -125,7 +125,7 @@ export function storeEnqueueMeta(meta: EnqueueMeta) {
|
||||
|
||||
// Then convert blob URLs to base64 in the background for persistence
|
||||
if (meta.refImageUrls && meta.refImageUrls.length > 0) {
|
||||
Promise.all(meta.refImageUrls.map(toBase64Thumb)).then((dataUrls) => {
|
||||
void Promise.all(meta.refImageUrls.map(toBase64Thumb)).then((dataUrls) => {
|
||||
const current = readEntries();
|
||||
const found = current.find((e) => e.id === entryId);
|
||||
if (found) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export const withProtectionRoute = <P extends object>(
|
||||
function ProtectionRoute(rest: P) {
|
||||
useSignals();
|
||||
useSignalEffect(() => {
|
||||
persistLogin();
|
||||
void persistLogin();
|
||||
});
|
||||
|
||||
// const { status, userInfo } = authentication;
|
||||
|
||||
@@ -38,7 +38,7 @@ export const useActiveJobs = () => {
|
||||
// then set new one with new interval
|
||||
clearInterval(curr.timer);
|
||||
const newTimer = setInterval(() => {
|
||||
PollRecentJobs();
|
||||
void PollRecentJobs();
|
||||
}, newTimeInterval);
|
||||
return {
|
||||
timer: newTimer,
|
||||
@@ -72,7 +72,7 @@ export const useActiveJobs = () => {
|
||||
useSignalEffect(() => {
|
||||
// if active jobs is not initiated, do do a first pull;
|
||||
if (!activeJobs.value) {
|
||||
PollRecentJobs();
|
||||
void PollRecentJobs();
|
||||
return;
|
||||
}
|
||||
// if there are no active jobs, stop making polls
|
||||
@@ -115,7 +115,7 @@ export const useActiveJobs = () => {
|
||||
|
||||
//else make and set timer
|
||||
const newTimer = setInterval(() => {
|
||||
PollRecentJobs();
|
||||
void PollRecentJobs();
|
||||
}, curr.interval);
|
||||
return {
|
||||
...curr,
|
||||
|
||||
+4
-4
@@ -24,7 +24,7 @@ export const useBackgroundLoadingMedia = () => {
|
||||
//CASE 1: first load
|
||||
// if myMovies undefined, poll for the first time
|
||||
if (!userMovies.value) {
|
||||
PollUserGeneratedMovies();
|
||||
void PollUserGeneratedMovies();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export const useBackgroundLoadingMedia = () => {
|
||||
|
||||
//there are videos newly completed, set and poll
|
||||
lastCompletedWorkflow.current = completedWorkflowJobs.value;
|
||||
PollUserGeneratedMovies().then((ret: boolean) => {
|
||||
void PollUserGeneratedMovies().then((ret: boolean) => {
|
||||
if (ret) {
|
||||
addToast(
|
||||
ToastTypes.SUCCESS,
|
||||
@@ -60,7 +60,7 @@ export const useBackgroundLoadingMedia = () => {
|
||||
//CASE 1: first load
|
||||
// if audioItems undefined, poll for the first time
|
||||
if (!userAudioItems.value) {
|
||||
PollUserAudioItems();
|
||||
void PollUserAudioItems();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export const useBackgroundLoadingMedia = () => {
|
||||
|
||||
//there are audio jobs newly completed, set and poll
|
||||
lastCompletedAudioJobs.current = completedAudioJobs.value;
|
||||
PollUserAudioItems().then((ret: boolean) => {
|
||||
void PollUserAudioItems().then((ret: boolean) => {
|
||||
if (ret) {
|
||||
addToast(
|
||||
ToastTypes.SUCCESS,
|
||||
|
||||
@@ -26,12 +26,12 @@ const ENV = {
|
||||
const GlobalSettingsManager = ({ env }: { env: Record<string, string> }) => {
|
||||
console.log("GlobalSettingsManager()");
|
||||
|
||||
SyncStorytellerApiConfig();
|
||||
void SyncStorytellerApiConfig();
|
||||
|
||||
useSignals();
|
||||
|
||||
useSignalEffect(() => {
|
||||
persistLogin();
|
||||
void persistLogin();
|
||||
});
|
||||
|
||||
/// Initizations that depends on ENV vars ///
|
||||
|
||||
@@ -152,7 +152,7 @@ export const MainApp = ({ sceneToken }: Props) => {
|
||||
// Session probe (runs once per shell mount).
|
||||
useEffect(() => {
|
||||
const usersApi = new UsersApi();
|
||||
usersApi.GetSession().then((result) => {
|
||||
void usersApi.GetSession().then((result) => {
|
||||
console.log(
|
||||
`User Info | Username: ${result.data?.user?.username}, Token: ${result.data?.user?.user_token}`,
|
||||
);
|
||||
|
||||
@@ -84,7 +84,7 @@ export const BaseImageSelector = ({
|
||||
progressCallback: (newState) => {
|
||||
if (newState.status === UploaderStates.success && newState.data) {
|
||||
const mediaToken = newState.data || "";
|
||||
(async () => {
|
||||
void (async () => {
|
||||
let finalUrl = reader.result as string;
|
||||
let thumbnailUrlTemplate = undefined;
|
||||
try {
|
||||
|
||||
@@ -148,7 +148,7 @@ export const RemoveBackground = () => {
|
||||
}
|
||||
};
|
||||
|
||||
processExternalUrl();
|
||||
void processExternalUrl();
|
||||
}, [
|
||||
pendingExternalUrl,
|
||||
setPendingExternalUrl,
|
||||
|
||||
@@ -87,7 +87,7 @@ export const completedAudioJobs = computed(() => {
|
||||
export const shouldPollActiveJobs = signal<boolean>(false);
|
||||
|
||||
export const startPollingActiveJobs = () => {
|
||||
PollRecentJobs(); //poll once regardless of polling intervals
|
||||
void PollRecentJobs(); //poll once regardless of polling intervals
|
||||
shouldPollActiveJobs.value = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export const login = async ({
|
||||
// technically user is login with the system now, HOWEVER,
|
||||
// in storyteller studio, only having a sesison is not enough,
|
||||
// we need session info and active subscription info as well
|
||||
getUserInfoAndSubcriptions();
|
||||
void getUserInfoAndSubcriptions();
|
||||
|
||||
window.location.href = "/"; // TODO(bt,2025-04-19): Once we have in-page routing, get rid of this.
|
||||
};
|
||||
@@ -86,7 +86,7 @@ export const signUp = async ({
|
||||
// technically user is login with the system now, HOWEVER,
|
||||
// in storyteller studio, only having a sesison is not enough,
|
||||
// we need session info and active subscription info as well
|
||||
getUserInfoAndSubcriptions();
|
||||
void getUserInfoAndSubcriptions();
|
||||
return "";
|
||||
};
|
||||
|
||||
@@ -95,12 +95,12 @@ export const persistLogin = async () => {
|
||||
if (authentication.status.value !== AUTH_STATUS.INIT) {
|
||||
return;
|
||||
}
|
||||
getUserInfoAndSubcriptions();
|
||||
void getUserInfoAndSubcriptions();
|
||||
};
|
||||
|
||||
// NB: Only for SyncStorytellerApiConfig.
|
||||
export const forceGetUserInfoAndSubcriptions = async () => {
|
||||
getUserInfoAndSubcriptions();
|
||||
void getUserInfoAndSubcriptions();
|
||||
};
|
||||
|
||||
async function getUserInfoAndSubcriptions() {
|
||||
|
||||
@@ -22,15 +22,15 @@ export const useCanvasBgRemovedEvent = (asyncCallback: (event: CanvasBgRemovedEv
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -21,7 +21,7 @@ export function useSoraLoginListener(
|
||||
unlisten = stop;
|
||||
};
|
||||
|
||||
setupListener();
|
||||
void setupListener();
|
||||
|
||||
return () => {
|
||||
if (unlisten) unlisten();
|
||||
|
||||
@@ -23,15 +23,15 @@ export const useCreditsBalanceChangedEvent = (
|
||||
);
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then((f) => f());
|
||||
void unlisten.then((f) => f());
|
||||
};
|
||||
}, []);
|
||||
};
|
||||
|
||||
@@ -27,15 +27,15 @@ export const useImageEditCompleteEvent = (asyncCallback: (event: ImageEditComple
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -24,15 +24,15 @@ export const useMediaFileDeletedEvent = (
|
||||
);
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then((f) => f());
|
||||
void unlisten.then((f) => f());
|
||||
};
|
||||
}, []);
|
||||
};
|
||||
|
||||
+3
-3
@@ -32,15 +32,15 @@ export const useObjectGenerationCompleteEvent = (
|
||||
);
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then((f) => f());
|
||||
void unlisten.then((f) => f());
|
||||
};
|
||||
}, []);
|
||||
};
|
||||
|
||||
@@ -19,15 +19,15 @@ export const useRefreshAccountStateEvent = (asyncCallback: (event: RefreshAccoun
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
+3
-3
@@ -20,15 +20,15 @@ export const useShowProviderBillingModalEvent = (asyncCallback: (event: ShowProv
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -20,15 +20,15 @@ export const useShowProviderLoginModalEvent = (asyncCallback: (event: ShowProvid
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
+3
-3
@@ -23,15 +23,15 @@ export const useSubscriptionPlanChangedEvent = (
|
||||
);
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then((f) => f());
|
||||
void unlisten.then((f) => f());
|
||||
};
|
||||
}, []);
|
||||
};
|
||||
|
||||
+3
-3
@@ -27,15 +27,15 @@ export const useTextToImageGenerationCompleteEvent = (asyncCallback: (event: Tex
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
+3
-3
@@ -27,15 +27,15 @@ export const useVideoGenerationCompleteEvent = (asyncCallback: (event: VideoGene
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -25,15 +25,15 @@ export const useGenerationCompleteEvent = () => {
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
+3
-3
@@ -26,15 +26,15 @@ export const useGenerationEnqueueFailureEvent = () => {
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
+3
-3
@@ -25,15 +25,15 @@ export const useGenerationEnqueueSuccessEvent = () => {
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -26,15 +26,15 @@ export const useGenerationFailedEvent = () => {
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -28,15 +28,15 @@ export const useFlashFileDownloadErrorEvent = (asyncCallback: (event: FlashFileD
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -19,15 +19,15 @@ export const useFlashUserInputErrorEvent = (asyncCallback: (event: FlashUserInpu
|
||||
});
|
||||
|
||||
if (isUnmounted) {
|
||||
unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
|
||||
}
|
||||
};
|
||||
|
||||
setup();
|
||||
void setup();
|
||||
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
void unlisten.then(f => f());
|
||||
};
|
||||
|
||||
}, []);
|
||||
|
||||
@@ -16,7 +16,7 @@ export function useTauriWindowControls() {
|
||||
let unlistenUnmax: (() => void) | undefined;
|
||||
let unlistenResize: (() => void) | undefined;
|
||||
|
||||
(async () => {
|
||||
void (async () => {
|
||||
try {
|
||||
const win = await getCurrentWindowSafe();
|
||||
setIsMaximized(await win.isMaximized());
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
sonar.projectKey=storytold_artcraft
|
||||
sonar.organization=storytold
|
||||
|
||||
# CI only publishes the Rust lcov report, so TypeScript and JavaScript never
|
||||
# appear covered. Same idea as anicraft excluding JS/PowerShell/Python, and
|
||||
# as filmcraft and lightcraft excluding tools/docs/examples.
|
||||
sonar.coverage.exclusions=**/*.ts,**/*.tsx,**/*.js,**/*.jsx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user