diff --git a/src/common/NoMenuLayout.scss b/src/common/NoMenuLayout.scss index de288432..ffacd0af 100644 --- a/src/common/NoMenuLayout.scss +++ b/src/common/NoMenuLayout.scss @@ -1,3 +1,3 @@ .no-menu-wrapper { - padding: 40px 20px 20px; + padding: 30px 20px 20px; } diff --git a/src/common/NoMenuLayout.tsx b/src/common/NoMenuLayout.tsx index ac4f1dcc..dfddde05 100644 --- a/src/common/NoMenuLayout.tsx +++ b/src/common/NoMenuLayout.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; import './NoMenuLayout.scss'; -const NoMenuLayout: FC = ({ children }) =>
{children}
; +const NoMenuLayout: FC = ({ children }) =>
{children}
; export default NoMenuLayout; diff --git a/src/servers/helpers/ServerError.tsx b/src/servers/helpers/ServerError.tsx index 73538012..17d14be6 100644 --- a/src/servers/helpers/ServerError.tsx +++ b/src/servers/helpers/ServerError.tsx @@ -4,6 +4,7 @@ import Message from '../../utils/Message'; import ServersListGroup from '../ServersListGroup'; import { DeleteServerButtonProps } from '../DeleteServerButton'; import { isServerWithId, SelectedServer, ServersMap } from '../data'; +import NoMenuLayout from '../../common/NoMenuLayout'; import './ServerError.scss'; interface ServerErrorProps { @@ -14,32 +15,34 @@ interface ServerErrorProps { export const ServerError = (DeleteServerButton: FC): FC => ( { servers, selectedServer }, ) => ( -
-
- - {!isServerWithId(selectedServer) && 'Could not find this Shlink server.'} - {isServerWithId(selectedServer) && ( - <> -

Oops! Could not connect to this Shlink server.

- Make sure you have internet connection, and the server is properly configured and on-line. - - )} -
-
- - - These are the Shlink servers currently configured. Choose one of - them or add a new one. - - - {isServerWithId(selectedServer) && ( -
-
- Alternatively, if you think you may have miss-configured this server, you - can remove it or  - edit it. -
+ +
+
+ + {!isServerWithId(selectedServer) && 'Could not find this Shlink server.'} + {isServerWithId(selectedServer) && ( + <> +

Oops! Could not connect to this Shlink server.

+ Make sure you have internet connection, and the server is properly configured and on-line. + + )} +
- )} -
+ + + These are the Shlink servers currently configured. Choose one of + them or add a new one. + + + {isServerWithId(selectedServer) && ( +
+
+ Alternatively, if you think you may have miss-configured this server, you + can remove it or  + edit it. +
+
+ )} +
+ ); diff --git a/src/servers/helpers/withSelectedServer.tsx b/src/servers/helpers/withSelectedServer.tsx index d0a08b88..742bf160 100644 --- a/src/servers/helpers/withSelectedServer.tsx +++ b/src/servers/helpers/withSelectedServer.tsx @@ -2,6 +2,7 @@ import { FC, useEffect } from 'react'; import { RouteComponentProps } from 'react-router'; import Message from '../../utils/Message'; import { isNotFoundServer, SelectedServer } from '../data'; +import NoMenuLayout from '../../common/NoMenuLayout'; interface WithSelectedServerProps extends RouteComponentProps<{ serverId: string }> { selectServer: (serverId: string) => void; @@ -18,9 +19,9 @@ export function withSelectedServer(WrappedComponent: FC - -
+ + + ); } diff --git a/src/utils/Message.tsx b/src/utils/Message.tsx index 5a452045..70363983 100644 --- a/src/utils/Message.tsx +++ b/src/utils/Message.tsx @@ -26,14 +26,21 @@ const getTextClassForType = (type: MessageType) => { interface MessageProps { noMargin?: boolean; loading?: boolean; + fullWidth?: boolean; type?: MessageType; } -const Message: FC = ({ children, loading = false, noMargin = false, type = 'default' }) => { +const Message: FC = ( + { children, loading = false, noMargin = false, type = 'default', fullWidth = false }, +) => { const cardClasses = classNames(getClassForType(type), { 'mt-4': !noMargin }); + const classes = classNames({ + 'col-md-12': fullWidth, + 'col-md-10 offset-md-1': !fullWidth, + }); return ( -
+

{loading && }