forked from abner/for-legacy-web
Format code.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import dayJS from "dayjs";
|
||||
export const dayjs = dayJS;
|
||||
|
||||
import calendar from "dayjs/plugin/calendar";
|
||||
import format from "dayjs/plugin/localizedFormat";
|
||||
import update from "dayjs/plugin/updateLocale";
|
||||
@@ -13,6 +11,8 @@ import { connectState } from "../redux/connector";
|
||||
|
||||
import definition from "../../external/lang/en.json";
|
||||
|
||||
export const dayjs = dayJS;
|
||||
|
||||
dayjs.extend(calendar);
|
||||
dayjs.extend(format);
|
||||
dayjs.extend(update);
|
||||
@@ -163,7 +163,7 @@ function Locale({ children, locale }: Props) {
|
||||
dayjs["timeFormat"] = twelvehour ? "hh:mm A" : "HH:mm";
|
||||
|
||||
Object.keys(dayjs)
|
||||
.filter((k) => typeof dayjs[k] === 'string')
|
||||
.filter((k) => typeof dayjs[k] === "string")
|
||||
.forEach(
|
||||
(k) =>
|
||||
(dayjs[k] = dayjs[k].replace(
|
||||
@@ -175,7 +175,9 @@ function Locale({ children, locale }: Props) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
dayjs.updateLocale("en", { calendar: { ...definition.dayjs, sameDay: 'sussy baka' } });
|
||||
dayjs.updateLocale("en", {
|
||||
calendar: { ...definition.dayjs, sameDay: "sussy baka" },
|
||||
});
|
||||
useEffect(() => {
|
||||
if (locale === "en") {
|
||||
const defn = transformLanguage(definition);
|
||||
|
||||
@@ -155,7 +155,7 @@ export function SpecialInputModal(props: SpecialProps) {
|
||||
status: {
|
||||
...client.user?.status,
|
||||
text: text.trim().length > 0 ? text : undefined,
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -256,7 +256,9 @@ export function SpecialPromptModal(props: SpecialProps) {
|
||||
question={<Text id={`app.context_menu.create_invite`} />}
|
||||
actions={[
|
||||
{
|
||||
children: <Text id="app.special.modals.actions.ok" />,
|
||||
children: (
|
||||
<Text id="app.special.modals.actions.ok" />
|
||||
),
|
||||
confirmation: true,
|
||||
onClick: onClose,
|
||||
},
|
||||
@@ -292,7 +294,9 @@ export function SpecialPromptModal(props: SpecialProps) {
|
||||
question={<Text id={`app.context_menu.kick_member`} />}
|
||||
actions={[
|
||||
{
|
||||
children: <Text id="app.special.modals.actions.kick" />,
|
||||
children: (
|
||||
<Text id="app.special.modals.actions.kick" />
|
||||
),
|
||||
contrast: true,
|
||||
error: true,
|
||||
confirmation: true,
|
||||
@@ -342,7 +346,9 @@ export function SpecialPromptModal(props: SpecialProps) {
|
||||
question={<Text id={`app.context_menu.ban_member`} />}
|
||||
actions={[
|
||||
{
|
||||
children: <Text id="app.special.modals.actions.ban" />,
|
||||
children: (
|
||||
<Text id="app.special.modals.actions.ban" />
|
||||
),
|
||||
contrast: true,
|
||||
error: true,
|
||||
confirmation: true,
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import {
|
||||
Envelope,
|
||||
Edit,
|
||||
UserPlus,
|
||||
Shield
|
||||
} from "@styled-icons/boxicons-solid";
|
||||
import { Money } from "@styled-icons/boxicons-regular";
|
||||
import { Envelope, Edit, UserPlus, Shield } from "@styled-icons/boxicons-solid";
|
||||
import { Link, useHistory } from "react-router-dom";
|
||||
import { Users } from "revolt.js/dist/api/objects";
|
||||
import { UserPermission } from "revolt.js/dist/api/permissions";
|
||||
|
||||
@@ -277,7 +277,7 @@ export function FileUploader(props: Props) {
|
||||
if (attached) return remove();
|
||||
onClick();
|
||||
}}
|
||||
rotate={uploading || attached ? '45deg' : undefined}>
|
||||
rotate={uploading || attached ? "45deg" : undefined}>
|
||||
<Plus size={size} />
|
||||
</IconButton>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user