Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

459 B
Raw Blame
import type { OpenDialogOptions } from "@tauri-apps/plugin-dialog";
import type { OsType } from "@tauri-apps/plugin-os";

export const getExistingRecordingPickerOptions = (
	platform: OsType,
	defaultPath: string,
): OpenDialogOptions => {
	if (platform === "windows") {
		return {
			defaultPath,
			directory: true,
			multiple: false,
		};
	}

	return {
		defaultPath,
		filters: [{ name: "Cap Recording", extensions: ["cap"] }],
		multiple: false,
	};
};