mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Remove code related to newui
Summary: Change code that conditionally depended on #newui in the URL to assume that everything is always in the new UI now. Test Plan: this Reviewers: dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D3246
This commit is contained in:
@@ -64,7 +64,6 @@ export interface IGristUrlState {
|
||||
mode?: OpenDocMode;
|
||||
fork?: UrlIdParts;
|
||||
docPage?: IDocPage;
|
||||
newui?: boolean;
|
||||
account?: AccountPage;
|
||||
billing?: BillingPage;
|
||||
welcome?: WelcomePage;
|
||||
@@ -198,9 +197,6 @@ export function encodeUrl(gristConfig: Partial<GristLoadConfig>,
|
||||
}
|
||||
|
||||
const queryParams = pickBy(state.params, (v, k) => k !== 'linkParameters') as {[key: string]: string};
|
||||
if (state.newui !== undefined) {
|
||||
queryParams.newui = state.newui ? '1' : '0';
|
||||
}
|
||||
for (const [k, v] of Object.entries(state.params?.linkParameters || {})) {
|
||||
queryParams[`${k}_`] = v;
|
||||
}
|
||||
@@ -276,7 +272,6 @@ export function decodeUrl(gristConfig: Partial<GristLoadConfig>, location: Locat
|
||||
}
|
||||
}
|
||||
if (map.has('m')) { state.mode = OpenDocMode.parse(map.get('m')); }
|
||||
if (sp.has('newui')) { state.newui = useNewUI(sp.get('newui') ? sp.get('newui') === '1' : undefined); }
|
||||
if (map.has('account')) { state.account = AccountPage.parse('account') || 'profile'; }
|
||||
if (map.has('billing')) { state.billing = BillingSubPage.parse(map.get('billing')) || 'billing'; }
|
||||
if (map.has('welcome')) { state.welcome = WelcomePage.parse(map.get('welcome')) || 'user'; }
|
||||
@@ -331,10 +326,6 @@ export function decodeUrl(gristConfig: Partial<GristLoadConfig>, location: Locat
|
||||
return state;
|
||||
}
|
||||
|
||||
export function useNewUI(newui: boolean|undefined) {
|
||||
return newui !== false;
|
||||
}
|
||||
|
||||
// Returns a function suitable for user with makeUrl/setHref/etc, which updates aclAsUser*
|
||||
// linkParameters in the current state, unsetting them if email is null. Optional extraState
|
||||
// allows setting other properties (e.g. 'docPage') at the same time.
|
||||
|
||||
Reference in New Issue
Block a user