Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(desktop): configure the preview User-Agent per profile #16617

ClosedTheLoroXD(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/16617/headopened View on GitHub

Showing 5 changed files with 63 additions and 6 deletions (loading 2).

x
0 of 5 viewed, 5 left
1 addition and 1 deletionapps/desktop/src/settings/DesktopClientSettings.test.tsModified
View file
@@ -27,7 +27,7 @@
browserRecordingFrameRate: 60,
browserLinkTarget: "app",
browserAutoShowFloatingPreview: false,
- browserProfiles: [{ id: "work", name: "Work", kind: "persistent" }],
+ browserProfiles: [{ id: "work", name: "Work", kind: "persistent", userAgentMode: "chrome" }],
browserDefaultProfileId: "work",
confirmQuit: "double-click",
confirmThreadArchive: true,
15 additions and 5 deletionsapps/web/src/browser/HostedBrowserWebview.tsxModified
View file
@@ -1,16 +1,19 @@
"use client";
​
-import type {
- DesktopPreviewColorScheme,
- PreviewViewportSetting,
- ScopedThreadRef,
+import {
+ browserProfileUserAgent,
+ findBrowserProfile,
+ resolveBrowserProfiles,
+ type DesktopPreviewColorScheme,
+ type PreviewViewportSetting,
+ type ScopedThreadRef,
} from "@t3tools/contracts";
import { useShallow } from "zustand/react/shallow";
import { useCallback, useEffect, useRef, useState } from "react";
​