Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -1,7 +1,23 @@
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import { Box, Text, IconButton, Scroll, Switch, Button, MenuItem, config, color, TextArea, Dialog, Overlay, OverlayBackdrop, OverlayCenter, Modal } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import {
|
||||
Box,
|
||||
Text,
|
||||
IconButton,
|
||||
Scroll,
|
||||
Switch,
|
||||
Button,
|
||||
MenuItem,
|
||||
config,
|
||||
color,
|
||||
TextArea,
|
||||
Dialog,
|
||||
Overlay,
|
||||
OverlayBackdrop,
|
||||
OverlayCenter,
|
||||
Modal,
|
||||
} from 'folds';
|
||||
import FocusTrap from 'focus-trap-react';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { Page, PageContent, PageHeader } from '../../../components/page';
|
||||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
import { SequenceCardStyle } from '../styles.css';
|
||||
@@ -54,7 +70,10 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
const newestEvent = liveEvents.length > 0 ? liveEvents[liveEvents.length - 1] : null;
|
||||
|
||||
// Get power level tags
|
||||
const powerLevelTagsEvent = room.currentState.getStateEvents('in.cinny.room.power_level_tags', '');
|
||||
const powerLevelTagsEvent = room.currentState.getStateEvents(
|
||||
'in.cinny.room.power_level_tags',
|
||||
'',
|
||||
);
|
||||
const powerLevelTags = powerLevelTagsEvent?.getContent();
|
||||
|
||||
const info: any = {
|
||||
@@ -122,7 +141,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
async (type, content) => {
|
||||
await mx.setRoomAccountData(room.roomId, type, content);
|
||||
},
|
||||
[mx, room.roomId]
|
||||
[mx, room.roomId],
|
||||
);
|
||||
|
||||
if (accountDataType !== undefined) {
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
import React, { useCallback, useRef, useState, FormEventHandler, useEffect } from 'react';
|
||||
import { MatrixError } from 'matrix-js-sdk';
|
||||
import { Box, Chip, IconButton, Text, config, Button, Spinner, color, TextArea, Input } from 'folds';
|
||||
import {
|
||||
Box,
|
||||
Chip,
|
||||
IconButton,
|
||||
Text,
|
||||
config,
|
||||
Button,
|
||||
Spinner,
|
||||
color,
|
||||
TextArea,
|
||||
Input,
|
||||
} from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { Page, PageHeader } from '../../../components/page';
|
||||
import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
||||
@@ -28,7 +39,7 @@ export function SendRoomEvent({ type, stateKey, requestClose }: SendRoomEventPro
|
||||
const [jsonError, setJSONError] = useState<SyntaxError>();
|
||||
const { handleKeyDown, operations, getTarget } = useTextAreaCodeEditor(
|
||||
textAreaRef,
|
||||
EDITOR_INTENT_SPACE_COUNT
|
||||
EDITOR_INTENT_SPACE_COUNT,
|
||||
);
|
||||
|
||||
const [submitState, submit] = useAsyncCallback<
|
||||
@@ -43,8 +54,8 @@ export function SendRoomEvent({ type, stateKey, requestClose }: SendRoomEventPro
|
||||
}
|
||||
return mx.sendEvent(room.roomId, evtType as any, evtContent);
|
||||
},
|
||||
[mx, room]
|
||||
)
|
||||
[mx, room],
|
||||
),
|
||||
);
|
||||
const submitting = submitState.status === AsyncStatus.Loading;
|
||||
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
import React, { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Box, Text, IconButton, Chip, Scroll, config, TextArea, color, Spinner, Button } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import {
|
||||
Box,
|
||||
Text,
|
||||
IconButton,
|
||||
Chip,
|
||||
Scroll,
|
||||
config,
|
||||
TextArea,
|
||||
color,
|
||||
Spinner,
|
||||
Button,
|
||||
} from 'folds';
|
||||
import { MatrixError } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { Page, PageHeader } from '../../../components/page';
|
||||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
import { TextViewerContent } from '../../../components/text-viewer';
|
||||
@@ -35,21 +46,21 @@ function StateEventEdit({ type, stateKey, content, requestClose }: StateEventEdi
|
||||
|
||||
const defaultContentStr = useMemo(
|
||||
() => JSON.stringify(content, undefined, EDITOR_INTENT_SPACE_COUNT),
|
||||
[content]
|
||||
[content],
|
||||
);
|
||||
|
||||
const textAreaRef = useRef<HTMLTextAreaElement>(null);
|
||||
const [jsonError, setJSONError] = useState<SyntaxError>();
|
||||
const { handleKeyDown, operations, getTarget } = useTextAreaCodeEditor(
|
||||
textAreaRef,
|
||||
EDITOR_INTENT_SPACE_COUNT
|
||||
EDITOR_INTENT_SPACE_COUNT,
|
||||
);
|
||||
|
||||
const [submitState, submit] = useAsyncCallback<object, MatrixError, [object]>(
|
||||
useCallback(
|
||||
(c) => mx.sendStateEvent(room.roomId, type as any, c, stateKey),
|
||||
[mx, room, type, stateKey]
|
||||
)
|
||||
[mx, room, type, stateKey],
|
||||
),
|
||||
);
|
||||
const submitting = submitState.status === AsyncStatus.Loading;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user