Update omorphia, start a global settings page
This commit is contained in:
parent
8935d0e56c
commit
179dcdcd04
@ -35,7 +35,7 @@
|
||||
"@iconify-json/heroicons-solid": "^1.1.1",
|
||||
"@iconify-json/lucide": "^1.1.5",
|
||||
"@tauri-apps/api": "^1.0.0-rc.1",
|
||||
"omorphia": "0.0.15",
|
||||
"omorphia": "0.0.17",
|
||||
"svrollbar": "^0.10.4",
|
||||
"unplugin-icons": "^0.13.2"
|
||||
}
|
||||
|
||||
14
theseus_gui/pnpm-lock.yaml
generated
14
theseus_gui/pnpm-lock.yaml
generated
@ -16,7 +16,7 @@ specifiers:
|
||||
eslint-config-prettier: ^8.3.0
|
||||
eslint-plugin-svelte3: ^3.2.1
|
||||
kill-port-process: ^3.0.1
|
||||
omorphia: 0.0.15
|
||||
omorphia: 0.0.17
|
||||
prettier: ^2.5.1
|
||||
prettier-plugin-svelte: ^2.5.0
|
||||
svelte: ^3.46.0
|
||||
@ -33,13 +33,13 @@ dependencies:
|
||||
'@iconify-json/heroicons-solid': 1.1.1
|
||||
'@iconify-json/lucide': 1.1.5
|
||||
'@tauri-apps/api': 1.0.0-rc.1
|
||||
omorphia: 0.0.15_svelte@3.46.4
|
||||
omorphia: 0.0.17_svelte@3.46.4
|
||||
svrollbar: 0.10.4
|
||||
unplugin-icons: 0.13.2
|
||||
|
||||
devDependencies:
|
||||
'@sveltejs/adapter-static': 1.0.0-next.29
|
||||
'@sveltejs/kit': 1.0.0-next.304_svelte@3.46.4
|
||||
'@sveltejs/kit': 1.0.0-next.314_svelte@3.46.4
|
||||
'@tauri-apps/cli': 1.0.0-rc.5
|
||||
'@typescript-eslint/eslint-plugin': 5.12.1_78ba2542c270c83b2a80bb1c125195b6
|
||||
'@typescript-eslint/parser': 5.12.1_eslint@7.32.0+typescript@4.5.5
|
||||
@ -300,8 +300,8 @@ packages:
|
||||
tiny-glob: 0.2.9
|
||||
dev: true
|
||||
|
||||
/@sveltejs/kit/1.0.0-next.304_svelte@3.46.4:
|
||||
resolution: {integrity: sha512-3+bCoDsF2Omolx51lK6+4Zgr8NYge8USxKpZpAg8OfonEW8L4GToyV4g+udLMCI3CC4QEw3eS1RFUj9UxLf2NQ==}
|
||||
/@sveltejs/kit/1.0.0-next.314_svelte@3.46.4:
|
||||
resolution: {integrity: sha512-EkXjEd30XO8+AydBLARxAtI6Ak8V0KFSEJ07sNsrkGq9J70sWPL7yGenhGaeq6S852XZAqeyWd6uGQZmQLR4Wg==}
|
||||
engines: {node: '>=14.13'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@ -1992,8 +1992,8 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/omorphia/0.0.15_svelte@3.46.4:
|
||||
resolution: {integrity: sha512-j06eroREjaoF1A/etxvxAOahV2MqW2/36IOrjdB+UQzlAflsBXkSPNXb1e7GUHANP3GUobhvUyg6IBFOXf/R6g==}
|
||||
/omorphia/0.0.17_svelte@3.46.4:
|
||||
resolution: {integrity: sha512-MeOhG4VT7GHt/rNB37Fj2YSkVV813ZMgjImOtPilwxE9NNyJp220JU5Cy4/BxCRpdF2GOuokZPPIK+RO6mWRYA==}
|
||||
dependencies:
|
||||
'@iconify-json/carbon': 1.1.1
|
||||
'@iconify-json/heroicons-outline': 1.1.1
|
||||
|
||||
59
theseus_gui/src/components/GlobalSettings.svelte
Normal file
59
theseus_gui/src/components/GlobalSettings.svelte
Normal file
@ -0,0 +1,59 @@
|
||||
<script lang="ts">
|
||||
import { FormField, Slider, TextInput, Button } from "omorphia"
|
||||
import TitledSection from "$components/TitledSection.svelte"
|
||||
import WindowSettings from "$components/WindowSettings.svelte"
|
||||
|
||||
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>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
</style>
|
||||
49
theseus_gui/src/components/TitledSection.svelte
Normal file
49
theseus_gui/src/components/TitledSection.svelte
Normal file
@ -0,0 +1,49 @@
|
||||
<script lang="ts">
|
||||
import { Checkbox } from "omorphia"
|
||||
|
||||
export let title: string
|
||||
export let toggleable: 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>
|
||||
|
||||
<style lang="postcss">
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
grid-gap: 1rem;
|
||||
|
||||
&__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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
15
theseus_gui/src/components/WindowSettings.svelte
Normal file
15
theseus_gui/src/components/WindowSettings.svelte
Normal file
@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { FormField, TextInput } from "omorphia"
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<FormField label="Window width">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
<FormField label="Window height">
|
||||
<TextInput />
|
||||
</FormField>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
</style>
|
||||
@ -3,53 +3,18 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { FormField, TextInput, Button } from "omorphia"
|
||||
import { Checkbox, FormField, TextInput, Button } from "omorphia"
|
||||
import GlobalSettings from "$components/GlobalSettings.svelte"
|
||||
import TitledSection from "$components/TitledSection.svelte"
|
||||
|
||||
export let overrideGlobalSettings = false
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<div class="section__title">Java</div>
|
||||
<div class="section__items">
|
||||
<FormField label="Installation">
|
||||
<TextInput placeholder="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home" />
|
||||
</FormField>
|
||||
<div class="button-group">
|
||||
<Button>Auto-detect</Button>
|
||||
<Button>Browse installations</Button>
|
||||
<Button>Test</Button>
|
||||
</div>
|
||||
|
||||
<FormField label="Arguments">
|
||||
<TextInput/>
|
||||
</FormField>
|
||||
</div>
|
||||
<TitledSection title="Override global settings" toggleable=true>
|
||||
<GlobalSettings />
|
||||
</TitledSection>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
grid-gap: 1rem;
|
||||
|
||||
&__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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
15
theseus_gui/src/routes/settings.svelte
Normal file
15
theseus_gui/src/routes/settings.svelte
Normal file
@ -0,0 +1,15 @@
|
||||
<script context="module" lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { Checkbox, FormField, TextInput, Button } from "omorphia"
|
||||
import GlobalSettings from "$components/GlobalSettings.svelte"
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<GlobalSettings />
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user