Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inform user to create a space when there are none #956 #957

Merged
merged 11 commits into from
Aug 22, 2024
64 changes: 30 additions & 34 deletions studio/src/components/GlobalNav/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,40 +194,36 @@ function Sidebar({ permission, orgs, loading, applications, menuKey, signOut, or
}
/>
) : (
<>
{details && (
<Button
style={{
background: '#DCE4E7',
width: '100%',
color: '#1E1E1E',
border: 'none',
fontWeight: '600',
fontSize: '1rem',
display: 'flex',
marginTop: '0.8rem',
height: '43px',
padding: '9px, 6px, 9px, 6px',
justifyContent: 'space-between',
alignItems: 'center',
}}
type="primary"
onClick={() => dispatch(setSpaceSelectorPage(true))}
>
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
<Avatar
src={
details[selected]?.fav_icon?.url?.[
window.REACT_APP_ENABLE_IMGPROXY ? 'proxy' : 'raw'
] || degaImg
}
/>
{details[selected]?.name}
</div>
<DownOutlined />
</Button>
)}
</>
<Button
style={{
background: '#DCE4E7',
width: '100%',
color: '#1E1E1E',
border: 'none',
fontWeight: '600',
fontSize: '1rem',
display: 'flex',
marginTop: '0.8rem',
height: '43px',
padding: '9px, 6px, 9px, 6px',
justifyContent: 'space-between',
alignItems: 'center',
}}
type="primary"
onClick={() => dispatch(setSpaceSelectorPage(true))}
>
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
<Avatar
src={
details[selected]?.fav_icon?.url?.[
window.REACT_APP_ENABLE_IMGPROXY ? 'proxy' : 'raw'
] || degaImg
}
/>
{details[selected]?.name}
</div>
<DownOutlined />
</Button>
)}
</div>
<Search collapsed={collapsed} />
Expand Down
4 changes: 0 additions & 4 deletions studio/src/pages/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import { Link } from 'react-router-dom';
import { Helmet } from 'react-helmet';
import Loader from '../../components/Loader';

const styles = {
justifyContent: 'center',
};

function Dashboard() {
const { Title } = Typography;
const { spaces, info } = useSelector(({ spaces, info }) => ({
Expand Down
11 changes: 1 addition & 10 deletions studio/src/pages/spaces/components/SpaceCreateForm.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { Button, Form, Input, Select, Row, Col, ConfigProvider } from 'antd';
import { Button, Form, Input, Select, ConfigProvider } from 'antd';
import { maker } from './../../../utils/sluger';
import MonacoEditor from '../../../components/MonacoEditor';
import getJsonValue from '../../../utils/getJsonValue';
import { SlugInput } from '../../../components/FormItems';

const { Option } = Select;
const { TextArea } = Input;

const tailLayout = {
wrapperCol: { offset: 8, span: 16 },
};

const SpaceCreateForm = ({ onCreate }) => {
const [form] = Form.useForm();
const orgs = useSelector((state) => state.spaces.orgs);
Expand Down Expand Up @@ -86,10 +81,6 @@ const SpaceCreateForm = ({ onCreate }) => {
</Form.Item>
</Input.Group>
</Form.Item>
<SlugInput />
<Form.Item name="site_title" label="Title">
<Input />
</Form.Item>
<Form.Item name="tag_line" label="Tag line">
<Input />
</Form.Item>
Expand Down