Skip to content

Commit

Permalink
v1.168.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
varovaro committed May 20, 2024
2 parents 70fece5 + 79cc98e commit 0bbbff6
Show file tree
Hide file tree
Showing 33 changed files with 747 additions and 3,579 deletions.
4 changes: 3 additions & 1 deletion app/api/tenants/tenantContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { handleError } from 'api/utils';
import { appContext } from 'api/utils/AppContext';
import { TenantDocument, TenantsModel, DBTenant, tenantsModel } from './tenantsModel';

export type Tenant = {
type Tenant = {
name: string;
dbName: string;
indexName: string;
Expand All @@ -14,6 +14,7 @@ export type Tenant = {
featureFlags?: {
s3Storage?: boolean;
};
globalMatomo?: { id: string; url: string };
};

class Tenants {
Expand Down Expand Up @@ -81,3 +82,4 @@ class Tenants {

const tenants = new Tenants(config.defaultTenant);
export { tenants };
export type { Tenant };
11 changes: 8 additions & 3 deletions app/react/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import React from 'react';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import { createStore, Provider } from 'jotai';
import { Provider } from 'jotai';
import { Provider as ReduxProvider } from 'react-redux';
import { getRoutes } from './Routes';
import CustomProvider from './App/Provider';
import { settingsAtom, templatesAtom, translationsAtom, thesaurisAtom } from './V2/atoms';
import {
settingsAtom,
templatesAtom,
translationsAtom,
thesaurisAtom,
atomStore,
} from './V2/atoms';
import { relationshipTypesAtom } from './V2/atoms/relationshipTypes';
import { store } from './store';

Expand All @@ -16,7 +22,6 @@ const thesauris = reduxState?.thesauris.toJS() || [];

const router = createBrowserRouter(getRoutes(settings, reduxState?.user.get('_id')));

const atomStore = createStore();
atomStore.set(settingsAtom, settings);
atomStore.set(templatesAtom, templates);
atomStore.set(thesaurisAtom, thesauris);
Expand Down
4 changes: 2 additions & 2 deletions app/react/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { TranslateForm, t } from 'app/I18N';
import { Icon } from 'UI';
import { socket } from 'app/socket';
import { NotificationsContainer } from 'V2/Components/UI';
import { settingsAtom } from 'app/V2/atoms/settingsAtom';
import { Matomo } from 'app/V2/Components/Analitycs';
import { settingsAtom } from 'V2/atoms/settingsAtom';
import Confirm from './Confirm';
import { Menu } from './Menu';
import { AppMainContext } from './AppMainContext';
import SiteName from './SiteName';
import GoogleAnalytics from './GoogleAnalytics';
import { Matomo } from './Matomo';
import 'react-widgets/dist/css/react-widgets.css';
import 'bootstrap/dist/css/bootstrap.css';
import 'nprogress/nprogress.css';
Expand Down
52 changes: 0 additions & 52 deletions app/react/App/Matomo.js

This file was deleted.

5 changes: 5 additions & 0 deletions app/react/App/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ class Root extends Component {
innerHtml += `window.__user__ = ${serialize(this.props.user, { isJSON: true })};`;
}

if (this.props.atomStoreData) {
innerHtml += `window.__atomStoreData__ = ${serialize(this.props.atomStoreData, { isJSON: true })};`;
}

return (
<script dangerouslySetInnerHTML={{ __html: innerHtml }} /> //eslint-disable-line
);
Expand Down Expand Up @@ -125,6 +129,7 @@ Root.propTypes = {
content: PropTypes.string,
language: PropTypes.string,
assets: PropTypes.object,
atomStoreData: PropTypes.object,
};

export { headTag };
Expand Down
62 changes: 0 additions & 62 deletions app/react/App/specs/Matomo.spec.js

This file was deleted.

Loading

0 comments on commit 0bbbff6

Please sign in to comment.