mirror of
https://github.com/magnum-opus-nn-cp/frontend.git
synced 2024-11-23 10:03:47 +03:00
fix: add small fixes
This commit is contained in:
parent
3815bb7b5e
commit
dbfd8e8b4f
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#fafafa" />
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
name="description"
|
||||||
content="Web site created using create-react-app"
|
content="Web site created using create-react-app"
|
||||||
|
|
|
@ -17,6 +17,7 @@ body {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
font-feature-settings: 'pnum' on, 'lnum' on;
|
font-feature-settings: 'pnum' on, 'lnum' on;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
|
|
|
@ -24,13 +24,15 @@
|
||||||
|
|
||||||
.DefaultLayout__header {
|
.DefaultLayout__header {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: $spacing-small-4x $spacing-medium;
|
|
||||||
margin-bottom: $spacing-medium-x;
|
margin-bottom: $spacing-medium-x;
|
||||||
|
|
||||||
@include mobile-up {
|
@include mobile-up {
|
||||||
grid-template: 'mopus cp cbr'/ auto 1fr auto;
|
grid-template:
|
||||||
|
'mopus cp cbr'
|
||||||
|
/ auto 1fr auto;
|
||||||
height: $header-height;
|
height: $header-height;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
column-gap: $spacing-medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mobile-down {
|
@include mobile-down {
|
||||||
|
@ -39,11 +41,12 @@
|
||||||
'mopus cbr'
|
'mopus cbr'
|
||||||
/ 1fr auto;
|
/ 1fr auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
row-gap: $spacing-small-4x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.DefaultLayout__logo {
|
.DefaultLayout__logo {
|
||||||
width: fit-content;
|
width: auto;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +57,11 @@
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
grid-area: mopus;
|
grid-area: mopus;
|
||||||
height: $header-height;
|
height: $header-height;
|
||||||
width: fit-content;
|
}
|
||||||
|
|
||||||
|
.DefaultLayout__logo_mopus {
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DefaultLayout__logo_cp {
|
.DefaultLayout__logo_cp {
|
||||||
|
|
|
@ -2,9 +2,9 @@ import { Link, Outlet } from 'react-router-dom';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { ReactFCC } from '../../../utils/ReactFCC';
|
import { ReactFCC } from '../../../utils/ReactFCC';
|
||||||
import { HOME_PAGE_ROUTE } from '../../../app/routes';
|
import { HOME_PAGE_ROUTE } from '../../../app/routes';
|
||||||
import cbrLogoSrc from './assets/cbr-logo.svg';
|
import cbrLogoSrc from './assets/cbr-logo.png';
|
||||||
import cpLogoSrc from './assets/cp-logo.svg';
|
import cpLogoSrc from './assets/cp-logo.png';
|
||||||
import mopusLogoSrc from './assets/mopus-logo.svg';
|
import mopusLogoSrc from './assets/mopus-logo.png';
|
||||||
import s from './DefaultLayout.module.scss';
|
import s from './DefaultLayout.module.scss';
|
||||||
|
|
||||||
export const DefaultLayout: ReactFCC = () => {
|
export const DefaultLayout: ReactFCC = () => {
|
||||||
|
@ -13,7 +13,7 @@ export const DefaultLayout: ReactFCC = () => {
|
||||||
<div className={s.DefaultLayout__container}>
|
<div className={s.DefaultLayout__container}>
|
||||||
<header className={s.DefaultLayout__header}>
|
<header className={s.DefaultLayout__header}>
|
||||||
<Link to={HOME_PAGE_ROUTE} className={s.DefaultLayout__logoMopusContainer} reloadDocument>
|
<Link to={HOME_PAGE_ROUTE} className={s.DefaultLayout__logoMopusContainer} reloadDocument>
|
||||||
<img className={s.DefaultLayout__logo} src={mopusLogoSrc} alt={''} />
|
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_mopus)} src={mopusLogoSrc} alt={''} />
|
||||||
</Link>
|
</Link>
|
||||||
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_cp)} src={cpLogoSrc} alt={''} />
|
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_cp)} src={cpLogoSrc} alt={''} />
|
||||||
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_cbr)} src={cbrLogoSrc} alt={''} />
|
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_cbr)} src={cbrLogoSrc} alt={''} />
|
||||||
|
|
BIN
src/pages/_layouts/DefaultLayout/assets/cbr-logo.png
Normal file
BIN
src/pages/_layouts/DefaultLayout/assets/cbr-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
BIN
src/pages/_layouts/DefaultLayout/assets/cp-logo.png
Normal file
BIN
src/pages/_layouts/DefaultLayout/assets/cp-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
BIN
src/pages/_layouts/DefaultLayout/assets/mopus-logo.png
Normal file
BIN
src/pages/_layouts/DefaultLayout/assets/mopus-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -37,7 +37,14 @@ export const HomePage: ReactFCC = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [processId, setProcessId] = useState<string | null>(null);
|
// const [processId, setProcessId] = useState<string | null>(null);
|
||||||
|
|
||||||
|
const {
|
||||||
|
data: createProcessResponse,
|
||||||
|
mutateAsync: createProcess,
|
||||||
|
isLoading: createProcessLoading
|
||||||
|
} = useCreateProcess();
|
||||||
|
const processId = createProcessResponse?.id;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: process,
|
data: process,
|
||||||
|
@ -50,8 +57,6 @@ export const HomePage: ReactFCC = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { mutateAsync: createProcess, isLoading: createProcessLoading } = useCreateProcess();
|
|
||||||
|
|
||||||
const timeout = useSingleTimeout();
|
const timeout = useSingleTimeout();
|
||||||
|
|
||||||
const onSubmit: SubmitHandler<FormFields> = useCallback(
|
const onSubmit: SubmitHandler<FormFields> = useCallback(
|
||||||
|
@ -61,7 +66,7 @@ export const HomePage: ReactFCC = () => {
|
||||||
files: data.files
|
files: data.files
|
||||||
});
|
});
|
||||||
|
|
||||||
setProcessId(response.id);
|
// setProcessId(response.id);
|
||||||
},
|
},
|
||||||
[createProcess]
|
[createProcess]
|
||||||
);
|
);
|
||||||
|
@ -110,7 +115,8 @@ export const HomePage: ReactFCC = () => {
|
||||||
|
|
||||||
// ------ Логика UI ------
|
// ------ Логика UI ------
|
||||||
|
|
||||||
const isLoading = createProcessLoading || processFetching || !!(process && process.current < process.total);
|
const isLoading =
|
||||||
|
createProcessLoading || !!processId || processFetching || !!(process && process.current < process.total);
|
||||||
const isDisabled = !currentText && currentFiles.length === 0;
|
const isDisabled = !currentText && currentFiles.length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user