mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: unsued code
This commit is contained in:
1 parent
bfc7d76853
commit
c278bb094a
3 files changed
+5
-17
No files matched your search
@@ -31,8 +31,8 @@ const tankEmbedConfig = {
|
|||||||
type: EmbedConfigType.FullTextControl,
|
type: EmbedConfigType.FullTextControl,
|
||||||
default: { color: undefined, weight: 'bold', size: '3' },
|
default: { color: undefined, weight: 'bold', size: '3' },
|
||||||
},
|
},
|
||||||
cardTitleAutoColor: { type: EmbedConfigType.Boolean, default: true },
|
cardTitleTypeColor: { type: EmbedConfigType.Boolean, default: true },
|
||||||
cardTitleAutoIcon: { type: EmbedConfigType.Boolean, default: true },
|
cardTitleClassIcon: { type: EmbedConfigType.Boolean, default: true },
|
||||||
cardBodyBackgroundColor: {
|
cardBodyBackgroundColor: {
|
||||||
type: EmbedConfigType.Color,
|
type: EmbedConfigType.Color,
|
||||||
default: { base: 'gray', variant: '2' },
|
default: { base: 'gray', variant: '2' },
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
} from '@radix-ui/themes';
|
} from '@radix-ui/themes';
|
||||||
import { produce } from 'immer';
|
import { produce } from 'immer';
|
||||||
import { capitalize, clamp, startCase, times } from 'lodash';
|
import { capitalize, startCase, times } from 'lodash';
|
||||||
import {
|
import {
|
||||||
Dispatch,
|
Dispatch,
|
||||||
ReactNode,
|
ReactNode,
|
||||||
@@ -73,19 +73,7 @@ export function EmbedConfigInputs({
|
|||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
const wrapper = useRef<HTMLDivElement>(null);
|
|
||||||
const handlePointerMove = useCallback((event: PointerEvent) => {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
if (!wrapper.current) return;
|
|
||||||
|
|
||||||
wrapper.current.style.top = `${clamp(parseFloat(wrapper.current.style.top) + event.movementY, 32, window.innerHeight - 32 - 32)}px`;
|
|
||||||
wrapper.current.style.right = `${clamp(parseFloat(wrapper.current.style.right) - event.movementX, 32, window.innerWidth - 32 - 320)}px`;
|
|
||||||
}, []);
|
|
||||||
const handlePointerUp = useCallback(() => {
|
|
||||||
window.removeEventListener('pointermove', handlePointerMove);
|
|
||||||
window.removeEventListener('pointerup', handlePointerUp);
|
|
||||||
}, []);
|
|
||||||
const fileInput = useRef<HTMLInputElement>();
|
const fileInput = useRef<HTMLInputElement>();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function TanksEmbedCard({ tank, state }: TanksEmbedCardProps) {
|
|||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
color={
|
color={
|
||||||
state.cardTitleAutoColor
|
state.cardTitleTypeColor
|
||||||
? tank === null
|
? tank === null
|
||||||
? cardTitleColor
|
? cardTitleColor
|
||||||
: tank.treeType === 'collector'
|
: tank.treeType === 'collector'
|
||||||
@@ -68,7 +68,7 @@ export function TanksEmbedCard({ tank, state }: TanksEmbedCardProps) {
|
|||||||
{...restCardTitleProps}
|
{...restCardTitleProps}
|
||||||
>
|
>
|
||||||
<Flex align="center" gap="1">
|
<Flex align="center" gap="1">
|
||||||
{tank !== null && state.cardTitleAutoIcon && (
|
{tank !== null && state.cardTitleClassIcon && (
|
||||||
<>
|
<>
|
||||||
{tank.class === 'lightTank' && (
|
{tank.class === 'lightTank' && (
|
||||||
<ClassLight width="1em" height="1em" />
|
<ClassLight width="1em" height="1em" />
|
||||||
|
|||||||
Reference in new issue
Block a user