mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Implement updated DocMenu UI: list/card mode and sort mode.
Summary: - Add org-wide currentSort and currentView, saved as user preferences. - Add per-workspace currentSort and currentView, backed by localStorage. - Move localStorage-based observables to a separate file. - Move hard-coded data about example docs to a separate file. - Add UI for toggling sort and view mode. - Removed unused features of buttonSelect to simplify it, and added support for light style of buttons. - Added `parse` helper method to StringUnion, and use it in a few places where it simplifies code. - Set `needRealOrg: true` in HomeDBManager.updateOrg() to fix saving prefs for mergedOrg. Test Plan: WIP: Fixed some affected tests. New tests not yet written. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2587
This commit is contained in:
@@ -1216,6 +1216,7 @@ export class HomeDBManager extends EventEmitter {
|
||||
const orgQuery = this.org(scope, orgKey, {
|
||||
manager,
|
||||
markPermissions,
|
||||
needRealOrg: true
|
||||
});
|
||||
const queryResult = await verifyIsPermitted(orgQuery);
|
||||
if (queryResult.status !== 200) {
|
||||
@@ -3198,11 +3199,11 @@ export class HomeDBManager extends EventEmitter {
|
||||
const prefs = this._normalizeQueryResults(subValue, childOptions);
|
||||
for (const pref of prefs) {
|
||||
if (pref.orgId && pref.userId) {
|
||||
value['userOrgPrefs'] = pref.prefs;
|
||||
value.userOrgPrefs = pref.prefs;
|
||||
} else if (pref.orgId) {
|
||||
value['orgPrefs'] = pref.prefs;
|
||||
value.orgPrefs = pref.prefs;
|
||||
} else if (pref.userId) {
|
||||
value['userPrefs'] = pref.prefs;
|
||||
value.userPrefs = pref.prefs;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user