diff --git a/lemmy-translations b/lemmy-translations index 30e80d40..ee2cffac 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 30e80d40fd399c1ab4f55276f153f44f1fd04c41 +Subproject commit ee2cffac809ad466644f061ad79ac577b6c2e4fd diff --git a/src/shared/components/home/admin-settings.tsx b/src/shared/components/home/admin-settings.tsx index 4483a9ac..5d4706c2 100644 --- a/src/shared/components/home/admin-settings.tsx +++ b/src/shared/components/home/admin-settings.tsx @@ -3,7 +3,7 @@ import { capitalizeFirstLetter, resourcesSettled } from "@utils/helpers"; import { scrollMixin } from "../mixins/scroll-mixin"; import { RouteDataResponse } from "@utils/types"; import classNames from "classnames"; -import { Component, linkEvent } from "inferno"; +import { Component } from "inferno"; import { BannedPersonsResponse, CreateCustomEmoji, @@ -42,6 +42,7 @@ import { MediaUploads } from "../common/media-uploads"; import { Paginator } from "../common/paginator"; import { snapToTop } from "@utils/browser"; import { isBrowser } from "@utils/browser"; +import ConfirmationModal from "../common/confirmation-modal"; type AdminSettingsData = RouteDataResponse<{ bannedRes: BannedPersonsResponse; @@ -55,6 +56,7 @@ interface AdminSettingsState { instancesRes: RequestState; bannedRes: RequestState; leaveAdminTeamRes: RequestState; + showConfirmLeaveAdmin: boolean; uploadsRes: RequestState; uploadsPage: number; loading: boolean; @@ -82,6 +84,7 @@ export class AdminSettings extends Component< bannedRes: EMPTY_REQUEST, instancesRes: EMPTY_REQUEST, leaveAdminTeamRes: EMPTY_REQUEST, + showConfirmLeaveAdmin: false, uploadsRes: EMPTY_REQUEST, uploadsPage: 1, loading: false, @@ -105,6 +108,9 @@ export class AdminSettings extends Component< this.handleDeleteEmoji = this.handleDeleteEmoji.bind(this); this.handleCreateEmoji = this.handleCreateEmoji.bind(this); this.handleUploadsPageChange = this.handleUploadsPageChange.bind(this); + this.handleToggleShowLeaveAdminConfirmation = + this.handleToggleShowLeaveAdminConfirmation.bind(this); + this.handleLeaveAdminTeam = this.handleLeaveAdminTeam.bind(this); // Only fetch the data if coming from another route if (FirstLoadService.isFirstLoad) { @@ -340,6 +346,13 @@ export class AdminSettings extends Component< ))} {this.leaveAdmin()} + ); } @@ -347,7 +360,7 @@ export class AdminSettings extends Component< leaveAdmin() { return (