fix(desktop): respect local-origin tauri shell for directory access (#391)
* feat: enable local-origin desktop features and copy in terminal support - Enable arbitrary web loads in desktop web content for TAURI apps. - Guard directory dialog access behind local-origin origin check. - Add copy-to-clipboard support for terminal selections via common shortcuts. * fix: improve initial directory resolution and persistence in directory store
This commit is contained in:
committed by
GitHub
parent
844562749d
commit
3afe0bb45d
@@ -201,8 +201,8 @@ export const getDesktopHomeDirectory = async (): Promise<string | null> => {
|
||||
export const requestDirectoryAccess = async (
|
||||
directoryPath: string
|
||||
): Promise<{ success: boolean; path?: string; projectId?: string; error?: string }> => {
|
||||
// Desktop shell: use native folder picker.
|
||||
if (isTauriShell()) {
|
||||
// Desktop shell on local instance: use native folder picker.
|
||||
if (isTauriShell() && isDesktopLocalOriginActive()) {
|
||||
try {
|
||||
const tauri = (window as unknown as { __TAURI__?: TauriGlobal }).__TAURI__;
|
||||
const selected = await tauri?.dialog?.open?.({
|
||||
|
||||
Reference in New Issue
Block a user