feat: expose PWA, app identity, and extension directory keys in JSON config #312
This commit is contained in:
@@ -8,7 +8,7 @@ import { createContext, useContext } from "react";
|
||||
* read this to hide their own NavigationRail and let the shell own the
|
||||
* chrome.
|
||||
*
|
||||
* Provided via context by the Pro shell — no URL coupling, no iframe.
|
||||
* Provided via context by the Pro shell - no URL coupling, no iframe.
|
||||
*/
|
||||
export const EmbeddedContext = createContext<boolean>(false);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export function useMediaQuery(query: string): boolean {
|
||||
/**
|
||||
* When the Pro shell renders a page inside a (possibly split) pane, that pane
|
||||
* publishes its measured width via `PaneSizeContext`. Inner pages should
|
||||
* branch their layout against the pane width — not the full viewport — so a
|
||||
* branch their layout against the pane width - not the full viewport - so a
|
||||
* narrow pane gets the mobile/tablet layout instead of overflowing.
|
||||
*
|
||||
* Returns `null` when no pane size is published, signalling the caller to
|
||||
@@ -63,7 +63,7 @@ function classifyPane(paneWidth: number | null) {
|
||||
*
|
||||
* When invoked inside a Pro pane, the returned values reflect the pane's
|
||||
* width instead of the window's. The global UI store is NOT updated in that
|
||||
* case — two split panes would otherwise fight to write conflicting values,
|
||||
* case - two split panes would otherwise fight to write conflicting values,
|
||||
* and the store is meant to mirror the actual viewport for callers that read
|
||||
* it directly (mobile navigation helpers etc.).
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ import { createContext, useContext } from "react";
|
||||
|
||||
/**
|
||||
* Width of the pane that's hosting the current subtree, in CSS pixels.
|
||||
* `null` means "no pane is providing a size" — fall back to viewport-based
|
||||
* `null` means "no pane is providing a size" - fall back to viewport-based
|
||||
* media queries. Set by the Pro shell on each split pane via ResizeObserver.
|
||||
*/
|
||||
export const PaneSizeContext = createContext<number | null>(null);
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useIsEmbedded } from "@/hooks/use-is-embedded";
|
||||
|
||||
/**
|
||||
* When the Pro shell is the active interface, aggregate calendars from
|
||||
* every connected account so the calendar sidebar lists them all — the
|
||||
* every connected account so the calendar sidebar lists them all - the
|
||||
* same way [[use-pro-multi-account-mailboxes]] does for mail folders.
|
||||
*
|
||||
* Returns the resolved list of `{ localAccountId, client }` pairs so the
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useSettingsStore } from "@/stores/settings-store";
|
||||
import { useIsEmbedded } from "@/hooks/use-is-embedded";
|
||||
|
||||
/**
|
||||
* Pro-shell counterpart to [[useProMultiAccountCalendars]] — aggregates
|
||||
* Pro-shell counterpart to [[useProMultiAccountCalendars]] - aggregates
|
||||
* contacts and address books from every connected JMAP account so the
|
||||
* contacts sidebar lists them all, grouped by local account.
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ export function stripCrossAccountIdentityPrefix(id: string): { localAccountId: s
|
||||
/**
|
||||
* Pro shell only: load identities from every connected account and group
|
||||
* them by local account so the composer's From dropdown can render an
|
||||
* <optgroup> per account — mirrors [[useProMultiAccountCalendars]] and
|
||||
* <optgroup> per account - mirrors [[useProMultiAccountCalendars]] and
|
||||
* [[useProMultiAccountContacts]].
|
||||
*
|
||||
* Outside Pro / embedded mode the hook returns `enabled: false` and the
|
||||
@@ -82,7 +82,7 @@ export function useProMultiAccountIdentities(): {
|
||||
const list = await client.getIdentities();
|
||||
if (!cancelled) next[account.id] = list;
|
||||
} catch {
|
||||
// Skip accounts that fail to load identities — one bad
|
||||
// Skip accounts that fail to load identities - one bad
|
||||
// account shouldn't blank the whole dropdown.
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user