(core) New look for site switcher in top-left corner, with support for per-org logos

Summary:
  - Site switcher will show initials (either from user's name or team name),
  - Anonymous users see a grist logo on personal site, but team logo (or initials) on team site,
  - Admin pages (and other pages without orgs) show grist logo,
  - Custom image can be switched on the billing page, common formats are supported up to 100KB.
  - Larger images are down-scaled (on the front-end)
  - SVG larger than 100KB are not accepted
  - Files are stored as data URL's in org prefs,

Test Plan: Added new tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4341
This commit is contained in:
Jarosław Sadziński
2024-10-07 16:54:03 +02:00
parent e8f9da9b5c
commit 0bdc838975
15 changed files with 267 additions and 91 deletions

View File

@@ -25,6 +25,8 @@ describe('limits', function() {
testUtils.setTmpLogLevel('error');
this.timeout('10s');
before(async function() {
home = new TestServer(this);
await home.start(["home", "docs"]);
@@ -222,7 +224,9 @@ describe('limits', function() {
});
it('can enforce limits on number of doc shares', async function() {
this.timeout(4000); // This can exceed the default of 2s on Jenkins
// This can exceed the default of 2s on Jenkins
// - Changed from 4s to 8s on 2024-10-04
this.timeout('8s');
await setFeatures({maxSharesPerDoc: 3, workspaces: true});
const wsId = await api.newWorkspace({name: 'shares'}, 'docs');