mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-10-20 18:56:30 +00:00
Drop the isElectron flag from the API context
Only the Electron renderer ever set isElectron to true; the web entry passed false. With that package gone the flag is constant, so remove it from ApiCtxRoot, the context types and its consumers, together with the pezkuwi.js.org link base it selected. In-browser account storage and the WebUSB ledger option now follow the settings alone, as they already did on the web. Runtime environment detection (getEnvironment, ExternalWarning) reads the user agent and is left as is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d14acff1d3
commit
f72ba84aac
9 files changed
+15
-30
No files matched your search
@@ -16,7 +16,6 @@ import BeforeApiInit from './overlays/BeforeInit.js';
|
||||
import Apps from './Apps.js';
|
||||
|
||||
interface Props {
|
||||
isElectron: boolean;
|
||||
store?: KeyringStore;
|
||||
}
|
||||
|
||||
@@ -29,7 +28,7 @@ function createTheme (settings: { uiTheme?: string }): ThemeDef {
|
||||
return { theme };
|
||||
}
|
||||
|
||||
function Root ({ isElectron, store }: Props): React.ReactElement<Props> {
|
||||
function Root ({ store }: Props): React.ReactElement<Props> {
|
||||
const [theme, setTheme] = useState(() => createTheme(settings));
|
||||
|
||||
useEffect((): void => {
|
||||
@@ -45,7 +44,6 @@ function Root ({ isElectron, store }: Props): React.ReactElement<Props> {
|
||||
<ApiCtxRoot
|
||||
apiUrl={settings.apiUrl}
|
||||
beforeApiInit={<BeforeApiInit />}
|
||||
isElectron={isElectron}
|
||||
store={store}
|
||||
>
|
||||
<KeyringCtxRoot>
|
||||
|
||||
@@ -21,5 +21,5 @@ if (!rootElement) {
|
||||
}
|
||||
|
||||
createRoot(rootElement).render(
|
||||
<Root isElectron={false} />
|
||||
<Root />
|
||||
);
|
||||
Reference in new issue
Block a user