mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 07:43:49 +01:00
scroll dialog
This commit is contained in:
8 files changed
+33
-55
No files matched your search
@@ -1,41 +1,8 @@
|
|||||||
.Overlay {
|
@import "../Dialog/index.module.css";
|
||||||
position: fixed;
|
|
||||||
inset: 0;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
background-color: var(--black-a9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Content {
|
.Content {
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-3);
|
gap: var(--space-3);
|
||||||
|
|
||||||
box-sizing: border-box;
|
width: 100%;
|
||||||
width: calc(100dvw - 2 * var(--space-4));
|
|
||||||
max-width: var(--alert-max-width);
|
max-width: var(--alert-max-width);
|
||||||
padding: var(--space-4);
|
|
||||||
|
|
||||||
background-color: var(--gray-2);
|
|
||||||
box-shadow: var(--shadow-subtle);
|
|
||||||
border-radius: var(--space-4);
|
|
||||||
outline: var(--outline-interactive) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Title {
|
|
||||||
margin: 0;
|
|
||||||
font-size: var(--font-size-heading-4);
|
|
||||||
color: var(--gray-12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Description {
|
|
||||||
margin: 0;
|
|
||||||
color: var(--gray-11);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -3,25 +3,26 @@
|
|||||||
inset: 0;
|
inset: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: var(--space-4);
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
background-color: var(--black-a9);
|
background-color: var(--black-a9);
|
||||||
}
|
}
|
||||||
|
|
||||||
.Content {
|
.Content {
|
||||||
position: fixed;
|
margin: auto;
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
max-width: min(40rem, calc(100dvw - 2 * var(--space-4)));
|
min-width: 0;
|
||||||
max-height: calc(100dvh - 2 * var(--space-4));
|
max-width: min(40rem, 100%);
|
||||||
padding: var(--space-4);
|
padding: var(--space-4);
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
background-color: var(--gray-2);
|
background-color: var(--gray-2);
|
||||||
box-shadow: var(--shadow-subtle);
|
box-shadow: var(--shadow-subtle);
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export function GenerateURL({ embed }: GenerateURLProps) {
|
|||||||
</Dialog.Trigger>
|
</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Portal>
|
<Dialog.Portal>
|
||||||
<Dialog.Overlay />
|
<Dialog.Overlay>
|
||||||
<Dialog.Content className={styles.content}>
|
<Dialog.Content className={styles.content}>
|
||||||
<Dialog.Header>
|
<Dialog.Header>
|
||||||
<Dialog.Title>{generateStrings.title}</Dialog.Title>
|
<Dialog.Title>{generateStrings.title}</Dialog.Title>
|
||||||
@@ -137,12 +137,13 @@ export function GenerateURL({ embed }: GenerateURLProps) {
|
|||||||
</Dialog.Close>
|
</Dialog.Close>
|
||||||
</Dialog.Actions>
|
</Dialog.Actions>
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
|
</Dialog.Overlay>
|
||||||
</Dialog.Portal>
|
</Dialog.Portal>
|
||||||
</Dialog.Root>
|
</Dialog.Root>
|
||||||
|
|
||||||
<Dialog.Root open={copyDialogOpen} onOpenChange={setCopyDialogOpen}>
|
<Dialog.Root open={copyDialogOpen} onOpenChange={setCopyDialogOpen}>
|
||||||
<Dialog.Portal>
|
<Dialog.Portal>
|
||||||
<Dialog.Overlay />
|
<Dialog.Overlay>
|
||||||
<Dialog.Content className={styles.content}>
|
<Dialog.Content className={styles.content}>
|
||||||
<Dialog.Header>
|
<Dialog.Header>
|
||||||
<Dialog.Title>{generateStrings.success.title}</Dialog.Title>
|
<Dialog.Title>{generateStrings.success.title}</Dialog.Title>
|
||||||
@@ -194,6 +195,7 @@ export function GenerateURL({ embed }: GenerateURLProps) {
|
|||||||
</CopyButton>
|
</CopyButton>
|
||||||
</Dialog.Actions>
|
</Dialog.Actions>
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
|
</Dialog.Overlay>
|
||||||
</Dialog.Portal>
|
</Dialog.Portal>
|
||||||
</Dialog.Root>
|
</Dialog.Root>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export function Import() {
|
|||||||
onOpenChange={setShowInvalidURLPrompt}
|
onOpenChange={setShowInvalidURLPrompt}
|
||||||
>
|
>
|
||||||
<AlertDialog.Portal>
|
<AlertDialog.Portal>
|
||||||
<AlertDialog.Overlay />
|
<AlertDialog.Overlay>
|
||||||
<AlertDialog.Content>
|
<AlertDialog.Content>
|
||||||
<AlertDialog.Title>
|
<AlertDialog.Title>
|
||||||
{strings.embed.configuration.import.idiot_title}
|
{strings.embed.configuration.import.idiot_title}
|
||||||
@@ -47,6 +47,7 @@ export function Import() {
|
|||||||
</AlertDialog.Cancel>
|
</AlertDialog.Cancel>
|
||||||
</AlertDialog.Actions>
|
</AlertDialog.Actions>
|
||||||
</AlertDialog.Content>
|
</AlertDialog.Content>
|
||||||
|
</AlertDialog.Overlay>
|
||||||
</AlertDialog.Portal>
|
</AlertDialog.Portal>
|
||||||
</AlertDialog.Root>
|
</AlertDialog.Root>
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export function Guesser() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
setResults(
|
setResults(
|
||||||
searchResults.map((result) => tankDefinitions.tanks[result.obj.id])
|
searchResults.map((result) => tankDefinitions.tanks[result.obj.id]),
|
||||||
);
|
);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@@ -124,7 +124,10 @@ export function Guesser() {
|
|||||||
text={unwrap(result.name!)}
|
text={unwrap(result.name!)}
|
||||||
prefix={
|
prefix={
|
||||||
<LazyImage
|
<LazyImage
|
||||||
src={alias("api", `nations/${result.nation}/flags/circle.webp`)}
|
src={alias(
|
||||||
|
"api",
|
||||||
|
`nations/${result.nation}/flags/circle.webp`,
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
discriminator={
|
discriminator={
|
||||||
@@ -244,7 +247,7 @@ export function Guesser() {
|
|||||||
</AlertDialog.Trigger>
|
</AlertDialog.Trigger>
|
||||||
|
|
||||||
<AlertDialog.Portal>
|
<AlertDialog.Portal>
|
||||||
<AlertDialog.Overlay />
|
<AlertDialog.Overlay>
|
||||||
<AlertDialog.Content>
|
<AlertDialog.Content>
|
||||||
<AlertDialog.Title>
|
<AlertDialog.Title>
|
||||||
{strings.guesser.help.title}
|
{strings.guesser.help.title}
|
||||||
@@ -274,6 +277,7 @@ export function Guesser() {
|
|||||||
</AlertDialog.Action>
|
</AlertDialog.Action>
|
||||||
</AlertDialog.Actions>
|
</AlertDialog.Actions>
|
||||||
</AlertDialog.Content>
|
</AlertDialog.Content>
|
||||||
|
</AlertDialog.Overlay>
|
||||||
</AlertDialog.Portal>
|
</AlertDialog.Portal>
|
||||||
</AlertDialog.Root>
|
</AlertDialog.Root>
|
||||||
|
|
||||||
@@ -315,7 +319,7 @@ export function Guesser() {
|
|||||||
return tiers.includes(tank.tier);
|
return tiers.includes(tank.tier);
|
||||||
});
|
});
|
||||||
const id = Number(
|
const id = Number(
|
||||||
filteredIds[Math.floor(Math.random() * filteredIds.length)]
|
filteredIds[Math.floor(Math.random() * filteredIds.length)],
|
||||||
);
|
);
|
||||||
const tank = tankDefinitions.tanks[id];
|
const tank = tankDefinitions.tanks[id];
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export function ScreenshotButton({ canvas, name, children, ...props }: Props) {
|
|||||||
</Dialog.Trigger>
|
</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Portal>
|
<Dialog.Portal>
|
||||||
<Dialog.Overlay />
|
<Dialog.Overlay>
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
<Dialog.Header>
|
<Dialog.Header>
|
||||||
<Dialog.Title>{strings.common.screenshot.title}</Dialog.Title>
|
<Dialog.Title>{strings.common.screenshot.title}</Dialog.Title>
|
||||||
@@ -117,6 +117,7 @@ export function ScreenshotButton({ canvas, name, children, ...props }: Props) {
|
|||||||
</Dialog.Close>
|
</Dialog.Close>
|
||||||
</Dialog.Actions>
|
</Dialog.Actions>
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
|
</Dialog.Overlay>
|
||||||
</Dialog.Portal>
|
</Dialog.Portal>
|
||||||
</Dialog.Root>
|
</Dialog.Root>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ export const SettingsDialog = withLocale(
|
|||||||
<Dialog.Trigger className={styles.trigger}>{children}</Dialog.Trigger>
|
<Dialog.Trigger className={styles.trigger}>{children}</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Portal>
|
<Dialog.Portal>
|
||||||
<Dialog.Overlay />
|
<Dialog.Overlay>
|
||||||
|
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
<Dialog.Header>
|
<Dialog.Header>
|
||||||
<Dialog.Title>{strings.navbar.settings}</Dialog.Title>
|
<Dialog.Title>{strings.navbar.settings}</Dialog.Title>
|
||||||
@@ -69,6 +68,7 @@ export const SettingsDialog = withLocale(
|
|||||||
</div>
|
</div>
|
||||||
</Dialog.Body>
|
</Dialog.Body>
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
|
</Dialog.Overlay>
|
||||||
</Dialog.Portal>
|
</Dialog.Portal>
|
||||||
</Dialog.Root>
|
</Dialog.Root>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -50,11 +50,12 @@ export function TankSearchDialog({
|
|||||||
<Dialog.Trigger asChild>{children}</Dialog.Trigger>
|
<Dialog.Trigger asChild>{children}</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Portal>
|
<Dialog.Portal>
|
||||||
<Dialog.Overlay />
|
<Dialog.Overlay>
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
<Dialog.Header>
|
<Dialog.Header>
|
||||||
<Dialog.Title>
|
<Dialog.Title>
|
||||||
{title ?? strings.website.common.tank_search.select_dialog_title}
|
{title ??
|
||||||
|
strings.website.common.tank_search.select_dialog_title}
|
||||||
</Dialog.Title>
|
</Dialog.Title>
|
||||||
|
|
||||||
{description && (
|
{description && (
|
||||||
@@ -78,6 +79,7 @@ export function TankSearchDialog({
|
|||||||
/>
|
/>
|
||||||
</Dialog.Body>
|
</Dialog.Body>
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
|
</Dialog.Overlay>
|
||||||
</Dialog.Portal>
|
</Dialog.Portal>
|
||||||
</Dialog.Root>
|
</Dialog.Root>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user