Skip to content

Commit

Permalink
Add first global user actions
Browse files Browse the repository at this point in the history
  • Loading branch information
maiwald committed Oct 14, 2024
1 parent 0ba6e41 commit 24d5006
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
17 changes: 14 additions & 3 deletions app/packs/src/apps/mydb/App.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import React, { Component } from 'react';
import { Col, Row, Container } from 'react-bootstrap';
import { Col, Button, Row, Container } from 'react-bootstrap';
import { FlowViewerModal } from 'chem-generic-ui';
import CollectionManagement from 'src/apps/mydb/collections/CollectionManagement';
import CollectionTree from 'src/apps/mydb/collections/CollectionTree';
import Elements from 'src/apps/mydb/elements/Elements';
import InboxModal from 'src/apps/mydb/inbox/InboxModal';
import InboxButton from 'src/components/contextActions/InboxButton';
import Calendar from 'src/components/calendar/Calendar';
import LoadingModal from 'src/components/common/LoadingModal';
import ProgressModal from 'src/components/common/ProgressModal';
import Navigation from 'src/components/navigation/Navigation';
import NavHead from 'src/components/navigation/NavHead';
import Notifications from 'src/components/Notifications';
import SampleTaskInbox from 'src/components/sampleTaskInbox/SampleTaskInbox';
import SampleTaskNavigationElement from 'src/components/sampleTaskInbox/SampleTaskNavigationElement';
import KeyboardActions from 'src/stores/alt/actions/KeyboardActions';
import UIActions from 'src/stores/alt/actions/UIActions';
import UserActions from 'src/stores/alt/actions/UserActions';
Expand Down Expand Up @@ -152,8 +154,17 @@ class App extends Component {
</div>
<CollectionTree />
</div>
<div>
<span className="bg-danger">Fixed buttons</span>
<div className="d-flex justify-content-center gap-4 py-4">
<InboxButton />
<SampleTaskNavigationElement />

<Button
onClick={() => UserActions.logout()}
variant="light"
title="Log out"
>
<i className="fa fa-sign-out" />
</Button>
</div>
</Col>
<Col xs={10} className="d-flex flex-column">
Expand Down
5 changes: 0 additions & 5 deletions app/packs/src/components/contextActions/ContextActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import ReportUtilButton from 'src/components/contextActions/ReportUtilButton';
import ExportImportButton from 'src/components/contextActions/ExportImportButton';
import ScanCodeButton from 'src/components/contextActions/ScanCodeButton';
import NoticeButton from 'src/components/contextActions/NoticeButton';
import InboxButton from 'src/components/contextActions/InboxButton';
import { PermissionConst } from 'src/utilities/PermissionConst';
import SampleTaskNavigationElement from 'src/components/sampleTaskInbox/SampleTaskNavigationElement';

export default class ContextActions extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -71,11 +69,8 @@ export default class ContextActions extends React.Component {
</ButtonGroup>
<ButtonToolbar className="d-flex flex-nowrap gap-2 align-items-center">
<ScanCodeButton customClass={customClass} />
<InboxButton />
<SampleTaskNavigationElement />
<NoticeButton />
</ButtonToolbar>

</div>
);
}
Expand Down
8 changes: 0 additions & 8 deletions app/packs/src/components/navigation/UserAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,6 @@ export default class UserAuth extends Component {
</NavDropdown.Item>
<NavDropdown.Item eventKey="8" href="/generic_elements_admin">Generic Designer</NavDropdown.Item>
</NavDropdown>
<NavItem
onClick={() => this.logout()}
title="Log out"
className="ms-auto"
role="button"
>
<i className="fa fa-sign-out" />
</NavItem>
</Nav>
{this.renderModal()}
{this.renderAffiliations()}
Expand Down

0 comments on commit 24d5006

Please sign in to comment.