]> Untitled Git - lemmy-ui.git/commitdiff
Adding reports send email to admins option (#932)
authorDessalines <dessalines@users.noreply.github.com>
Fri, 17 Feb 2023 02:07:22 +0000 (21:07 -0500)
committerGitHub <noreply@github.com>
Fri, 17 Feb 2023 02:07:22 +0000 (21:07 -0500)
lemmy-translations
package.json
src/shared/components/home/site-form.tsx
yarn.lock

index 21808b45ea3ef7fa91654d4f6738b5144da6bfe7..819531ae64c6cba12cb406eb98333fd52988bf3e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 21808b45ea3ef7fa91654d4f6738b5144da6bfe7
+Subproject commit 819531ae64c6cba12cb406eb98333fd52988bf3e
index 7f7abbdb4afc5fea2205c66c71636070e922a03d..ab6f800740a619f04bcb1550a9a46b51ad83aac3 100644 (file)
@@ -45,7 +45,7 @@
     "inferno-server": "^8.0.5",
     "isomorphic-cookie": "^1.2.4",
     "jwt-decode": "^3.1.2",
-    "lemmy-js-client": "0.17.0-rc.62",
+    "lemmy-js-client": "0.17.2-rc.1",
     "markdown-it": "^13.0.1",
     "markdown-it-container": "^3.0.0",
     "markdown-it-footnote": "^3.0.3",
index 668f00dd48116fab733743a085b522f37abc135c..8faa3e58fe61cd39a4a8229aef5ced0e566b6bf4 100644 (file)
@@ -82,6 +82,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
         default_post_listing_type: ls.default_post_listing_type,
         legal_information: ls.legal_information,
         application_email_admins: ls.application_email_admins,
+        reports_email_admins: ls.reports_email_admins,
         hide_modlog_mod_names: ls.hide_modlog_mod_names,
         discussion_languages: this.props.siteRes.discussion_languages,
         slur_filter_regex: ls.slur_filter_regex,
@@ -390,6 +391,25 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
               </div>
             </div>
           </div>
+          <div className="form-group row">
+            <div className="col-12">
+              <div className="form-check">
+                <input
+                  className="form-check-input"
+                  id="create-site-reports-email-admins"
+                  type="checkbox"
+                  checked={this.state.siteForm.reports_email_admins}
+                  onChange={linkEvent(this, this.handleSiteReportsEmailAdmins)}
+                />
+                <label
+                  className="form-check-label"
+                  htmlFor="create-site-reports-email-admins"
+                >
+                  {i18n.t("reports_email_admins")}
+                </label>
+              </div>
+            </div>
+          </div>
           <div className="form-group row">
             <div className="col-12">
               <label
@@ -1117,6 +1137,11 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
     i.setState(i.state);
   }
 
+  handleSiteReportsEmailAdmins(i: SiteForm, event: any) {
+    i.state.siteForm.reports_email_admins = event.target.checked;
+    i.setState(i.state);
+  }
+
   handleSitePrivateInstance(i: SiteForm, event: any) {
     i.state.siteForm.private_instance = event.target.checked;
     i.setState(i.state);
index 2333100ec2a0c30fe3d5ea1cf7fff2f27e323719..dfff890f54171712005a2afb89b98cbc765380df 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -5324,10 +5324,10 @@ leac@^0.6.0:
   resolved "https://registry.yarnpkg.com/leac/-/leac-0.6.0.tgz#dcf136e382e666bd2475f44a1096061b70dc0912"
   integrity sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==
 
-lemmy-js-client@0.17.0-rc.62:
-  version "0.17.0-rc.62"
-  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.17.0-rc.62.tgz#631a87c7358595ade5cb34d7e4b0ca787b50a434"
-  integrity sha512-wOG5oqhmXUrjlo5pEkLMd1xXG261Wd3Z13zeeRr1VzpEbkXXBJcgMInzLP5ahgcvzKSo3uSIyqI93iH5UWPvUw==
+lemmy-js-client@0.17.2-rc.1:
+  version "0.17.2-rc.1"
+  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.17.2-rc.1.tgz#fe8d1508311bbf245acc98c2c3e47e2165a95b14"
+  integrity sha512-YrOXuCofgkqp28krmPTQZAfUWL5zEDA0sRJ0abKcgf/I8YYkYkUkPS9TOORN5Lv3bc8RAAz4+2/zLHqYL/Tnow==
   dependencies:
     node-fetch "2.6.6"