diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 9a0108b24..b8491b9a6 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -11,7 +11,7 @@ services: - lemmy_db:/var/lib/postgresql/data restart: always lemmy: - image: dessalines/lemmy:v0.5.12 + image: dessalines/lemmy:v0.5.13 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/server/src/version.rs b/server/src/version.rs index eeb4588aa..ed582e6f1 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.5.12"; +pub const VERSION: &'static str = "v0.5.13"; diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 34ec0dfbb..b3ca682b2 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -42,6 +42,8 @@ interface CommentNodeState { banType: BanType; showConfirmTransferSite: boolean; showConfirmTransferCommunity: boolean; + showConfirmAppointAsMod: boolean; + showConfirmAppointAsAdmin: boolean; collapsed: boolean; viewSource: boolean; } @@ -71,6 +73,8 @@ export class CommentNode extends Component { viewSource: false, showConfirmTransferSite: false, showConfirmTransferCommunity: false, + showConfirmAppointAsMod: false, + showConfirmAppointAsAdmin: false, }; constructor(props: any, context: any) { @@ -206,6 +210,18 @@ export class CommentNode extends Component { /> )} )} @@ -725,13 +788,13 @@ export class CommentNode extends Component { } handleModBanFromCommunityShow(i: CommentNode) { - i.state.showBanDialog = true; + i.state.showBanDialog = !i.state.showBanDialog; i.state.banType = BanType.Community; i.setState(i.state); } handleModBanShow(i: CommentNode) { - i.state.showBanDialog = true; + i.state.showBanDialog = !i.state.showBanDialog; i.state.banType = BanType.Site; i.setState(i.state); } @@ -784,6 +847,16 @@ export class CommentNode extends Component { i.setState(i.state); } + handleShowConfirmAppointAsMod(i: CommentNode) { + i.state.showConfirmAppointAsMod = true; + i.setState(i.state); + } + + handleCancelConfirmAppointAsMod(i: CommentNode) { + i.state.showConfirmAppointAsMod = false; + i.setState(i.state); + } + handleAddModToCommunity(i: CommentNode) { let form: AddModToCommunityForm = { user_id: i.props.node.comment.creator_id, @@ -791,6 +864,17 @@ export class CommentNode extends Component { added: !i.isMod, }; WebSocketService.Instance.addModToCommunity(form); + i.state.showConfirmAppointAsMod = false; + i.setState(i.state); + } + + handleShowConfirmAppointAsAdmin(i: CommentNode) { + i.state.showConfirmAppointAsAdmin = true; + i.setState(i.state); + } + + handleCancelConfirmAppointAsAdmin(i: CommentNode) { + i.state.showConfirmAppointAsAdmin = false; i.setState(i.state); } @@ -800,6 +884,7 @@ export class CommentNode extends Component { added: !i.isAdmin, }; WebSocketService.Instance.addAdmin(form); + i.state.showConfirmAppointAsAdmin = false; i.setState(i.state); } diff --git a/ui/src/version.ts b/ui/src/version.ts index 4f406a8a6..bacfecf26 100644 --- a/ui/src/version.ts +++ b/ui/src/version.ts @@ -1 +1 @@ -export let version: string = 'v0.5.12'; +export let version: string = 'v0.5.13';