mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +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,
|
||||
default: { color: undefined, weight: 'bold', size: '3' },
|
||||
},
|
||||
cardTitleAutoColor: { type: EmbedConfigType.Boolean, default: true },
|
||||
cardTitleAutoIcon: { type: EmbedConfigType.Boolean, default: true },
|
||||
cardTitleTypeColor: { type: EmbedConfigType.Boolean, default: true },
|
||||
cardTitleClassIcon: { type: EmbedConfigType.Boolean, default: true },
|
||||
cardBodyBackgroundColor: {
|
||||
type: EmbedConfigType.Color,
|
||||
default: { base: 'gray', variant: '2' },
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
TextField,
|
||||
} from '@radix-ui/themes';
|
||||
import { produce } from 'immer';
|
||||
import { capitalize, clamp, startCase, times } from 'lodash';
|
||||
import { capitalize, startCase, times } from 'lodash';
|
||||
import {
|
||||
Dispatch,
|
||||
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>();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -55,7 +55,7 @@ export function TanksEmbedCard({ tank, state }: TanksEmbedCardProps) {
|
||||
>
|
||||
<Text
|
||||
color={
|
||||
state.cardTitleAutoColor
|
||||
state.cardTitleTypeColor
|
||||
? tank === null
|
||||
? cardTitleColor
|
||||
: tank.treeType === 'collector'
|
||||
@@ -68,7 +68,7 @@ export function TanksEmbedCard({ tank, state }: TanksEmbedCardProps) {
|
||||
{...restCardTitleProps}
|
||||
>
|
||||
<Flex align="center" gap="1">
|
||||
{tank !== null && state.cardTitleAutoIcon && (
|
||||
{tank !== null && state.cardTitleClassIcon && (
|
||||
<>
|
||||
{tank.class === 'lightTank' && (
|
||||
<ClassLight width="1em" height="1em" />
|
||||
|
||||
Reference in new issue
Block a user