You've already forked AstralRinth
forked from didirus/AstralRinth
Merge pull request #38 from Wuzado/master
Make Theseus compilable out of the box again, update Tauri to 1.0.4
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
node_modules/
|
||||
.svelte-kit/
|
||||
theseus_gui/build/
|
||||
theseus_gui/generated/
|
||||
WixTools
|
||||
.direnv/
|
||||
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "theseus_gui/locales"]
|
||||
path = theseus_gui/locales
|
||||
url = https://github.com/modrinth/translations
|
||||
1
.idea/theseus.iml
generated
1
.idea/theseus.iml
generated
@@ -47,6 +47,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/target/debug/build/crossbeam-utils-bab62be590a5955d/out" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/target/debug/build/memoffset-235ac8b3550fb50a/out" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/theseus/examples" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/theseus_gui/src-tauri/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/theseus_gui/.svelte-kit" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/theseus_gui/build" />
|
||||
|
||||
679
Cargo.lock
generated
679
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
1
theseus_gui/locales
Submodule
1
theseus_gui/locales
Submodule
Submodule theseus_gui/locales added at 73d326c7ef
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "tauri dev",
|
||||
"dev:web": "svelte-kit dev",
|
||||
"kill:web": "kill-port 3000",
|
||||
"dev:web": "vite",
|
||||
"kill:web": "kill-port 5173",
|
||||
"tauri": "tauri",
|
||||
"build": "tauri build",
|
||||
"build:web": "svelte-kit build",
|
||||
"build:web": "vite build",
|
||||
"test": "cargo ../test --manifest-path ./src-tauri/Cargo.toml",
|
||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. src",
|
||||
"check": "cargo check --manifest-path src-tauri/Cargo.toml && svelte-check --tsconfig ./tsconfig.json"
|
||||
@@ -13,7 +13,7 @@
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-static": "next",
|
||||
"@sveltejs/kit": "next",
|
||||
"@tauri-apps/cli": "^1.0.0-rc.5",
|
||||
"@tauri-apps/cli": "^1.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
||||
"@typescript-eslint/parser": "^5.10.1",
|
||||
"eslint": "^7.32.0",
|
||||
@@ -24,8 +24,10 @@
|
||||
"prettier-plugin-svelte": "^2.5.0",
|
||||
"svelte": "^3.46.0",
|
||||
"svelte-check": "^2.2.6",
|
||||
"svelte-intl-precompile": "^0.11.1",
|
||||
"tslib": "^2.3.1",
|
||||
"typescript": "~4.5.4"
|
||||
"typescript": "~4.5.4",
|
||||
"vite": "^3.0.0"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
@@ -34,9 +36,10 @@
|
||||
"@iconify-json/heroicons-outline": "^1.1.1",
|
||||
"@iconify-json/heroicons-solid": "^1.1.1",
|
||||
"@iconify-json/lucide": "^1.1.5",
|
||||
"@tauri-apps/api": "^1.0.0-rc.1",
|
||||
"omorphia": "0.0.17",
|
||||
"svrollbar": "^0.10.4",
|
||||
"unplugin-icons": "^0.13.2"
|
||||
"@tauri-apps/api": "^1.0.2",
|
||||
"omorphia": "0.0.67",
|
||||
"svrollbar": "^0.12.0",
|
||||
"unplugin-icons": "^0.14.7",
|
||||
"highlight.js": "11.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
3131
theseus_gui/pnpm-lock.yaml
generated
3131
theseus_gui/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
module.exports = require('omorphia/config/postcss.config.cjs')
|
||||
module.exports = require('omorphia/config/postcss.cjs')
|
||||
@@ -8,12 +8,12 @@ rust-version = "1.57"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.0.0-rc.3", features = [] }
|
||||
tauri-build = { version = "1.0.4", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.0.0-rc.3", features = ["api-all"] }
|
||||
tauri = { version = "1.0.4", features = ["api-all"] }
|
||||
|
||||
[features]
|
||||
# by default Tauri runs in production mode
|
||||
|
||||
@@ -9,12 +9,12 @@ use tauri::{
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let ctx = tauri::generate_context!();
|
||||
let ctx = tauri::generate_context!(); // Run `pnpm build:web` (builds the web app) to get rid of the error.
|
||||
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![])
|
||||
.create_window("main", WindowUrl::default(), |win, webview| {
|
||||
let win = win
|
||||
.setup(|app| {
|
||||
let _win = WindowBuilder::new(app, "main", WindowUrl::default())
|
||||
.title("Modrinth")
|
||||
.resizable(true)
|
||||
.decorations(true)
|
||||
@@ -22,15 +22,16 @@ fn main() {
|
||||
.inner_size(800.0, 550.0)
|
||||
.min_inner_size(400.0, 200.0)
|
||||
.skip_taskbar(false)
|
||||
.fullscreen(false);
|
||||
return (win, webview);
|
||||
.fullscreen(false)
|
||||
.build()?;
|
||||
Ok(())
|
||||
})
|
||||
.menu(Menu::with_items([
|
||||
#[cfg(target_os = "macos")]
|
||||
MenuEntry::Submenu(Submenu::new(
|
||||
&ctx.package_info().name,
|
||||
Menu::with_items([
|
||||
MenuItem::About(ctx.package_info().name.clone()).into(),
|
||||
// MenuItem::About(ctx.package_info().name.clone()).into(),
|
||||
MenuItem::Separator.into(),
|
||||
MenuItem::Services.into(),
|
||||
MenuItem::Separator.into(),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
},
|
||||
"build": {
|
||||
"distDir": "../build",
|
||||
"devPath": "http://localhost:3000",
|
||||
"devPath": "http://localhost:5173",
|
||||
"beforeDevCommand": "pnpm dev:web",
|
||||
"beforeBuildCommand": "pnpm run build:web"
|
||||
},
|
||||
@@ -32,13 +32,11 @@
|
||||
"shortDescription": "",
|
||||
"longDescription": "",
|
||||
"deb": {
|
||||
"depends": [],
|
||||
"useBootstrapper": false
|
||||
"depends": []
|
||||
},
|
||||
"macOS": {
|
||||
"frameworks": [],
|
||||
"minimumSystemVersion": "",
|
||||
"useBootstrapper": false,
|
||||
"exceptionDomain": "",
|
||||
"signingIdentity": null,
|
||||
"providerShortName": null,
|
||||
|
||||
8
theseus_gui/src/app.d.ts
vendored
8
theseus_gui/src/app.d.ts
vendored
@@ -3,11 +3,11 @@
|
||||
// See https://kit.svelte.dev/docs/typescript
|
||||
// for information about these interfaces
|
||||
declare namespace App {
|
||||
interface Locals {}
|
||||
interface Locals {}
|
||||
|
||||
interface Platform {}
|
||||
interface Platform {}
|
||||
|
||||
interface Session {}
|
||||
interface Session {}
|
||||
|
||||
interface Stuff {}
|
||||
interface Stuff {}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%svelte.head%
|
||||
</head>
|
||||
<body style="background-color: hsl(220, 13%, 15%)">
|
||||
%svelte.body%
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="preload" href="/fonts/InterRegular.woff2" as="font" type="font/woff2" crossorigin />
|
||||
<link rel="preload" href="/fonts/InterBold.woff2" as="font" type="font/woff2" crossorigin />
|
||||
<link rel="preload" href="/fonts/InterSemiBold.woff2" as="font" type="font/woff2" crossorigin />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body class="base theme-dark" style="background-color: hsl(220, 13%, 15%)">
|
||||
%sveltekit.body%
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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,34 @@
|
||||
<script lang="ts">
|
||||
import { SvelteComponent } from 'svelte'
|
||||
import { page } from "$app/stores";
|
||||
import { SvelteComponent } from 'svelte';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
export let items: {
|
||||
label: string,
|
||||
/** Page href, without slash prefix */
|
||||
href: string,
|
||||
icon: SvelteComponent
|
||||
}[];
|
||||
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}>
|
||||
<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}>
|
||||
<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">
|
||||
|
||||
10
theseus_gui/src/global.d.ts
vendored
10
theseus_gui/src/global.d.ts
vendored
@@ -2,12 +2,12 @@
|
||||
/// <reference types="unplugin-icons/types/svelte" />
|
||||
|
||||
declare module '$assets/images/*' {
|
||||
export { SvelteComponentDev as default } from 'svelte/internal';
|
||||
export { SvelteComponentDev as default } from 'svelte/internal';
|
||||
}
|
||||
declare module '$locales/*';
|
||||
|
||||
declare module '*.svg' {
|
||||
import { SvelteComponent } from 'svelte';
|
||||
const content: SvelteComponent;
|
||||
export default content;
|
||||
}
|
||||
import { SvelteComponent } from 'svelte';
|
||||
const content: SvelteComponent;
|
||||
export default content;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @type {import('@sveltejs/kit').Handle} */
|
||||
export async function handle({ event, resolve }) {
|
||||
return await resolve(event, {
|
||||
ssr: false,
|
||||
});
|
||||
}
|
||||
return await resolve(event, {
|
||||
ssr: false
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
<script lang="ts">
|
||||
import { Svrollbar } from 'svrollbar'
|
||||
import { Svrollbar } from 'svrollbar';
|
||||
|
||||
let viewport: Element
|
||||
let contents: Element
|
||||
let viewport: Element;
|
||||
let contents: Element;
|
||||
</script>
|
||||
|
||||
<div class="page">
|
||||
<div bind:this={viewport} class="viewport">
|
||||
<div bind:this={contents} class="contents">
|
||||
<slot />
|
||||
</div>
|
||||
<div bind:this={viewport} class="viewport">
|
||||
<div bind:this={contents} class="contents">
|
||||
<slot />
|
||||
</div>
|
||||
<Svrollbar {viewport} {contents} />
|
||||
</div>
|
||||
<Svrollbar {viewport} {contents} />
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.page {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.page {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
--svrollbar-track-width: 20px;
|
||||
--svrollbar-track-opacity: 0;
|
||||
--svrollbar-track-width: 20px;
|
||||
--svrollbar-track-opacity: 0;
|
||||
|
||||
--svrollbar-thumb-width: 8px;
|
||||
--svrollbar-thumb-background: hsla(216,5%,60%);
|
||||
--svrollbar-thumb-opacity: 0.9;
|
||||
--svrollbar-thumb-width: 8px;
|
||||
--svrollbar-thumb-background: hsla(216, 5%, 60%);
|
||||
--svrollbar-thumb-opacity: 0.9;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(100vh - 2.5rem);
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
/* hide scrollbar */
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
/* hide scrollbar */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(100vh - 2.5rem);
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
/* hide scrollbar */
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
/* hide scrollbar */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.contents {
|
||||
height: 100%;
|
||||
}
|
||||
.contents {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:global(.v-thumb) {
|
||||
margin: 4px auto 4px auto !important;
|
||||
}
|
||||
</style>
|
||||
:global(.v-thumb) {
|
||||
margin: 4px auto 4px auto !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,144 +1,146 @@
|
||||
<script lang="ts">
|
||||
import VerticalNav from '../components/VerticalNav.svelte'
|
||||
import IconHome from 'virtual:icons/lucide/home'
|
||||
import IconSearch from 'virtual:icons/heroicons-outline/search'
|
||||
import IconPlus from 'virtual:icons/heroicons-outline/plus'
|
||||
import IconLibrary from 'virtual:icons/lucide/library';
|
||||
import IconSettings from 'virtual:icons/lucide/settings'
|
||||
import { page } from "$app/stores";
|
||||
import { Button } from 'omorphia'
|
||||
import VerticalNav from '../components/VerticalNav.svelte';
|
||||
import IconHome from 'virtual:icons/lucide/home';
|
||||
import IconSearch from 'virtual:icons/heroicons-outline/search';
|
||||
import IconPlus from 'virtual:icons/heroicons-outline/plus';
|
||||
import IconLibrary from 'virtual:icons/lucide/library';
|
||||
import IconSettings from 'virtual:icons/lucide/settings';
|
||||
import { page } from '$app/stores';
|
||||
import { Button } from 'omorphia';
|
||||
</script>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="account">
|
||||
<div class="account__heads">
|
||||
<img src="https://mc-heads.net/avatar/venashial" alt="Minecraft head"/>
|
||||
</div>
|
||||
|
||||
<a class="account__info" href="/settings/accounts">
|
||||
<div>venashial</div>
|
||||
<div class="account__info__manage">Manage accounts</div>
|
||||
</a>
|
||||
<div class="account">
|
||||
<div class="account__heads">
|
||||
<img src="https://mc-heads.net/avatar/venashial" alt="Minecraft head" />
|
||||
</div>
|
||||
|
||||
<VerticalNav items={[
|
||||
{
|
||||
label: 'Home',
|
||||
href: '',
|
||||
icon: IconHome,
|
||||
},
|
||||
{
|
||||
label: 'Search',
|
||||
href: 'search',
|
||||
icon: IconSearch,
|
||||
},
|
||||
{
|
||||
label: 'Library',
|
||||
href: 'library',
|
||||
icon: IconLibrary,
|
||||
}
|
||||
]}/>
|
||||
|
||||
<div class="instance-list">
|
||||
<div class="instance-list__title">Instances</div>
|
||||
<div class="instance-list__container">
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
</div>
|
||||
<div class="instance-list__create">
|
||||
<Button color="primary"><IconPlus /></Button> Create instance
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="nav-item" href="/settings" class:active={$page.url.pathname.startsWith('/settings')}>
|
||||
<IconSettings />
|
||||
Settings
|
||||
<a class="account__info" href="/settings/accounts">
|
||||
<div>venashial</div>
|
||||
<div class="account__info__manage">Manage accounts</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<VerticalNav
|
||||
items={[
|
||||
{
|
||||
label: 'Home',
|
||||
href: '',
|
||||
icon: IconHome
|
||||
},
|
||||
{
|
||||
label: 'Search',
|
||||
href: 'search',
|
||||
icon: IconSearch
|
||||
},
|
||||
{
|
||||
label: 'Library',
|
||||
href: 'library',
|
||||
icon: IconLibrary
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
||||
<div class="instance-list">
|
||||
<div class="instance-list__title">Instances</div>
|
||||
<div class="instance-list__container">
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
<a class="instance-list__container__item">Fabulously Optimized</a>
|
||||
</div>
|
||||
<div class="instance-list__create">
|
||||
<Button color="primary"><IconPlus /></Button> Create instance
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="nav-item" href="/settings" class:active={$page.url.pathname.startsWith('/settings')}>
|
||||
<IconSettings />
|
||||
Settings
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.sidebar {
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
height: 100%;
|
||||
background-color: var(--sidebar-bg);
|
||||
|
||||
.account {
|
||||
display: flex;
|
||||
grid-gap: 0.75rem;
|
||||
|
||||
&__heads {
|
||||
img {
|
||||
width: 2.5rem;
|
||||
border-radius: var(--rounded-sm);
|
||||
}
|
||||
}
|
||||
|
||||
&__info {
|
||||
&__manage {
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.instance-list {
|
||||
padding: 0 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--color-text-light);
|
||||
|
||||
&__title {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
font-size: 11px;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
&__container {
|
||||
max-height: calc(100vh - 400px);
|
||||
overflow-y: auto;
|
||||
mask-image: linear-gradient(to bottom, transparent, hsla(0, 0%, 0%, 1) 5% 95%, transparent);
|
||||
scrollbar-width: none;
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
height: 100%;
|
||||
background-color: var(--sidebar-bg);
|
||||
gap: 4px;
|
||||
|
||||
.account {
|
||||
display: flex;
|
||||
grid-gap: 0.75rem;
|
||||
|
||||
&__heads {
|
||||
img {
|
||||
width: 2.5rem;
|
||||
border-radius: var(--rounded-sm);
|
||||
}
|
||||
}
|
||||
|
||||
&__info {
|
||||
&__manage {
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
}
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.instance-list {
|
||||
padding: 0 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--color-text-light);
|
||||
&__create {
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
grid-gap: 8px;
|
||||
|
||||
&__title {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
font-size: 11px;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
&__container {
|
||||
max-height: calc(100vh - 400px);
|
||||
overflow-y: auto;
|
||||
mask-image: linear-gradient(to bottom, transparent, hsla(0, 0%, 0%, 1) 5% 95%, transparent);
|
||||
scrollbar-width: none;
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__create {
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
grid-gap: 8px;
|
||||
|
||||
:global(button) {
|
||||
width: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> :global(*) {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
> *:last-child {
|
||||
margin-top: auto;
|
||||
margin-bottom: 0;
|
||||
:global(button) {
|
||||
width: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> :global(*) {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
> *:last-child {
|
||||
margin-top: auto;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,71 +1,69 @@
|
||||
<script lang="ts">
|
||||
import IconChevronLeft from 'virtual:icons/lucide/chevron-left';
|
||||
import IconChevronRight from 'virtual:icons/lucide/chevron-right';
|
||||
import IconCaretRight from 'virtual:icons/carbon/caret-right';
|
||||
import { page } from '$app/stores'
|
||||
import IconChevronLeft from 'virtual:icons/lucide/chevron-left';
|
||||
import IconChevronRight from 'virtual:icons/lucide/chevron-right';
|
||||
import IconCaretRight from 'virtual:icons/carbon/caret-right';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
let path: string[];
|
||||
$: path = $page.url.pathname
|
||||
.substring(1)
|
||||
.split('/')
|
||||
let path: string[];
|
||||
$: path = $page.url.pathname.substring(1).split('/');
|
||||
</script>
|
||||
|
||||
<div class="status-bar">
|
||||
<div class="page-nav">
|
||||
<button title="Back" on:click={() => window.history.back()}>
|
||||
<IconChevronLeft />
|
||||
</button>
|
||||
<button title="Forward" on:click={() => window.history.forward()}>
|
||||
<IconChevronRight />
|
||||
</button>
|
||||
</div>
|
||||
<div class="page-nav">
|
||||
<button title="Back" on:click={() => window.history.back()}>
|
||||
<IconChevronLeft />
|
||||
</button>
|
||||
<button title="Forward" on:click={() => window.history.forward()}>
|
||||
<IconChevronRight />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumbs">
|
||||
{#each path as crumb, index}
|
||||
{#if index !== 0}
|
||||
<IconCaretRight />
|
||||
{/if}
|
||||
<a class="breadcrumbs__crumb" href={crumb}>{crumb || 'home'}</a>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="breadcrumbs">
|
||||
{#each path as crumb, index}
|
||||
{#if index !== 0}
|
||||
<IconCaretRight />
|
||||
{/if}
|
||||
<a class="breadcrumbs__crumb" href={crumb}>{crumb || 'home'}</a>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div class="statuses">
|
||||
<div>Updating 12 mods...</div>
|
||||
<div>236 mods installed</div>
|
||||
</div>
|
||||
<div class="statuses">
|
||||
<div>Updating 12 mods...</div>
|
||||
<div>236 mods installed</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.status-bar {
|
||||
display: flex;
|
||||
padding: 0.75rem;
|
||||
grid-gap: 0.75rem;
|
||||
background-color: var(--status-bg);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
box-shadow: var(--shadow-raised);
|
||||
.status-bar {
|
||||
display: flex;
|
||||
padding: 0.75rem;
|
||||
grid-gap: 0.75rem;
|
||||
background-color: var(--status-bg);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
box-shadow: var(--shadow-raised);
|
||||
}
|
||||
|
||||
.breadcrumbs {
|
||||
display: flex;
|
||||
grid-gap: 0.25rem;
|
||||
text-transform: capitalize;
|
||||
align-items: center;
|
||||
|
||||
&__crumb:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.breadcrumbs {
|
||||
display: flex;
|
||||
grid-gap: 0.25rem;
|
||||
text-transform: capitalize;
|
||||
align-items: center;
|
||||
|
||||
&__crumb:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
:global(.icon) {
|
||||
color: var(--color-text-lightest)
|
||||
}
|
||||
:global(.icon) {
|
||||
color: var(--color-text-lightest);
|
||||
}
|
||||
}
|
||||
|
||||
.statuses {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
color: var(--color-text-lightest);
|
||||
}
|
||||
.statuses {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
color: var(--color-text-lightest);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,41 +1,58 @@
|
||||
<script context="module" lang="ts">
|
||||
import { init, waitLocale, t, getLocaleFromAcceptLanguageHeader } from 'svelte-intl-precompile';
|
||||
import { registerAll, availableLocales } from '$locales';
|
||||
|
||||
registerAll();
|
||||
|
||||
export const load: import('@sveltejs/kit').Load = async ({ session }) => {
|
||||
init({
|
||||
fallbackLocale: 'en',
|
||||
initialLocale: getLocaleFromAcceptLanguageHeader(session.acceptLanguage, availableLocales)
|
||||
});
|
||||
await waitLocale();
|
||||
|
||||
return {};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import '@fontsource/inter'
|
||||
import 'omorphia/styles.postcss'
|
||||
import '$styles/global.postcss'
|
||||
import Sidebar from '$layout/Sidebar.svelte'
|
||||
import StatusBar from "$layout/StatusBar.svelte";
|
||||
import Page from "$layout/Page.svelte";
|
||||
import '@fontsource/inter';
|
||||
import 'omorphia/styles.postcss';
|
||||
import '$styles/global.postcss';
|
||||
import Sidebar from '$layout/Sidebar.svelte';
|
||||
import StatusBar from '$layout/StatusBar.svelte';
|
||||
import Page from '$layout/Page.svelte';
|
||||
</script>
|
||||
|
||||
<div class="app base theme-dark">
|
||||
<Sidebar />
|
||||
<StatusBar />
|
||||
<Page>
|
||||
<slot/>
|
||||
</Page>
|
||||
<Sidebar />
|
||||
<StatusBar />
|
||||
<Page>
|
||||
<slot />
|
||||
</Page>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.app {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"sidebar status-bar"
|
||||
"sidebar page";
|
||||
grid-template-rows: 2.5rem 1fr;
|
||||
grid-template-columns: 14rem 1fr;
|
||||
}
|
||||
.app {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
'sidebar status-bar'
|
||||
'sidebar page';
|
||||
grid-template-rows: 2.5rem 1fr;
|
||||
grid-template-columns: 14rem 1fr;
|
||||
}
|
||||
|
||||
:global(.page) {
|
||||
grid-area: page;
|
||||
}
|
||||
:global(.page) {
|
||||
grid-area: page;
|
||||
}
|
||||
|
||||
:global(.sidebar) {
|
||||
grid-area: sidebar;
|
||||
}
|
||||
:global(.sidebar) {
|
||||
grid-area: sidebar;
|
||||
}
|
||||
|
||||
:global(.status-bar) {
|
||||
grid-area: status-bar;
|
||||
}
|
||||
:global(.status-bar) {
|
||||
grid-area: status-bar;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,27 +1,41 @@
|
||||
<script lang="ts">
|
||||
|
||||
import Instance from "$components/Instance.svelte";
|
||||
import CardRow from "$components/CardRow.svelte";
|
||||
import Instance from '$components/Instance.svelte';
|
||||
import CardRow from '$components/CardRow.svelte';
|
||||
</script>
|
||||
|
||||
<CardRow title="Jump back in">
|
||||
{#each Array(5) as _, i}
|
||||
<Instance title="New Caves" id="234" version="1.18" image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg" />
|
||||
{/each}
|
||||
{#each Array(5) as _, i}
|
||||
<Instance
|
||||
title="New Caves"
|
||||
id="234"
|
||||
version="1.18"
|
||||
image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg"
|
||||
/>
|
||||
{/each}
|
||||
</CardRow>
|
||||
|
||||
<CardRow title="Popular packs">
|
||||
{#each Array(5) as _, i}
|
||||
<Instance title="All of Fabric 5" id="567" version="1.18.1" image="https://media.forgecdn.net/avatars/458/829/637733746768258525.png" modpack />
|
||||
{/each}
|
||||
{#each Array(5) as _, i}
|
||||
<Instance
|
||||
title="All of Fabric 5"
|
||||
id="567"
|
||||
version="1.18.1"
|
||||
image="https://media.forgecdn.net/avatars/458/829/637733746768258525.png"
|
||||
modpack
|
||||
/>
|
||||
{/each}
|
||||
</CardRow>
|
||||
|
||||
<CardRow title="New releases">
|
||||
{#each Array(5) as _, i}
|
||||
<Instance title="New Caves" id="234" version="1.18.2" image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg" />
|
||||
{/each}
|
||||
{#each Array(5) as _, i}
|
||||
<Instance
|
||||
title="New Caves"
|
||||
id="234"
|
||||
version="1.18.2"
|
||||
image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg"
|
||||
/>
|
||||
{/each}
|
||||
</CardRow>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
<script context="module" lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,49 +1,52 @@
|
||||
<script lang="ts">
|
||||
import VerticalNav from "$components/VerticalNav.svelte";
|
||||
import IconPackage from 'virtual:icons/lucide/package'
|
||||
import IconAdjustments from 'virtual:icons/heroicons-outline/adjustments'
|
||||
import IconFileText from 'virtual:icons/lucide/file-text'
|
||||
import VerticalNav from '$components/VerticalNav.svelte';
|
||||
import IconPackage from 'virtual:icons/lucide/package';
|
||||
import IconAdjustments from 'virtual:icons/heroicons-outline/adjustments';
|
||||
import IconFileText from 'virtual:icons/lucide/file-text';
|
||||
</script>
|
||||
|
||||
<div class="layout-instance">
|
||||
<div class="instance-sidebar">
|
||||
<VerticalNav level={3} items={[
|
||||
<div class="instance-sidebar">
|
||||
<VerticalNav
|
||||
level={3}
|
||||
items={[
|
||||
{
|
||||
label: 'Mods',
|
||||
href: 'mods',
|
||||
icon: IconPackage,
|
||||
label: 'Mods',
|
||||
href: 'mods',
|
||||
icon: IconPackage
|
||||
},
|
||||
{
|
||||
label: 'Settings',
|
||||
href: 'settings',
|
||||
icon: IconAdjustments,
|
||||
label: 'Settings',
|
||||
href: 'settings',
|
||||
icon: IconAdjustments
|
||||
},
|
||||
{
|
||||
label: 'Logs',
|
||||
href: 'logs',
|
||||
icon: IconFileText,
|
||||
label: 'Logs',
|
||||
href: 'logs',
|
||||
icon: IconFileText
|
||||
}
|
||||
]}/>
|
||||
</div>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="layout-instance__page">
|
||||
<slot />
|
||||
</div>
|
||||
<div class="layout-instance__page">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.layout-instance {
|
||||
display: grid;
|
||||
grid-template-columns: 224px 1fr;
|
||||
height: 100%;
|
||||
.layout-instance {
|
||||
display: grid;
|
||||
grid-template-columns: 224px 1fr;
|
||||
height: 100%;
|
||||
|
||||
&__page {
|
||||
height: 100%;
|
||||
background-color: var(--sub-page-bg);
|
||||
}
|
||||
&__page {
|
||||
height: 100%;
|
||||
background-color: var(--sub-page-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.instance-sidebar {
|
||||
padding: 16px;
|
||||
}
|
||||
.instance-sidebar {
|
||||
padding: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<script context="module" lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { Checkbox, FormField, TextInput, Button } from "omorphia"
|
||||
import GlobalSettings from "$components/GlobalSettings.svelte"
|
||||
import TitledSection from "$components/TitledSection.svelte"
|
||||
import GlobalSettings from '$components/GlobalSettings.svelte';
|
||||
import TitledSection from '$components/TitledSection.svelte';
|
||||
|
||||
export let overrideGlobalSettings = false
|
||||
export let overrideGlobalSettings = false;
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<TitledSection title="Override global settings" toggleable=true>
|
||||
<GlobalSettings />
|
||||
</TitledSection>
|
||||
<TitledSection title="Override global settings" toggleable="true">
|
||||
<GlobalSettings />
|
||||
</TitledSection>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<script context="module" lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { Checkbox, FormField, TextInput, Button } from "omorphia"
|
||||
import GlobalSettings from "$components/GlobalSettings.svelte"
|
||||
import GlobalSettings from '$components/GlobalSettings.svelte';
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<GlobalSettings />
|
||||
<GlobalSettings />
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
3
theseus_gui/src/stores/account.ts
Normal file
3
theseus_gui/src/stores/account.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const token = writable('');
|
||||
@@ -1,19 +1,19 @@
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
grid-gap: 0.5rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: var(--rounded-sm);
|
||||
box-shadow: var(--shadow-inset-sm) var(--shadow-raised);
|
||||
transition: background-color 0.2s ease-in-out,
|
||||
color 0.1s ease-in-out;
|
||||
color: var(--color-text-light);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
grid-gap: 0.5rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: var(--rounded-sm);
|
||||
box-shadow: var(--shadow-inset-sm) var(--shadow-raised);
|
||||
transition: background-color 0.2s ease-in-out, color 0.1s ease-in-out;
|
||||
color: var(--color-text-light);
|
||||
|
||||
&:hover, &.active {
|
||||
color: var(--color-text);
|
||||
}
|
||||
&:hover,
|
||||
&.active {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--nav-active-bg);
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
background-color: var(--nav-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@import 'components.postcss';
|
||||
|
||||
.theme-dark {
|
||||
--status-bg: hsl(216, 5%, 29%);
|
||||
--sidebar-bg: hsl(216, 10%, 3%);
|
||||
--nav-active-bg: hsl(217, 9%, 25%);
|
||||
--font-size-sm: 0.75rem;
|
||||
--color-bg: hsl(217, 9%, 18%);
|
||||
--color-brand: hsl(145, 75%, 45%);
|
||||
--color-brand-contrast: black;
|
||||
--sub-page-bg: hsl(220, 9%, 13%)
|
||||
}
|
||||
--status-bg: hsl(216, 5%, 29%);
|
||||
--sidebar-bg: hsl(216, 10%, 3%);
|
||||
--nav-active-bg: hsl(217, 9%, 25%);
|
||||
--font-size-sm: 0.75rem;
|
||||
--color-bg: hsl(217, 9%, 18%);
|
||||
--color-brand: hsl(145, 75%, 45%);
|
||||
--color-brand-contrast: black;
|
||||
--sub-page-bg: hsl(220, 9%, 13%);
|
||||
}
|
||||
|
||||
BIN
theseus_gui/static/fonts/InterBold.woff2
Normal file
BIN
theseus_gui/static/fonts/InterBold.woff2
Normal file
Binary file not shown.
BIN
theseus_gui/static/fonts/InterRegular.woff2
Normal file
BIN
theseus_gui/static/fonts/InterRegular.woff2
Normal file
Binary file not shown.
BIN
theseus_gui/static/fonts/InterSemiBold.woff2
Normal file
BIN
theseus_gui/static/fonts/InterSemiBold.woff2
Normal file
Binary file not shown.
@@ -1,31 +1,25 @@
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import path from "path";
|
||||
import { preprocess, plugins } from 'omorphia/config/svelte.config'
|
||||
import { preprocess } from 'omorphia/config/svelte';
|
||||
import path from 'path';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
preprocess,
|
||||
kit: {
|
||||
adapter: adapter({
|
||||
fallback: '200.html',
|
||||
}),
|
||||
vite: {
|
||||
plugins: [
|
||||
...plugins,
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
$assets: path.resolve('./src/assets'),
|
||||
$components: path.resolve('./src/components'),
|
||||
$layout: path.resolve('./src/layout'),
|
||||
$lib: path.resolve('./src/lib'),
|
||||
$stores: path.resolve('./src/stores'),
|
||||
$styles: path.resolve('./src/styles'),
|
||||
$generated: path.resolve('./src/generated'),
|
||||
},
|
||||
},
|
||||
}
|
||||
preprocess: [preprocess],
|
||||
kit: {
|
||||
adapter: adapter({
|
||||
fallback: '200.html'
|
||||
}),
|
||||
|
||||
alias: {
|
||||
$generated: path.resolve('./generated'),
|
||||
$stores: path.resolve('./src/stores'),
|
||||
$assets: path.resolve('./src/assets'),
|
||||
$components: path.resolve('./src/components'),
|
||||
$layout: path.resolve('./src/layout'),
|
||||
$lib: path.resolve('./src/lib'),
|
||||
$styles: path.resolve('./src/styles')
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
28
theseus_gui/vite.config.js
Normal file
28
theseus_gui/vite.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import path from 'path';
|
||||
import { plugins } from 'omorphia/config/vite';
|
||||
import precompileIntl from 'svelte-intl-precompile/sveltekit-plugin';
|
||||
import { Generator } from 'omorphia/plugins';
|
||||
|
||||
/** @type {import('vite').UserConfig} */
|
||||
const config = {
|
||||
plugins: [
|
||||
sveltekit(),
|
||||
...plugins,
|
||||
precompileIntl('locales'),
|
||||
Generator({
|
||||
gameVersions: true,
|
||||
openapi: true
|
||||
})
|
||||
],
|
||||
optimizeDeps: {
|
||||
include: ['highlight.js/lib/core']
|
||||
},
|
||||
server: {
|
||||
fs: {
|
||||
allow: ['generated']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user