mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: internals
This commit is contained in:
1 parent
bc9f7054e1
commit
a69ea38947
11 files changed
+123
No files matched your search
@@ -869,6 +869,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"tools": {
|
"tools": {
|
||||||
|
"internal": {
|
||||||
|
"name": "Internal",
|
||||||
|
"button": "Internal",
|
||||||
|
"description": "BlitzKit internal tools",
|
||||||
|
"seo_description": "BlitzKit internal tools"
|
||||||
|
},
|
||||||
|
|
||||||
"guess": {
|
"guess": {
|
||||||
"name": "Guess the tank",
|
"name": "Guess the tank",
|
||||||
"button": "Guess away",
|
"button": "Guess away",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -0,0 +1 @@
|
|||||||
|
Permission denied
|
||||||
@@ -63,6 +63,12 @@ export const ratingTool: Tool = {
|
|||||||
button: { color: 'orange' },
|
button: { color: 'orange' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const internalTool: Tool = {
|
||||||
|
id: 'internal',
|
||||||
|
enabled: true,
|
||||||
|
button: { color: 'amber' },
|
||||||
|
};
|
||||||
|
|
||||||
export const tools: Tool[] = [
|
export const tools: Tool[] = [
|
||||||
tanksTool,
|
tanksTool,
|
||||||
compareTool,
|
compareTool,
|
||||||
@@ -75,3 +81,5 @@ export const tools: Tool[] = [
|
|||||||
embedTool,
|
embedTool,
|
||||||
ratingTool,
|
ratingTool,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (import.meta.env.DEV) tools.push(internalTool);
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
import locales from '@blitzkit/i18n/locales.json';
|
||||||
|
import DeniedInternal from '../components/DeniedInternal.astro';
|
||||||
|
import BaseLayout from './BaseLayout.astro';
|
||||||
|
|
||||||
|
const locale = locales.default;
|
||||||
|
const isInternal = import.meta.env.DEV;
|
||||||
|
---
|
||||||
|
|
||||||
|
{
|
||||||
|
isInternal ? (
|
||||||
|
<BaseLayout {locale}>
|
||||||
|
<slot />
|
||||||
|
</BaseLayout>
|
||||||
|
) : (
|
||||||
|
<DeniedInternal />
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
import locales from '@blitzkit/i18n/locales.json';
|
||||||
|
import DeniedInternal from '../components/DeniedInternal.astro';
|
||||||
|
import type { Tool } from '../constants/tools';
|
||||||
|
import ToolLayout from './ToolLayout.astro';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
tool: Tool;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { tool } = Astro.props;
|
||||||
|
const locale = locales.default;
|
||||||
|
const isInternal = import.meta.env.DEV;
|
||||||
|
---
|
||||||
|
|
||||||
|
{
|
||||||
|
isInternal ? (
|
||||||
|
<ToolLayout {tool} {locale}>
|
||||||
|
<slot />
|
||||||
|
</ToolLayout>
|
||||||
|
) : (
|
||||||
|
<DeniedInternal />
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -143,6 +143,7 @@ toolLoop: for (const tool of tools.filter((tool) => tool.enabled)) {
|
|||||||
{row.map((tool) => (
|
{row.map((tool) => (
|
||||||
<ToolCard {locale} tool={tool} />
|
<ToolCard {locale} tool={tool} />
|
||||||
))}
|
))}
|
||||||
|
{row.length === 1 && !row[0].significant && <Box flexGrow="1" />}
|
||||||
</Flex>
|
</Flex>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import { Link, Table } from '@radix-ui/themes';
|
||||||
|
import { PageWrapper } from '../../components/PageWrapper';
|
||||||
|
|
||||||
|
export function Page() {
|
||||||
|
return (
|
||||||
|
<PageWrapper>
|
||||||
|
<Table.Root>
|
||||||
|
<Table.Header>
|
||||||
|
<Table.Row>
|
||||||
|
<Table.ColumnHeaderCell>Name</Table.ColumnHeaderCell>
|
||||||
|
<Table.ColumnHeaderCell>Memo</Table.ColumnHeaderCell>
|
||||||
|
</Table.Row>
|
||||||
|
</Table.Header>
|
||||||
|
|
||||||
|
<Table.Body>
|
||||||
|
<Table.Row>
|
||||||
|
<Table.Cell>
|
||||||
|
<Link href="internal/ffi">FFI</Link>
|
||||||
|
</Table.Cell>
|
||||||
|
<Table.Cell>
|
||||||
|
Status of BlitzKit's currently mounted foreign function interface
|
||||||
|
</Table.Cell>
|
||||||
|
</Table.Row>
|
||||||
|
|
||||||
|
<Table.Row>
|
||||||
|
<Table.Cell>
|
||||||
|
<Link href="/internal/bindings">Bindings</Link>
|
||||||
|
</Table.Cell>
|
||||||
|
<Table.Cell>
|
||||||
|
Exhaustive list of all bindings and preference of currently
|
||||||
|
mounted client
|
||||||
|
</Table.Cell>
|
||||||
|
</Table.Row>
|
||||||
|
</Table.Body>
|
||||||
|
</Table.Root>
|
||||||
|
</PageWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { PageWrapper } from 'packages/website-ue/src/components/PageWrapper';
|
||||||
|
|
||||||
|
export function Page() {
|
||||||
|
return (
|
||||||
|
<PageWrapper align="center" justify="center">
|
||||||
|
🔴 Unmounted
|
||||||
|
</PageWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
import InternalBaseLayout from 'packages/website-ue/src/layouts/InternalBaseLayout.astro';
|
||||||
|
import { Page } from './_index';
|
||||||
|
---
|
||||||
|
|
||||||
|
<InternalBaseLayout>
|
||||||
|
<Page />
|
||||||
|
</InternalBaseLayout>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
import { internalTool } from '../../constants/tools';
|
||||||
|
import InternalToolLayout from '../../layouts/InternalToolLayout.astro';
|
||||||
|
import { Page } from './_index';
|
||||||
|
---
|
||||||
|
|
||||||
|
<InternalToolLayout tool={internalTool}>
|
||||||
|
<Page />
|
||||||
|
</InternalToolLayout>
|
||||||
Reference in new issue
Block a user