mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-25 00:20:57 -05:00
feat: notify user of aup when creating server (#495)
This commit is contained in:
parent
5d4ef8b178
commit
3f9e6fc2e2
2 changed files with 20 additions and 0 deletions
|
@ -104,6 +104,11 @@ const ModalContent = styled.div<
|
|||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
color: var(--tertiary-foreground);
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
${(props) =>
|
||||
!props.noBackground &&
|
||||
css`
|
||||
|
@ -174,6 +179,7 @@ export default function Modal(props: Props) {
|
|||
border={props.border}
|
||||
padding={props.padding ?? !props.dontModal}>
|
||||
{props.title && <h3>{props.title}</h3>}
|
||||
|
||||
{props.description && <h5>{props.description}</h5>}
|
||||
{props.children}
|
||||
</ModalContent>
|
||||
|
|
|
@ -17,6 +17,7 @@ interface Props {
|
|||
onClose: () => void;
|
||||
question: Children;
|
||||
field?: Children;
|
||||
description?: Children;
|
||||
defaultValue?: string;
|
||||
callback: (value: string) => Promise<void>;
|
||||
}
|
||||
|
@ -25,6 +26,7 @@ export function InputModal({
|
|||
onClose,
|
||||
question,
|
||||
field,
|
||||
description,
|
||||
defaultValue,
|
||||
callback,
|
||||
}: Props) {
|
||||
|
@ -36,6 +38,7 @@ export function InputModal({
|
|||
<Modal
|
||||
visible={true}
|
||||
title={question}
|
||||
description={description}
|
||||
disabled={processing}
|
||||
actions={[
|
||||
{
|
||||
|
@ -113,6 +116,17 @@ export function SpecialInputModal(props: SpecialProps) {
|
|||
onClose={onClose}
|
||||
question={<Text id="app.main.servers.create" />}
|
||||
field={<Text id="app.main.servers.name" />}
|
||||
description={
|
||||
<div>
|
||||
By creating this server, you agree to the{" "}
|
||||
<a
|
||||
href="https://revolt.chat/aup"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
Acceptable Use Policy.
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
callback={async (name) => {
|
||||
const server = await client.servers.createServer({
|
||||
name,
|
||||
|
|
Loading…
Reference in a new issue