diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index f3f927e376..e14002a0f7 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import cx from 'classnames'; import { datasourceService, dataqueryService, @@ -19,9 +18,6 @@ import { componentTypes } from './WidgetManager/components'; import { Inspector } from './Inspector/Inspector'; import { DataSourceTypes } from './DataSourceManager/SourceComponents'; import { QueryManager, QueryPanel } from './QueryManager'; -import { Link } from 'react-router-dom'; -import { ManageAppUsers } from './ManageAppUsers'; -import { ReleaseVersionButton } from './ReleaseVersionButton'; import { onComponentOptionChanged, onComponentOptionsChanged, @@ -44,25 +40,19 @@ import config from 'config'; import queryString from 'query-string'; import { toast } from 'react-hot-toast'; import { produce, enablePatches, setAutoFreeze, applyPatches } from 'immer'; -import { AppVersionsManager } from './AppVersionsManager/List'; import { SearchBox } from '@/_components/SearchBox'; import { createWebsocketConnection } from '@/_helpers/websocketConnection'; import Tooltip from 'react-bootstrap/Tooltip'; import OverlayTrigger from 'react-bootstrap/OverlayTrigger'; -import RealtimeAvatars from './RealtimeAvatars'; import RealtimeCursors from '@/Editor/RealtimeCursors'; import { initEditorWalkThrough } from '@/_helpers/createWalkThrough'; import { EditorContextWrapper } from './Context/EditorContextWrapper'; import Selecto from 'react-selecto'; import { withTranslation } from 'react-i18next'; import { v4 as uuid } from 'uuid'; -import EditAppName from './Header/EditAppName'; -import HeaderActions from './Header/HeaderActions'; import Skeleton from 'react-loading-skeleton'; -import { GlobalSettings } from './Header/GlobalSettings'; -// eslint-disable-next-line import/no-unresolved -import Logo from '@assets/images/rocket.svg'; import EmptyQueriesIllustration from '@assets/images/icons/no-queries-added.svg'; +import EditorHeader from './Header'; setAutoFreeze(false); enablePatches(); @@ -1783,117 +1773,34 @@ class EditorComponent extends React.Component { darkMode={this.props.darkMode} /> -
-
-
- -

- - - -

- - - - - {this.state.isSaving - ? 'Saving...' - : this.state.saveError - ? 'Could not save changes' - : 'All changes are saved'} - - {config.ENABLE_MULTIPLAYER_EDITING && } - {editingVersion && ( - - )} -
-
- {app.id && ( - - )} -
-
- - - - - - -
-
- {app.id && ( - - )} -
-
-
-
-
+
+
+
+
+

+ + + +

+
+
+
+
+ + +
+ +
+ +
+ + {isSaving ? 'Saving...' : saveError ? 'Could not save changes' : 'Saved changes'} + +
+
+
+
+
+
+ {editingVersion && ( + + )} +
+ {config.ENABLE_MULTIPLAYER_EDITING && ( +
+ +
+ )} +
+
+
+
+
+
+ {app.id && ( + + )} +
+
+ + + + + + +
+
+ {app.id && ( + + )} +
+
+
+
+
+
+
+ ); +} diff --git a/frontend/src/Editor/LeftSidebar/SidebarComment.jsx b/frontend/src/Editor/LeftSidebar/SidebarComment.jsx index 65e035c921..dd5ca134d0 100644 --- a/frontend/src/Editor/LeftSidebar/SidebarComment.jsx +++ b/frontend/src/Editor/LeftSidebar/SidebarComment.jsx @@ -29,6 +29,7 @@ export const LeftSidebarComment = ({ toggleComments, selectedSidebarItem, appVer className={cx(`left-sidebar-item left-sidebar-layout sidebar-comments`, { disabled: !appVersionsId, active: isActive, + dark: darkMode, })} onClick={() => { toggleActive(!isActive); diff --git a/frontend/src/_components/AppLogo.jsx b/frontend/src/_components/AppLogo.jsx new file mode 100644 index 0000000000..8e43a1029c --- /dev/null +++ b/frontend/src/_components/AppLogo.jsx @@ -0,0 +1,22 @@ +import React from 'react'; +import Logo from '@assets/images/rocket.svg'; + +export default function AppLogo({ isLoadingFromHeader, className }) { + const url = window.public_config?.WHITE_LABEL_LOGO; + + return ( + <> + {url ? ( + + ) : ( + <> + {isLoadingFromHeader ? ( + + ) : ( + + )} + + )} + + ); +} diff --git a/frontend/src/_styles/left-sidebar.scss b/frontend/src/_styles/left-sidebar.scss index 4400250bf4..abf907a311 100644 --- a/frontend/src/_styles/left-sidebar.scss +++ b/frontend/src/_styles/left-sidebar.scss @@ -466,7 +466,11 @@ position: fixed !important; top: 0; right: 260px; - padding: 5px 0 0 0 !important; + border-left: 1px solid #d2ddec; + padding: 5px 0 5px 5px !important; +} +.sidebar-comments.dark { + border-color: #324156; } .sidebar-global-settings { position: absolute; diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index d7d67363bc..b95b5f0414 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -137,6 +137,7 @@ button { .header-container { max-width: 100%; padding: 0 10px; + min-height: 45px; } .resizer-select, @@ -4178,6 +4179,7 @@ input[type="text"] { .app-name { width: 200px; left: 84px; + top: 6px; position: absolute; } @@ -4198,9 +4200,6 @@ input[type="text"] { .editor-header-actions { display: flex; - align-items: center; - position: absolute; - left: 25%; color: #868aa5; white-space: nowrap; font-weight: 400; @@ -5349,11 +5348,7 @@ div#driver-page-overlay { } .realtime-avatars { - position: absolute; - min-width: 118px; - right: 307px; - border-right: 1px solid #E6E8EB; - padding: 16px; + padding: 0px } .widget-style-field-header { @@ -5424,8 +5419,6 @@ div#driver-page-overlay { } .autosave-indicator { - position: absolute; - left: 44%; color: #868aa5; white-space: nowrap; font-weight: 400; @@ -6670,7 +6663,7 @@ tbody { padding: 3px 3px 3px 0px; } - .editor-center-wrapper {} + .right-bar { height: 100%; @@ -7260,7 +7253,6 @@ tbody { border-right: 1px solid #E6E8EB; padding-right: 12px !important; padding-left: 4px; - padding-top: 1rem; padding-bottom: 1rem; } @@ -7398,6 +7390,18 @@ tbody { height: 52px; } +.release-buttons { + height: 45px; + margin-bottom: 10px; +} + +.global-settings-app-wrapper { + max-width: 300px; +} + +.version-manager-container { + padding: 0.6rem; +} // tooljet db fields styles [ query manager ] .tj-db-field-wrapper { .code-hinter-wrapper {