mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 15:51:14 +00:00
add legal_info field to SiteForm, add missing file
This commit is contained in:
parent
39379eb786
commit
0f62113ff1
2 changed files with 34 additions and 0 deletions
32
src/shared/components/home/legal.tsx
Normal file
32
src/shared/components/home/legal.tsx
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import { Component } from "inferno";
|
||||||
|
import { GetSiteResponse } from "lemmy-js-client";
|
||||||
|
import { i18n } from "../../i18next";
|
||||||
|
import { md, setIsoData } from "../../utils";
|
||||||
|
|
||||||
|
interface LegalState {
|
||||||
|
siteRes: GetSiteResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Legal extends Component<any, LegalState> {
|
||||||
|
private isoData = setIsoData(this.context);
|
||||||
|
private emptyState: LegalState = {
|
||||||
|
siteRes: this.isoData.site_res,
|
||||||
|
};
|
||||||
|
|
||||||
|
constructor(props: any, context: any) {
|
||||||
|
super(props, context);
|
||||||
|
this.state = this.emptyState;
|
||||||
|
}
|
||||||
|
|
||||||
|
get documentTitle(): string {
|
||||||
|
return i18n.t("legal_information");
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div class="container">
|
||||||
|
{md(this.state.siteRes.site_view.site.legal_information)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,6 +39,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
application_question: null,
|
application_question: null,
|
||||||
private_instance: null,
|
private_instance: null,
|
||||||
default_theme: null,
|
default_theme: null,
|
||||||
|
legal_information: null,
|
||||||
auth: authField(false),
|
auth: authField(false),
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -76,6 +77,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
application_question: site.application_question,
|
application_question: site.application_question,
|
||||||
private_instance: site.private_instance,
|
private_instance: site.private_instance,
|
||||||
default_theme: site.default_theme,
|
default_theme: site.default_theme,
|
||||||
|
legal_information: site.legal_information,
|
||||||
auth: authField(false),
|
auth: authField(false),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue