diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 6c739549..cb4a8b81 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -276,10 +276,7 @@ hr { } .mini-overlay { - position: absolute; - top: 0; - right: 0; - padding: 2px; + display: block; height: 1.5em; width: 1.5em; background: rgba(0, 0, 0, 0.4); diff --git a/src/shared/components/app/navbar.tsx b/src/shared/components/app/navbar.tsx index d25254e3..11cfb6c6 100644 --- a/src/shared/components/app/navbar.tsx +++ b/src/shared/components/app/navbar.tsx @@ -347,7 +347,7 @@ export class Navbar extends Component { )} {person && ( - + )} ) : ( diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 41f67e6c..5e59d161 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -367,7 +367,7 @@ export class CommentNode extends Component { ) : ( { } /> )} -
+
{this.props.showContext && this.linkBtn()} {this.props.markable && (
+ {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
-
@@ -345,35 +342,23 @@ export class AdminSettings extends Component { } async handleEditEmoji(form: EditCustomEmoji) { - this.setState({ emojiLoading: true }); - const res = await HttpService.client.editCustomEmoji(form); if (res.state === "success") { updateEmojiDataModel(res.data.custom_emoji); } - - this.setState({ emojiLoading: false }); } async handleDeleteEmoji(form: DeleteCustomEmoji) { - this.setState({ emojiLoading: true }); - const res = await HttpService.client.deleteCustomEmoji(form); if (res.state === "success") { removeFromEmojiDataModel(res.data.id); } - - this.setState({ emojiLoading: false }); } async handleCreateEmoji(form: CreateCustomEmoji) { - this.setState({ emojiLoading: true }); - const res = await HttpService.client.createCustomEmoji(form); if (res.state === "success") { updateEmojiDataModel(res.data.custom_emoji); } - - this.setState({ emojiLoading: false }); } } diff --git a/src/shared/components/home/emojis-form.tsx b/src/shared/components/home/emojis-form.tsx index 8428a54f..caf8221c 100644 --- a/src/shared/components/home/emojis-form.tsx +++ b/src/shared/components/home/emojis-form.tsx @@ -1,4 +1,5 @@ import { myAuthRequired, setIsoData } from "@utils/app"; +import { capitalizeFirstLetter } from "@utils/helpers"; import { Component, linkEvent } from "inferno"; import { CreateCustomEmoji, @@ -11,14 +12,13 @@ import { HttpService, I18NextService } from "../../services"; import { pictrsDeleteToast, toast } from "../../toast"; import { EmojiMart } from "../common/emoji-mart"; import { HtmlTags } from "../common/html-tags"; -import { Icon } from "../common/icon"; +import { Icon, Spinner } from "../common/icon"; import { Paginator } from "../common/paginator"; interface EmojiFormProps { onEdit(form: EditCustomEmoji): void; onCreate(form: CreateCustomEmoji): void; onDelete(form: DeleteCustomEmoji): void; - loading: boolean; } interface EmojiFormState { @@ -36,6 +36,7 @@ interface CustomEmojiViewForm { keywords: string; changed: boolean; page: number; + loading: boolean; } export class EmojiForm extends Component { @@ -52,6 +53,7 @@ export class EmojiForm extends Component { keywords: x.keywords.map(x => x.keyword).join(" "), changed: false, page: 1 + Math.floor(index / this.itemsPerPage), + loading: false, })), page: 1, }; @@ -119,33 +121,39 @@ export class EmojiForm extends Component { .map((cv, index) => ( (this.scrollRef[cv.shortcode] = e)}> - - + {cv.image_url.length > 0 && ( + {cv.alt_text} + )} + {cv.image_url.length === 0 && ( + + + + )} {