mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
382a23b661 | ||
|
|
98107291f5 | ||
|
|
c6779a714b | ||
|
|
ef8f0fd72d | ||
|
|
b42df81b48 | ||
|
|
536fed5448 |
No files matched your search
@@ -14,31 +14,10 @@ Go to [application directory for Blitzkrieg](https://discord.com/application-dir
|
|||||||
|
|
||||||
### https://blitz-krieg.vercel.app/
|
### https://blitz-krieg.vercel.app/
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Visit the documentation website
|
## Visit the documentation website
|
||||||
|
|
||||||
### https://tresabhi.github.io/blitzkrieg/
|
### https://tresabhi.github.io/blitzkrieg/
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Run the bot
|
|
||||||
|
|
||||||
### Install dependencies
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn
|
|
||||||
```
|
|
||||||
|
|
||||||
### Create `.env`
|
|
||||||
|
|
||||||
```env
|
|
||||||
GH_TOKEN={YOUR_GITHUB_TOKEN_HERE}
|
|
||||||
DISCORD_TOKEN={YOUR_DISCORD_TOKE_HERE}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run the command
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn dev:bot
|
|
||||||
```
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Blitzkrieg 1.15.8
|
||||||
|
|
||||||
|
A request fulfilled \:\)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Added custom titles in session tracker
|
||||||
|
- Change the title through Options > Edit title...
|
||||||
|
- Colors are shown when selecting a theme color for the session tracker
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blitzkrieg",
|
"name": "blitzkrieg",
|
||||||
"version": "1.15.7",
|
"version": "1.15.8",
|
||||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||||
"main": "src/server.ts",
|
"main": "src/server.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -209,14 +209,7 @@ export default function SessionPage() {
|
|||||||
<Breakdown.Row
|
<Breakdown.Row
|
||||||
color={session.color}
|
color={session.color}
|
||||||
minimized={!session.showCareer}
|
minimized={!session.showCareer}
|
||||||
title={`Since ${since.toLocaleString(undefined, {
|
title={session.title}
|
||||||
hour: 'numeric',
|
|
||||||
minute: 'numeric',
|
|
||||||
hour12: true,
|
|
||||||
month: 'short',
|
|
||||||
year: 'numeric',
|
|
||||||
day: 'numeric',
|
|
||||||
})}`}
|
|
||||||
stats={session.customColumns.map((customColumn) => {
|
stats={session.customColumns.map((customColumn) => {
|
||||||
const rowStat = totalRowStats[customColumn.display];
|
const rowStat = totalRowStats[customColumn.display];
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
import { ContextMenu, DropdownMenu } from '@radix-ui/themes';
|
import {
|
||||||
|
Button,
|
||||||
|
ContextMenu,
|
||||||
|
Dialog,
|
||||||
|
DropdownMenu,
|
||||||
|
Flex,
|
||||||
|
Heading,
|
||||||
|
TextField,
|
||||||
|
} from '@radix-ui/themes';
|
||||||
|
import { createColors } from 'bepaint';
|
||||||
|
import { useRef, useState } from 'react';
|
||||||
import {
|
import {
|
||||||
ACCENT_COLORS,
|
ACCENT_COLORS,
|
||||||
AccentColor,
|
AccentColor,
|
||||||
GRAY_COLORS,
|
GRAY_COLORS,
|
||||||
GrayColor,
|
GrayColor,
|
||||||
|
PALETTES,
|
||||||
} from '../../../../constants/radixColors';
|
} from '../../../../constants/radixColors';
|
||||||
import { useSession } from '../../../../stores/session';
|
import { useSession } from '../../../../stores/session';
|
||||||
import { CustomColumn } from './CustomColumn';
|
import { CustomColumn } from './CustomColumn';
|
||||||
@@ -15,59 +26,111 @@ interface ContextMenuProps {
|
|||||||
|
|
||||||
export function Menu({ Builder, reset }: ContextMenuProps) {
|
export function Menu({ Builder, reset }: ContextMenuProps) {
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
|
const [showTitleEditor, setShowTitleEditor] = useState(false);
|
||||||
|
const titleInput = useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Builder.Content>
|
<>
|
||||||
<Builder.Sub>
|
<Dialog.Root open={showTitleEditor} onOpenChange={setShowTitleEditor}>
|
||||||
<Builder.SubTrigger>Accent color</Builder.SubTrigger>
|
<Dialog.Content>
|
||||||
|
<Flex direction="column" gap="4">
|
||||||
|
<Heading size="4">Edit title</Heading>
|
||||||
|
|
||||||
<Builder.SubContent>
|
<Flex gap="2" style={{ width: '100%' }}>
|
||||||
<Builder.RadioGroup
|
<TextField.Root style={{ flex: 1 }}>
|
||||||
value={session.color}
|
<TextField.Input
|
||||||
onValueChange={(value) =>
|
ref={titleInput}
|
||||||
useSession.setState({ color: value as AccentColor | GrayColor })
|
defaultValue={session.title}
|
||||||
}
|
placeholder="Enter title..."
|
||||||
>
|
onKeyDown={(event) => {
|
||||||
{[...ACCENT_COLORS, ...GRAY_COLORS].map((color) => (
|
if (event.key === 'Enter' && titleInput.current) {
|
||||||
<Builder.RadioItem value={color}>{`${color
|
setShowTitleEditor(false);
|
||||||
.charAt(0)
|
useSession.setState({ title: titleInput.current!.value });
|
||||||
.toUpperCase()}${color.slice(1)}`}</Builder.RadioItem>
|
}
|
||||||
))}
|
}}
|
||||||
</Builder.RadioGroup>
|
/>
|
||||||
</Builder.SubContent>
|
</TextField.Root>
|
||||||
</Builder.Sub>
|
|
||||||
|
|
||||||
<Builder.Separator />
|
<Dialog.Close>
|
||||||
|
<Button
|
||||||
|
onClick={() =>
|
||||||
|
useSession.setState({ title: titleInput.current!.value })
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Set
|
||||||
|
</Button>
|
||||||
|
</Dialog.Close>
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
</Dialog.Content>
|
||||||
|
</Dialog.Root>
|
||||||
|
|
||||||
<CustomColumn Builder={Builder} column={0} />
|
<Builder.Content>
|
||||||
<CustomColumn Builder={Builder} column={1} />
|
<Builder.Sub>
|
||||||
<CustomColumn Builder={Builder} column={2} />
|
<Builder.SubTrigger>Accent color</Builder.SubTrigger>
|
||||||
<CustomColumn Builder={Builder} column={3} />
|
|
||||||
|
|
||||||
<Builder.Separator />
|
<Builder.SubContent>
|
||||||
|
<Builder.RadioGroup
|
||||||
|
value={session.color}
|
||||||
|
onValueChange={(value) =>
|
||||||
|
useSession.setState({ color: value as AccentColor | GrayColor })
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{[...ACCENT_COLORS, ...GRAY_COLORS].map((color) => (
|
||||||
|
<Builder.RadioItem value={color} key={color}>
|
||||||
|
<Flex gap="2" align="center">
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
backgroundColor: createColors(PALETTES[color])
|
||||||
|
.solidBackground,
|
||||||
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
borderRadius: '100%',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{`${color.charAt(0).toUpperCase()}${color.slice(1)}`}
|
||||||
|
</Flex>
|
||||||
|
</Builder.RadioItem>
|
||||||
|
))}
|
||||||
|
</Builder.RadioGroup>
|
||||||
|
</Builder.SubContent>
|
||||||
|
</Builder.Sub>
|
||||||
|
|
||||||
<Builder.CheckboxItem
|
<Builder.Separator />
|
||||||
checked={session.showTotal}
|
|
||||||
onCheckedChange={(checked) =>
|
|
||||||
useSession.setState({ showTotal: checked })
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Show total
|
|
||||||
</Builder.CheckboxItem>
|
|
||||||
<Builder.CheckboxItem
|
|
||||||
checked={session.showCareer}
|
|
||||||
onCheckedChange={(checked) =>
|
|
||||||
useSession.setState({ showCareer: checked })
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Show career
|
|
||||||
</Builder.CheckboxItem>
|
|
||||||
|
|
||||||
<Builder.Separator />
|
<Builder.Item onClick={() => setShowTitleEditor(true)}>
|
||||||
|
Edit title...
|
||||||
|
</Builder.Item>
|
||||||
|
<CustomColumn Builder={Builder} column={0} />
|
||||||
|
<CustomColumn Builder={Builder} column={1} />
|
||||||
|
<CustomColumn Builder={Builder} column={2} />
|
||||||
|
<CustomColumn Builder={Builder} column={3} />
|
||||||
|
|
||||||
<Builder.Item color="red" onClick={reset}>
|
<Builder.Separator />
|
||||||
Reset
|
|
||||||
</Builder.Item>
|
<Builder.CheckboxItem
|
||||||
</Builder.Content>
|
checked={session.showTotal}
|
||||||
|
onCheckedChange={(checked) =>
|
||||||
|
useSession.setState({ showTotal: checked })
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Show total
|
||||||
|
</Builder.CheckboxItem>
|
||||||
|
<Builder.CheckboxItem
|
||||||
|
checked={session.showCareer}
|
||||||
|
onCheckedChange={(checked) =>
|
||||||
|
useSession.setState({ showCareer: checked })
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Show career
|
||||||
|
</Builder.CheckboxItem>
|
||||||
|
|
||||||
|
<Builder.Separator />
|
||||||
|
|
||||||
|
<Builder.Item color="red" onClick={reset}>
|
||||||
|
Reset
|
||||||
|
</Builder.Item>
|
||||||
|
</Builder.Content>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,7 @@ type Session = (
|
|||||||
time: number;
|
time: number;
|
||||||
}
|
}
|
||||||
) & {
|
) & {
|
||||||
|
title: string;
|
||||||
resetPrompt: boolean;
|
resetPrompt: boolean;
|
||||||
embedPrompt: boolean;
|
embedPrompt: boolean;
|
||||||
customColumns: {
|
customColumns: {
|
||||||
@@ -68,6 +69,7 @@ export const useSession = create<Session>()(
|
|||||||
devtools(
|
devtools(
|
||||||
persist(
|
persist(
|
||||||
(set) => ({
|
(set) => ({
|
||||||
|
title: 'Untitled session',
|
||||||
isTracking: false,
|
isTracking: false,
|
||||||
resetPrompt: true,
|
resetPrompt: true,
|
||||||
showTotal: true,
|
showTotal: true,
|
||||||
|
|||||||
Reference in new issue
Block a user