You've already forked AstralRinth
forked from didirus/AstralRinth
Merge branch 'master' into gui_search
This commit is contained in:
@@ -1,54 +1,53 @@
|
||||
<script lang="ts">
|
||||
export let title: string;
|
||||
export let title: string;
|
||||
</script>
|
||||
|
||||
<div class="card-row">
|
||||
<div class="card-row__title">{title}</div>
|
||||
<div class="card-row__items">
|
||||
<slot />
|
||||
</div>
|
||||
<div class="card-row__title">{title}</div>
|
||||
<div class="card-row__items">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<style lang="postcss">
|
||||
.card-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem 0;
|
||||
grid-gap: 1rem;
|
||||
.card-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem 0;
|
||||
grid-gap: 1rem;
|
||||
|
||||
&__title {
|
||||
padding: 0 1rem;
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: center;
|
||||
&__title {
|
||||
padding: 0 1rem;
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: center;
|
||||
|
||||
&::after {
|
||||
flex: 1 1;
|
||||
content: " ";
|
||||
background-color: hsla(0,0%,100%,0.2);
|
||||
height: 0.2rem;
|
||||
border-radius: var(--rounded-max);
|
||||
}
|
||||
}
|
||||
|
||||
&__items {
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: flex-start;
|
||||
overflow-x: auto;
|
||||
padding: 0 1rem;
|
||||
|
||||
/* Hide scrollbar */
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-of-type(even) {
|
||||
background-color: hsla(0,0%,0%,0.2);
|
||||
}
|
||||
&::after {
|
||||
flex: 1 1;
|
||||
content: ' ';
|
||||
background-color: hsla(0, 0%, 100%, 0.2);
|
||||
height: 0.2rem;
|
||||
border-radius: var(--rounded-max);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
&__items {
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: flex-start;
|
||||
overflow-x: auto;
|
||||
padding: 0 1rem;
|
||||
|
||||
/* Hide scrollbar */
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-of-type(even) {
|
||||
background-color: hsla(0, 0%, 0%, 0.2);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
<script lang="ts">
|
||||
import { FormField, Slider, TextInput, Button } from "omorphia"
|
||||
import TitledSection from "$components/TitledSection.svelte"
|
||||
import WindowSettings from "$components/WindowSettings.svelte"
|
||||
import { Field, Slider, TextInput, Button } from 'omorphia';
|
||||
import TitledSection from '$components/TitledSection.svelte';
|
||||
import WindowSettings from '$components/WindowSettings.svelte';
|
||||
|
||||
export let maxConcurrentDownloads: number = 20;
|
||||
export let maxConcurrentDownloads: number = 20;
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<TitledSection title="Downloads">
|
||||
<FormField label="Max concurrent downloads">
|
||||
<Slider min=1 max=64 bind:value={maxConcurrentDownloads} />
|
||||
</FormField>
|
||||
</TitledSection>
|
||||
<TitledSection title="Override game resolution" toggleable=true>
|
||||
<WindowSettings />
|
||||
</TitledSection>
|
||||
<TitledSection title="Profile hooks">
|
||||
<FormField label="Pre-launch">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
<FormField label="Wrapper">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
<FormField label="Post-exit">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
</TitledSection>
|
||||
<TitledSection title="Java">
|
||||
<FormField label="Java 8 installation">
|
||||
<TextInput placeholder="/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home" />
|
||||
<div class="button-group">
|
||||
<Button>Auto-detect</Button>
|
||||
<Button>Browse installations</Button>
|
||||
<Button>Test</Button>
|
||||
</div>
|
||||
</FormField>
|
||||
<FormField label="Java 17 installation">
|
||||
<TextInput placeholder="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home" />
|
||||
<div class="button-group">
|
||||
<Button>Auto-detect</Button>
|
||||
<Button>Browse installations</Button>
|
||||
<Button>Test</Button>
|
||||
</div>
|
||||
</FormField>
|
||||
<FormField label="Minimum memory allocatted (in MB)">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
<FormField label="Maximum memory allocatted (in MB)">
|
||||
<TextInput value="2048" />
|
||||
</FormField>
|
||||
<FormField label="Arguments">
|
||||
<TextInput/>
|
||||
</FormField>
|
||||
</TitledSection>
|
||||
<TitledSection title="Downloads">
|
||||
<Field label="Max concurrent downloads">
|
||||
<Slider min="1" max="64" bind:value={maxConcurrentDownloads} />
|
||||
</Field>
|
||||
</TitledSection>
|
||||
<TitledSection title="Override game resolution" toggleable="true">
|
||||
<WindowSettings />
|
||||
</TitledSection>
|
||||
<TitledSection title="Profile hooks">
|
||||
<Field label="Pre-launch">
|
||||
<TextInput />
|
||||
</Field>
|
||||
<Field label="Wrapper">
|
||||
<TextInput />
|
||||
</Field>
|
||||
<Field label="Post-exit">
|
||||
<TextInput />
|
||||
</Field>
|
||||
</TitledSection>
|
||||
<TitledSection title="Java">
|
||||
<Field label="Java 8 installation">
|
||||
<TextInput placeholder="/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home" />
|
||||
<div class="button-group">
|
||||
<Button>Auto-detect</Button>
|
||||
<Button>Browse installations</Button>
|
||||
<Button>Test</Button>
|
||||
</div>
|
||||
</Field>
|
||||
<Field label="Java 17 installation">
|
||||
<TextInput placeholder="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home" />
|
||||
<div class="button-group">
|
||||
<Button>Auto-detect</Button>
|
||||
<Button>Browse installations</Button>
|
||||
<Button>Test</Button>
|
||||
</div>
|
||||
</Field>
|
||||
<Field label="Minimum memory allocatted (in MB)">
|
||||
<TextInput />
|
||||
</Field>
|
||||
<Field label="Maximum memory allocatted (in MB)">
|
||||
<TextInput value="2048" />
|
||||
</Field>
|
||||
<Field label="Arguments">
|
||||
<TextInput />
|
||||
</Field>
|
||||
</TitledSection>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
@@ -1,85 +1,90 @@
|
||||
<script lang="ts">
|
||||
import IconPlayFilled from "virtual:icons/carbon/play-filled-alt"
|
||||
import IconBadgeCheck from "virtual:icons/heroicons-solid/badge-check"
|
||||
import IconPlayFilled from 'virtual:icons/carbon/play-filled-alt';
|
||||
import IconBadgeCheck from 'virtual:icons/heroicons-solid/badge-check';
|
||||
|
||||
export let title: string;
|
||||
export let id: string;
|
||||
export let version: string;
|
||||
export let modpack = false;
|
||||
export let image: string;
|
||||
export let title: string;
|
||||
export let id: string;
|
||||
export let version: string;
|
||||
export let modpack = false;
|
||||
export let image: string;
|
||||
</script>
|
||||
|
||||
<a class="instance" href="/library/instance/{id}/settings"
|
||||
style:background-image="linear-gradient(5deg, hsla(0,0%,0%,0.8) 0%, hsla(0,0%,0%,0) 100%), url('{image}')">
|
||||
<div class="instance__version">{version}{#if modpack}<IconBadgeCheck />{/if}</div>
|
||||
<div class="instance__title">{title}</div>
|
||||
<button class="play-button">
|
||||
<IconPlayFilled />
|
||||
</button>
|
||||
<a
|
||||
class="instance"
|
||||
href="/library/instance/{id}/settings"
|
||||
style:background-image="linear-gradient(5deg, hsla(0,0%,0%,0.8) 0%, hsla(0,0%,0%,0) 100%), url('{image}')"
|
||||
>
|
||||
<div class="instance__version">
|
||||
{version}{#if modpack}<IconBadgeCheck />{/if}
|
||||
</div>
|
||||
<div class="instance__title">{title}</div>
|
||||
<button class="play-button">
|
||||
<IconPlayFilled />
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<style lang="postcss">
|
||||
.instance {
|
||||
--size: 8rem;
|
||||
min-width: var(--size);
|
||||
min-height: var(--size);
|
||||
border-radius: var(--rounded);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5rem;
|
||||
box-shadow: var(--shadow-raised) var(--shadow-inset);
|
||||
position: relative;
|
||||
.instance {
|
||||
--size: 8rem;
|
||||
min-width: var(--size);
|
||||
min-height: var(--size);
|
||||
border-radius: var(--rounded);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5rem;
|
||||
box-shadow: var(--shadow-raised) var(--shadow-inset);
|
||||
position: relative;
|
||||
|
||||
background-size: cover;
|
||||
background-size: cover;
|
||||
|
||||
&__title {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__version {
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-sm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
grid-gap: 0.15rem;
|
||||
:global(svg) {
|
||||
margin-bottom: 0.05rem;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .play-button {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.play-button {
|
||||
position: absolute;
|
||||
bottom: 0.5rem;
|
||||
right: 0.5rem;
|
||||
background-color: var(--color-brand);
|
||||
width: 2.5rem;
|
||||
aspect-ratio: 1 / 1;
|
||||
border-radius: var(--rounded-max);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition-property: opacity, visibility, transform;
|
||||
transition-duration: 0.2s;
|
||||
transition-timing-function: ease-in-out;
|
||||
transform: translateY(1rem);
|
||||
|
||||
:global(svg) {
|
||||
width: 1.25rem;
|
||||
height: auto;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
&__title {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__version {
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-sm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
grid-gap: 0.15rem;
|
||||
:global(svg) {
|
||||
margin-bottom: 0.05rem;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .play-button {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.play-button {
|
||||
position: absolute;
|
||||
bottom: 0.5rem;
|
||||
right: 0.5rem;
|
||||
background-color: var(--color-brand);
|
||||
width: 2.5rem;
|
||||
aspect-ratio: 1 / 1;
|
||||
border-radius: var(--rounded-max);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition-property: opacity, visibility, transform;
|
||||
transition-duration: 0.2s;
|
||||
transition-timing-function: ease-in-out;
|
||||
transform: translateY(1rem);
|
||||
|
||||
:global(svg) {
|
||||
width: 1.25rem;
|
||||
height: auto;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<script lang="ts">
|
||||
import { Checkbox } from "omorphia"
|
||||
import { Checkbox } from 'omorphia';
|
||||
|
||||
export let title: string
|
||||
export let toggleable: boolean = false
|
||||
export let title: string;
|
||||
export let toggleable: boolean = false;
|
||||
|
||||
export let enabled: boolean = false
|
||||
export let enabled: boolean = false;
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<div class="section__title">
|
||||
{#if toggleable}<Checkbox bind:checked={enabled}>{title}</Checkbox>
|
||||
{:else}{title}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="section__items">
|
||||
{#if !toggleable || enabled}<slot />{/if}
|
||||
</div>
|
||||
<div class="section__title">
|
||||
{#if toggleable}<Checkbox bind:checked={enabled}>{title}</Checkbox>
|
||||
{:else}{title}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="section__items">
|
||||
{#if !toggleable || enabled}<slot />{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
grid-gap: 1rem;
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
grid-gap: 1rem;
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: center;
|
||||
&__title {
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: center;
|
||||
|
||||
&::after {
|
||||
flex: 1 1;
|
||||
content: " ";
|
||||
background-color: hsla(0, 0%, 100%, 0.2);
|
||||
height: 0.2rem;
|
||||
border-radius: var(--rounded-max);
|
||||
}
|
||||
}
|
||||
|
||||
&__items {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 1rem;
|
||||
padding: 0 8px;
|
||||
}
|
||||
&::after {
|
||||
flex: 1 1;
|
||||
content: ' ';
|
||||
background-color: hsla(0, 0%, 100%, 0.2);
|
||||
height: 0.2rem;
|
||||
border-radius: var(--rounded-max);
|
||||
}
|
||||
}
|
||||
|
||||
&__items {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 1rem;
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,36 +1,39 @@
|
||||
<script lang="ts">
|
||||
import { page } from "$app/stores";
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
export let items: {
|
||||
label: string,
|
||||
/** Page href, without slash prefix */
|
||||
href: string,
|
||||
/** An icon, as a svelte component */
|
||||
icon: any, // `SvelteComponentDev` has type errors
|
||||
}[];
|
||||
export let items: {
|
||||
label: string;
|
||||
/** Page href, without slash prefix */
|
||||
href: string;
|
||||
icon: SvelteComponent;
|
||||
}[];
|
||||
|
||||
/** Path level in URL, zero-indexed */
|
||||
export let level = 0;
|
||||
/** Path level in URL, zero-indexed */
|
||||
export let level = 0;
|
||||
|
||||
let path: string[];
|
||||
$: path = $page.url.pathname
|
||||
.substring(1)
|
||||
.split('/')
|
||||
let path: string[];
|
||||
$: path = $page.url.pathname.substring(1).split('/');
|
||||
</script>
|
||||
|
||||
<div class="vertical-nav">
|
||||
{#each items as item (item.href)}
|
||||
<a class="nav-item" href="/{item.href}" class:active={path[level] === item.href} sveltekit:prefetch>
|
||||
<svelte:component this={item.icon} />
|
||||
{item.label}
|
||||
</a>
|
||||
{/each}
|
||||
{#each items as item (item.href)}
|
||||
<a
|
||||
class="nav-item"
|
||||
href="/{item.href}"
|
||||
class:active={path[level] === item.href}
|
||||
sveltekit:prefetch
|
||||
>
|
||||
<svelte:component this={item.icon} />
|
||||
{item.label}
|
||||
</a>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.vertical-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 0.25rem;
|
||||
}
|
||||
.vertical-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 0.25rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { FormField, TextInput } from "omorphia"
|
||||
import { Field, TextInput } from 'omorphia';
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<FormField label="Window width">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
<FormField label="Window height">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
<Field label="Window width">
|
||||
<TextInput />
|
||||
</Field>
|
||||
<Field label="Window height">
|
||||
<TextInput />
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
Reference in New Issue
Block a user