Turn off the accepted rules and fix the design tokens, alt text, and last type errors. [skip build]
This commit is contained in:
@@ -77,7 +77,7 @@ export function ProfileEffectHeroPreview({
|
||||
|
||||
<div className={css.ProfileEffectHeroInfo}>
|
||||
<Text
|
||||
size="T100"
|
||||
size="T200"
|
||||
className={css.ProfileEffectHeroName}
|
||||
title={resolvedName}
|
||||
style={{ color: nameColor }}
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
OverlayCenter,
|
||||
} from 'folds';
|
||||
import FocusTrap from 'focus-trap-react';
|
||||
import type { AccountDataEvents } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { Page, PageContent, PageHeader } from '../../../components/page';
|
||||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
@@ -107,7 +108,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
|
||||
const submitAccountData: AccountDataSubmitCallback = useCallback(
|
||||
async (type, content) => {
|
||||
await mx.setAccountData(type, content);
|
||||
await mx.setAccountData(type as keyof AccountDataEvents, content);
|
||||
},
|
||||
[mx],
|
||||
);
|
||||
@@ -118,7 +119,11 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
return (
|
||||
<AccountDataEditor
|
||||
type={accountDataType ?? undefined}
|
||||
content={accountDataType ? mx.getAccountData(accountDataType)?.getContent() : undefined}
|
||||
content={
|
||||
accountDataType
|
||||
? mx.getAccountData(accountDataType as keyof AccountDataEvents)?.getContent()
|
||||
: undefined
|
||||
}
|
||||
submitChange={submitAccountData}
|
||||
requestClose={() => setAccountDataType(undefined)}
|
||||
/>
|
||||
@@ -239,7 +244,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
</PageContent>
|
||||
</Scroll>
|
||||
</Box>
|
||||
{profileFieldKey !== undefined && (
|
||||
{profileFieldKey && (
|
||||
<Overlay open backdrop={<OverlayBackdrop />}>
|
||||
<OverlayCenter>
|
||||
<FocusTrap
|
||||
|
||||
@@ -82,8 +82,8 @@ export function ProfileFields({
|
||||
<Box gap="100" alignItems="Center">
|
||||
{editable && (
|
||||
<IconButton
|
||||
size="200"
|
||||
radii="Round"
|
||||
size="300"
|
||||
radii="Pill"
|
||||
title={`Delete ${key}`}
|
||||
onClick={() => onDelete(key)}
|
||||
>
|
||||
|
||||
@@ -25,7 +25,6 @@ export type {
|
||||
IPluginEventClient,
|
||||
PluginMarketplaceClientOptions,
|
||||
PluginMarketplaceHostAdapter,
|
||||
PluginMarketplaceInstalledRecord,
|
||||
PluginMarketplaceManagerOptions,
|
||||
PluginRegistryOptions,
|
||||
PluginContextOptions,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useSyncExternalStore } from 'react';
|
||||
import { IconButton } from 'folds';
|
||||
import * as lucide from 'lucide-react';
|
||||
import type { LucideIcon } from 'lucide-react';
|
||||
import { UILocation } from '@paarrot/plugin-manager';
|
||||
import { Icon, Icons, type IconName } from '../../../components/icons';
|
||||
import { pluginRegistry } from './PluginAPI';
|
||||
@@ -52,12 +53,7 @@ function renderPluginButtonIcon(button: { icon?: string; lucideIcon?: string }):
|
||||
}
|
||||
|
||||
if (lucideName) {
|
||||
const IconComponent = (
|
||||
lucide as Record<
|
||||
string,
|
||||
React.ComponentType<{ size?: number; strokeWidth?: number }> | undefined
|
||||
>
|
||||
)[lucideName];
|
||||
const IconComponent = lucide[lucideName as keyof typeof lucide] as LucideIcon | undefined;
|
||||
if (IconComponent) {
|
||||
return <IconComponent size={18} strokeWidth={2} aria-hidden />;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ function SettingRenderer({
|
||||
variant="Background"
|
||||
value={value ?? definition.default ?? ''}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
placeholder={definition.default}
|
||||
placeholder={typeof definition.default === 'string' ? definition.default : ''}
|
||||
/>
|
||||
</SettingTile>
|
||||
);
|
||||
@@ -127,7 +127,7 @@ function SettingRenderer({
|
||||
<Menu>
|
||||
{definition.options.map((option) => (
|
||||
<MenuItem
|
||||
key={option.value}
|
||||
key={String(option.value)}
|
||||
size="300"
|
||||
after={
|
||||
currentValue === option.value ? (
|
||||
@@ -214,7 +214,7 @@ function PluginSettingsRenderer({ pluginId }: { pluginId: string }) {
|
||||
|
||||
if (!schema || Object.keys(schema).length === 0) {
|
||||
return (
|
||||
<Box padding="300">
|
||||
<Box>
|
||||
<Text size="T300" priority="300">
|
||||
No settings available for this plugin.
|
||||
</Text>
|
||||
@@ -406,12 +406,12 @@ export function Plugins({ requestClose }: PluginsProps) {
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Box grow="Yes" alignItems="Center" gap="200">
|
||||
<Header size="H3" className="truncate">
|
||||
<Header size="400" className="truncate">
|
||||
Plugins
|
||||
</Header>
|
||||
</Box>
|
||||
<Box shrink="No" gap="200">
|
||||
<Button variant="Background" size="300" onClick={requestClose}>
|
||||
<Button variant="Secondary" size="300" onClick={requestClose}>
|
||||
<Text size="B300">Close</Text>
|
||||
</Button>
|
||||
</Box>
|
||||
@@ -454,7 +454,7 @@ export function Plugins({ requestClose }: PluginsProps) {
|
||||
searchQuery && (
|
||||
<IconButton
|
||||
size="300"
|
||||
variant="SurfaceLow"
|
||||
variant="Surface"
|
||||
radii="300"
|
||||
onClick={() => setSearchQuery('')}
|
||||
>
|
||||
@@ -688,7 +688,7 @@ export function Plugins({ requestClose }: PluginsProps) {
|
||||
direction="Column"
|
||||
style={{
|
||||
borderTop: `1px solid ${color.Surface.ContainerLine}`,
|
||||
background: color.Surface.ContainerLowest,
|
||||
background: color.Surface.Container,
|
||||
}}
|
||||
>
|
||||
<PluginSettingsRenderer pluginId={plugin.id} />
|
||||
|
||||
Reference in New Issue
Block a user