- <div className="container-lg">
- {this.state.loading ? (
- <h5>
- <Spinner large />
- </h5>
- ) : (
- <div>
- <HtmlTags
- title={this.documentTitle}
- path={this.context.router.route.match.url}
- />
- <ul className="nav nav-tabs mb-2">
- <li className="nav-item">
- <button
- className={`nav-link btn ${this.state.currentTab == "site" && "active"}`}
- onClick={linkEvent({ ctx: this, tab: "site" }, this.handleSwitchTab) }>
- {i18n.t("site")}
- </button>
- </li>
- <li className="nav-item">
- <button
- className={`nav-link btn ${this.state.currentTab == "emojis" && "active"
- }`}
- onClick={linkEvent({ ctx: this, tab: "emojis" }, this.handleSwitchTab) }>
- {i18n.t("emojis")}
- </button>
- </li>
- </ul>
- {this.state.currentTab == "site" &&
- <div className="row"><div className="col-12 col-md-6">
-
- <SiteForm
- siteRes={this.state.siteRes}
- showLocal={showLocal(this.isoData)}
- />
- </div>
- <div className="col-12 col-md-6">
- {this.admins()}
+ <div className="admin-settings container-lg">
+ <HtmlTags
+ title={this.documentTitle}
+ path={this.context.router.route.match.url}
+ />
+ <Tabs
+ tabs={[
+ {
+ key: "site",
+ label: I18NextService.i18n.t("site"),
+ getNode: isSelected => (
+ <div
+ className={classNames("tab-pane show", {
+ active: isSelected,
+ })}
+ role="tabpanel"
+ id="site-tab-pane"
+ >
+ <h1 className="h4 mb-4">
+ {I18NextService.i18n.t("site_config")}
+ </h1>
+ <div className="row">
+ <div className="col-12 col-md-6">
+ <SiteForm
+ showLocal={showLocal(this.isoData)}
+ allowedInstances={federationData?.allowed}
+ blockedInstances={federationData?.blocked}
+ onSaveSite={this.handleEditSite}
+ siteRes={this.state.siteRes}
+ themeList={this.state.themeList}
+ loading={this.state.loading}
+ />
+ </div>
+ <div className="col-12 col-md-6">{this.admins()}</div>
+ </div>
+ </div>
+ ),
+ },
+ {
+ key: "banned_users",
+ label: I18NextService.i18n.t("banned_users"),
+ getNode: isSelected => (
+ <div
+ className={classNames("tab-pane", {
+ active: isSelected,
+ })}
+ role="tabpanel"
+ id="banned_users-tab-pane"
+ >