You've already forked AstralRinth
forked from didirus/AstralRinth
Library page (#53)
* launcher base gui initial * Bootstraps router, Omorphia, and prettier. * Adds pages. Adds Vuex. SideBar nav contains user section and pages section. * Adds Instance markup. Instances added to Home page. * Adds News to home page. * Adds settings to nav. Other touches. * Polishing initial base GUI. * Moves some styling to assets. Changes px values to rem. * Removes pointless border-radius CSS. * Implements Omorphia vars. * Adds trending mods section. * Updates home page. * Swaps Vuex implementation for Pinia. * Fixes invalid CSS on instance list item hover. * Adds @ path resolve for imports. * Fix some styling of row display * Gridview on library page * Cleaning up styles and markup. * Fixes overall layout issues. * Cleans up more styling. Modifies AppBar coloring. * instance routing * Allows pagination arrows to conditionally appear in RowDisplay. * Adds paging behavior in RowDisplay. * Initial modlist layout * Updates nav and settings button styling. * Brings in Knossos style for trending mods. Polishes News CSS. * Page redesign * More tweaks * Base library pages * Remove errant css * Update play.svg * Addressed issues --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me> Co-authored-by: Zachary Baird <zdb1994@yahoo.com> Co-authored-by: Zach Baird <30800863+ZachBaird@users.noreply.github.com>
This commit is contained in:
@@ -32,33 +32,19 @@ watch(theme, (newState) => {
|
||||
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="navigation">
|
||||
<div class="nav-container">
|
||||
<section class="user-section">
|
||||
<Avatar size="sm" src="https://cdn.modrinth.com/data/AANobbMI/icon.png" />
|
||||
<section>
|
||||
<p class="username">OreoViking</p>
|
||||
<a href="#">Manage accounts</a>
|
||||
</section>
|
||||
</section>
|
||||
<div class="nav-container">
|
||||
<div class="nav-section">
|
||||
<Avatar size="sm" src="https://cdn.modrinth.com/data/AANobbMI/icon.png" />
|
||||
<div class="pages-list">
|
||||
<RouterLink to="/" class="btn"> <ClientIcon />Home</RouterLink>
|
||||
<RouterLink to="/browse" class="btn"> <SearchIcon />Browse</RouterLink>
|
||||
<RouterLink to="/library" class="btn"> <BookIcon />Library</RouterLink>
|
||||
</div>
|
||||
<div class="instance-list">
|
||||
<p>Instances</p>
|
||||
<Instance v-for="instance in instances.instances" display="list" :instance="instance" />
|
||||
</div>
|
||||
<Button class="add-instance-btn">
|
||||
<PlusIcon />
|
||||
Create Instance
|
||||
</Button>
|
||||
|
||||
<div class="settings">
|
||||
<RouterLink to="/settings" class="btn"><SettingsIcon /> Settings</RouterLink>
|
||||
<RouterLink to="/" class="button-base nav-button"><ClientIcon /></RouterLink>
|
||||
<RouterLink to="/browse" class="button-base nav-button"> <SearchIcon /></RouterLink>
|
||||
<RouterLink to="/library" class="button-base nav-button"> <BookIcon /></RouterLink>
|
||||
<button color="primary" class="button-base primary nav-button" icon-only><PlusIcon /></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings pages-list">
|
||||
<RouterLink to="/settings" class="button-base nav-button"><SettingsIcon /></RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view">
|
||||
<div class="appbar">
|
||||
@@ -72,34 +58,42 @@ watch(theme, (newState) => {
|
||||
<p>123 mods installed</p>
|
||||
</section>
|
||||
</div>
|
||||
<RouterView />
|
||||
<div class="router-view">
|
||||
<RouterView />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
min-width: 100%;
|
||||
min-height: 100vh;
|
||||
overflow-x: hidden;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow: hidden;
|
||||
|
||||
.navigation {
|
||||
position: fixed;
|
||||
.router-view {
|
||||
width: 100%;
|
||||
height: calc(100% - 2rem);
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.view {
|
||||
height: 100%;
|
||||
margin-left: 210px;
|
||||
|
||||
margin-left: 5rem;
|
||||
width: calc(100% - 5rem);
|
||||
height: calc(100%);
|
||||
.appbar {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
height: 2rem;
|
||||
width: calc(100% - 5rem);
|
||||
border-bottom: 1px solid rgba(64, 67, 74, 0.2);
|
||||
background: var(--color-button-bg);
|
||||
padding: 1.2rem;
|
||||
text-align: center;
|
||||
|
||||
.navigation-controls {
|
||||
display: inherit;
|
||||
@@ -149,12 +143,14 @@ watch(theme, (newState) => {
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 210px;
|
||||
height: 100vh;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
box-shadow: var(--shadow-inset-sm), var(--shadow-floating);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
@@ -162,28 +158,27 @@ watch(theme, (newState) => {
|
||||
background: var(--color-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.pages-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
gap: 0.5rem;
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
margin: 0.2rem auto;
|
||||
text-align: left;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
word-spacing: 3px;
|
||||
background: inherit;
|
||||
transition: all ease-in-out 0.1s;
|
||||
color: var(--color-primary);
|
||||
color: var(--color-base);
|
||||
|
||||
&.router-link-active {
|
||||
color: #000;
|
||||
color: var(--color-accent-contrast);
|
||||
background: var(--color-button-bg);
|
||||
}
|
||||
|
||||
@@ -193,12 +188,25 @@ watch(theme, (newState) => {
|
||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
margin-right: 1rem;
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
}
|
||||
.nav-button {
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
padding: .75rem;
|
||||
border-radius: var(--radius-md);
|
||||
|
||||
svg {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
max-width: 1.5rem;
|
||||
max-height: 1.5rem;
|
||||
}
|
||||
|
||||
&.primary {
|
||||
color: var(--color-accent-contrast);
|
||||
background-color: var(--color-brand);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,19 +254,12 @@ watch(theme, (newState) => {
|
||||
}
|
||||
|
||||
.settings {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: auto auto 0.5rem 1rem;
|
||||
width: 9.375rem;
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
background: inherit;
|
||||
color: var(--color-primary);
|
||||
|
||||
svg {
|
||||
margin-right: 0.9em;
|
||||
}
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
@@ -272,7 +273,6 @@ watch(theme, (newState) => {
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 4.375rem;
|
||||
margin-left: 3rem;
|
||||
|
||||
section {
|
||||
display: flex;
|
||||
@@ -296,4 +296,14 @@ watch(theme, (newState) => {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.nav-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
gap: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
4
theseus_gui/src/assets/icons/folder-open.svg
Normal file
4
theseus_gui/src/assets/icons/folder-open.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2"></path>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 389 B |
6
theseus_gui/src/assets/icons/folder-search.svg
Normal file
6
theseus_gui/src/assets/icons/folder-search.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M11 20H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H20a2 2 0 0 1 2 2v4"></path>
|
||||
<circle cx="17" cy="17" r="3"></circle>
|
||||
<path d="m21 21-1.5-1.5"></path>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 391 B |
3
theseus_gui/src/assets/icons/index.js
Normal file
3
theseus_gui/src/assets/icons/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default as PlayIcon } from './play.svg'
|
||||
export { default as OpenFolderIcon } from './folder-open.svg'
|
||||
export { default as BrowseIcon } from './folder-search.svg'
|
||||
4
theseus_gui/src/assets/icons/play.svg
Normal file
4
theseus_gui/src/assets/icons/play.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polygon points="5 3 19 12 5 21 5 3"></polygon>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 239 B |
132
theseus_gui/src/components/GridDisplay.vue
Normal file
132
theseus_gui/src/components/GridDisplay.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<script setup>
|
||||
import {ChevronLeftIcon, ChevronRightIcon} from 'omorphia'
|
||||
import Instance from '@/components/ui/Instance.vue'
|
||||
import News from '@/components/ui/News.vue'
|
||||
import {onMounted, onUnmounted, ref} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
instances: Array,
|
||||
news: Array,
|
||||
label: String,
|
||||
canPaginate: Boolean,
|
||||
})
|
||||
const allowPagination = ref(false)
|
||||
const modsRow = ref(null)
|
||||
const newsRow = ref(null)
|
||||
// Remove after state is populated with real data
|
||||
const shouldRenderNormalInstances = props.instances && props.instances?.length !== 0
|
||||
const shouldRenderNews = props.news && props.news?.length !== 0
|
||||
onUnmounted(() => {
|
||||
if (props.canPaginate) window.removeEventListener('resize', handlePaginationDisplay)
|
||||
})
|
||||
const handleLeftPage = () => {
|
||||
if (shouldRenderNormalInstances) modsRow.value.scrollLeft -= 170
|
||||
else if (shouldRenderNews) newsRow.value.scrollLeft -= 170
|
||||
}
|
||||
const handleRightPage = () => {
|
||||
if (shouldRenderNormalInstances) modsRow.value.scrollLeft += 170
|
||||
else if (shouldRenderNews) newsRow.value.scrollLeft += 170
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="header">
|
||||
<p>{{ props.label }}</p>
|
||||
<hr>
|
||||
<div v-if="allowPagination" class="pagination">
|
||||
<ChevronLeftIcon @click="handleLeftPage"/>
|
||||
<ChevronRightIcon @click="handleRightPage"/>
|
||||
</div>
|
||||
</div>
|
||||
<section ref="modsRow" class="instances">
|
||||
<Instance
|
||||
v-for="instance in props.instances"
|
||||
:key="instance.id"
|
||||
display="card"
|
||||
:instance="instance"
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: inherit;
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
gap: 1rem;
|
||||
|
||||
p {
|
||||
font-size: 1rem;
|
||||
white-space: nowrap;
|
||||
color: var(--color-contrast);
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: var(--color-gray);
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: inherit;
|
||||
align-items: inherit;
|
||||
|
||||
svg {
|
||||
background: var(--color-raised-bg);
|
||||
border-radius: var(--radius-lg);
|
||||
width: 1.3rem;
|
||||
height: 1.2rem;
|
||||
cursor: pointer;
|
||||
margin-right: 0.5rem;
|
||||
transition: all ease-in-out 0.1s;
|
||||
|
||||
&:hover {
|
||||
filter: brightness(150%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section {
|
||||
display: flex;
|
||||
align-items: inherit;
|
||||
transition: all ease-in-out 0.4s;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.instances {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
|
||||
width: 100%;
|
||||
gap: 1rem;
|
||||
margin-right: auto;
|
||||
margin-top: 0.8rem;
|
||||
scroll-behavior: smooth;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 0px;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.row {
|
||||
&:nth-child(odd) {
|
||||
background-color: rgb(30, 31, 34);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup>
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from 'omorphia'
|
||||
import {ChevronLeftIcon, ChevronRightIcon} from 'omorphia'
|
||||
import Instance from '@/components/ui/Instance.vue'
|
||||
import News from '@/components/ui/News.vue'
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
import {onMounted, onUnmounted, ref} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
instances: Array,
|
||||
@@ -10,76 +10,64 @@ const props = defineProps({
|
||||
label: String,
|
||||
canPaginate: Boolean,
|
||||
})
|
||||
|
||||
const allowPagination = ref(false)
|
||||
const modsRow = ref(null)
|
||||
const newsRow = ref(null)
|
||||
|
||||
// Remove after state is populated with real data
|
||||
const shouldRenderNormalInstances = props.instances && props.instances?.length !== 0
|
||||
const shouldRenderNews = props.news && props.news?.length !== 0
|
||||
|
||||
const handlePaginationDisplay = () => {
|
||||
let parentsRow
|
||||
if (shouldRenderNormalInstances) parentsRow = modsRow.value
|
||||
if (shouldRenderNews) parentsRow = newsRow.value
|
||||
|
||||
if (!parentsRow) return
|
||||
|
||||
const children = parentsRow.children
|
||||
const lastChild = children[children.length - 1]
|
||||
const childBox = lastChild.getBoundingClientRect()
|
||||
|
||||
if (childBox.x + childBox.width > window.innerWidth) allowPagination.value = true
|
||||
else allowPagination.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.canPaginate) window.addEventListener('resize', handlePaginationDisplay)
|
||||
|
||||
// Check if pagination should be rendered on mount
|
||||
handlePaginationDisplay()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
if (props.canPaginate) window.removeEventListener('resize', handlePaginationDisplay)
|
||||
})
|
||||
|
||||
const handleLeftPage = () => {
|
||||
if (shouldRenderNormalInstances) modsRow.value.scrollLeft -= 170
|
||||
else if (shouldRenderNews) newsRow.value.scrollLeft -= 170
|
||||
}
|
||||
|
||||
const handleRightPage = () => {
|
||||
if (shouldRenderNormalInstances) modsRow.value.scrollLeft += 170
|
||||
else if (shouldRenderNews) newsRow.value.scrollLeft += 170
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="header">
|
||||
<p>{{ props.label }}</p>
|
||||
<hr aria-hidden="true" />
|
||||
<hr aria-hidden="true"/>
|
||||
<div v-if="allowPagination" class="pagination">
|
||||
<ChevronLeftIcon @click="handleLeftPage" />
|
||||
<ChevronRightIcon @click="handleRightPage" />
|
||||
<ChevronLeftIcon @click="handleLeftPage"/>
|
||||
<ChevronRightIcon @click="handleRightPage"/>
|
||||
</div>
|
||||
</div>
|
||||
<section ref="modsRow" class="instances" v-if="shouldRenderNormalInstances">
|
||||
<Instance
|
||||
v-for="instance in props.instances"
|
||||
:key="instance.id"
|
||||
display="card"
|
||||
:instance="instance"
|
||||
v-for="instance in props.instances"
|
||||
:key="instance.id"
|
||||
display="card"
|
||||
:instance="instance"
|
||||
class="row-instance"
|
||||
/>
|
||||
</section>
|
||||
<section ref="newsRow" class="news" v-else-if="shouldRenderNews">
|
||||
<News v-for="news in props.news" :key="news.id" :news="news" />
|
||||
<News v-for="news in props.news" :key="news.id" :news="news"/>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.row {
|
||||
display: flex;
|
||||
@@ -161,7 +149,6 @@ const handleRightPage = () => {
|
||||
margin-right: auto;
|
||||
margin-top: 0.8rem;
|
||||
scroll-behavior: smooth;
|
||||
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
|
||||
@@ -179,4 +166,9 @@ const handleRightPage = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.row-instance {
|
||||
min-width: 12rem;
|
||||
max-width: 12rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { RouterLink } from 'vue-router'
|
||||
import { Card, PlusIcon } from 'omorphia'
|
||||
|
||||
import { Card } from 'omorphia'
|
||||
import { PlayIcon } from '@/assets/icons'
|
||||
const props = defineProps({
|
||||
display: String,
|
||||
instance: Object,
|
||||
@@ -10,16 +10,16 @@ const props = defineProps({
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<RouterLink v-if="display === 'list'" class="instance-list-item" :to="`${props.instance.id}`">{{
|
||||
props.instance.name
|
||||
}}</RouterLink>
|
||||
<Card class="instance-card-item" v-else-if="display === 'card'">
|
||||
<RouterLink v-if="display === 'list'" class="instance-list-item" :to="`/instance/${props.instance.id}`">{{
|
||||
props.instance.name
|
||||
}}</RouterLink>
|
||||
<Card class="instance-card-item" v-else-if="display === 'card'" @click="this.$router.push(`/instance/${props.instance.id}`)">
|
||||
<img :src="props.instance.img" alt="Trending mod card" />
|
||||
<div class="project-info">
|
||||
<p class="title">{{ props.instance.name }}</p>
|
||||
<p class="description">{{ props.instance.version }}</p>
|
||||
</div>
|
||||
<div class="cta"><PlusIcon /></div>
|
||||
<div class="cta"><PlayIcon /></div>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -32,32 +32,26 @@ const props = defineProps({
|
||||
transition: all ease-out 0.1s;
|
||||
font-size: 0.8rem;
|
||||
color: var(--color-primary);
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
filter: brightness(150%);
|
||||
}
|
||||
}
|
||||
|
||||
.instance-card-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
width: 180px;
|
||||
padding: 0.75rem;
|
||||
transition: 0.1s ease-in-out all;
|
||||
|
||||
&:hover {
|
||||
filter: brightness(0.85);
|
||||
|
||||
.cta {
|
||||
opacity: 1;
|
||||
bottom: 4.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.cta {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
@@ -72,27 +66,24 @@ const props = defineProps({
|
||||
opacity: 0;
|
||||
transition: 0.3s ease-in-out bottom, 0.1s ease-in-out opacity;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
filter: brightness(0.75);
|
||||
box-shadow: var(--shadow-floating);
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 160px;
|
||||
width: 100%;
|
||||
border-radius: var(--radius-sm);
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
.project-info {
|
||||
margin-top: 1rem;
|
||||
width: 100%;
|
||||
|
||||
.title {
|
||||
color: var(--color-contrast);
|
||||
max-width: 6rem;
|
||||
@@ -105,7 +96,6 @@ const props = defineProps({
|
||||
line-height: 110%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.description {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
@@ -118,10 +108,9 @@ const props = defineProps({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark-mode {
|
||||
.cta > svg {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup>
|
||||
import { Card, ChevronRightIcon } from 'omorphia'
|
||||
|
||||
const props = defineProps({
|
||||
news: Object,
|
||||
})
|
||||
@@ -33,59 +32,49 @@ const props = defineProps({
|
||||
box-shadow: var(--shadow-raised-lg);
|
||||
cursor: pointer;
|
||||
transition: all ease-in-out 0.1s;
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--shadow-floating);
|
||||
filter: brightness(0.85);
|
||||
}
|
||||
|
||||
img {
|
||||
display: flex;
|
||||
width: 8.4375rem; /* from wireframe */
|
||||
height: 8.5rem; /* from wireframe */
|
||||
border-radius: 0.9rem 0 0 0.9rem;
|
||||
}
|
||||
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 8.5rem; /* from wireframe */
|
||||
padding: 0.45rem;
|
||||
|
||||
.headline {
|
||||
display: inherit;
|
||||
flex-direction: inherit;
|
||||
margin: 0.4rem 0;
|
||||
width: 100%;
|
||||
|
||||
h2 {
|
||||
font-size: 1rem;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
}
|
||||
|
||||
.underline {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin-top: auto;
|
||||
|
||||
p {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
a {
|
||||
transition: all ease-in-out 0.2s;
|
||||
width: 1.5rem;
|
||||
color: var(--color-primary);
|
||||
font-size: 1.3rem;
|
||||
|
||||
&:hover {
|
||||
transform: translate(1px);
|
||||
filter: brightness(150%);
|
||||
@@ -94,4 +83,4 @@ const props = defineProps({
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
7
theseus_gui/src/pages/AddInstance.vue
Normal file
7
theseus_gui/src/pages/AddInstance.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script setup></script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>Add Instance</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,7 +1,14 @@
|
||||
<script setup></script>
|
||||
<script setup>
|
||||
import { useInstances } from '@/store/state'
|
||||
import GridDisplay from '@/components/GridDisplay.vue'
|
||||
|
||||
const instances = useInstances()
|
||||
instances.fetchInstances()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>Library</p>
|
||||
<GridDisplay label="Instances" :instances="instances.instances" />
|
||||
<GridDisplay label="Modpacks" :instances="instances.instances" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
269
theseus_gui/src/pages/instance/Index.vue
Normal file
269
theseus_gui/src/pages/instance/Index.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<template>
|
||||
<div class="instance-container">
|
||||
<div class="side-cards">
|
||||
<Card class="instance-card">
|
||||
<Avatar size="lg" :src="getInstance(instances).img"/>
|
||||
<div class="instance-info">
|
||||
<h2 class="name">{{getInstance(instances).name}}</h2>
|
||||
Fabric {{ getInstance(instances).version }}
|
||||
</div>
|
||||
<span class="button-group">
|
||||
<Button color="primary" class="instance-button">
|
||||
<PlayIcon />
|
||||
Play
|
||||
</Button>
|
||||
<Button class="instance-button" icon-only>
|
||||
<OpenFolderIcon />
|
||||
</Button>
|
||||
</span>
|
||||
</Card>
|
||||
<div class="pages-list">
|
||||
<RouterLink :to="`/instance/${this.$route.params.id}/`" class="btn">
|
||||
<BoxIcon/>
|
||||
Mods
|
||||
</RouterLink>
|
||||
<RouterLink :to="`/instance/${this.$route.params.id}/options`" class="btn">
|
||||
<SettingsIcon/>
|
||||
Options
|
||||
</RouterLink>
|
||||
<RouterLink :to="`/instance/${this.$route.params.id}/logs`" class="btn">
|
||||
<FileIcon/>
|
||||
Logs
|
||||
</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Promotion />
|
||||
<router-view/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {BoxIcon, SettingsIcon, FileIcon, Button, Avatar, Card, Promotion} from 'omorphia'
|
||||
import {PlayIcon, OpenFolderIcon} from "@/assets/icons";
|
||||
import {useInstances} from '@/store/state'
|
||||
|
||||
const instances = useInstances();
|
||||
instances.fetchInstances();
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
getInstance(instances) {
|
||||
return instances.instances.find((i) => i.id === parseInt(this.$route.params.id));
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.instance-card {
|
||||
background: var(--color-bg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
Button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.side-cards {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
background: var(--color-raised-bg);
|
||||
min-height: calc(100% - 2rem);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.instance-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
gap: 0.5rem;
|
||||
background: var(--color-raised-bg);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 1.25rem;
|
||||
color: var(--color-contrast);
|
||||
}
|
||||
|
||||
.instance-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow: auto;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-left: 18rem;
|
||||
}
|
||||
|
||||
.instance-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
width: fit-content;
|
||||
color: var(--color-orange);
|
||||
}
|
||||
|
||||
.pages-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
|
||||
a {
|
||||
font-size: 100%;
|
||||
font-weight: 400;
|
||||
background: inherit;
|
||||
transition: all ease-in-out 0.1s;
|
||||
width: 100%;
|
||||
color: var(--color-primary);
|
||||
padding: var(--gap-md);
|
||||
|
||||
&.router-link-exact-active {
|
||||
background: var(--color-button-bg);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-button-bg);
|
||||
color: var(--color-contrast);
|
||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 1.3rem;
|
||||
height: 1.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header-nav {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding: 0.5rem;
|
||||
gap: 0.5rem;
|
||||
background: var(--color-raised-bg);
|
||||
}
|
||||
|
||||
.project-card {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
background: var(--color-raised-bg);
|
||||
width: 20rem;
|
||||
}
|
||||
|
||||
.instance-nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: left;
|
||||
padding: 1rem;
|
||||
gap: 0.5rem;
|
||||
background: var(--color-raised-bg);
|
||||
height: min-content;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.instance-button {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem 1rem 0 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.stats {
|
||||
grid-area: stats;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--gap-md);
|
||||
|
||||
.stat {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
gap: var(--gap-xs);
|
||||
--stat-strong-size: 1.25rem;
|
||||
|
||||
strong {
|
||||
font-size: var(--stat-strong-size);
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
svg {
|
||||
height: var(--stat-strong-size);
|
||||
width: var(--stat-strong-size);
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 750px) {
|
||||
flex-direction: row;
|
||||
column-gap: var(--gap-md);
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
margin-top: 0;
|
||||
|
||||
.stat-label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-divider {
|
||||
background-color: var(--color-button-bg);
|
||||
border: none;
|
||||
color: var(--color-button-bg);
|
||||
height: 1px;
|
||||
margin: var(--gap-xl) 0;
|
||||
}
|
||||
</style>
|
||||
121
theseus_gui/src/pages/instance/Logs.vue
Normal file
121
theseus_gui/src/pages/instance/Logs.vue
Normal file
@@ -0,0 +1,121 @@
|
||||
<template>
|
||||
<Card class="log-card">
|
||||
<div class="button-row">
|
||||
<DropdownSelect :options="['logs/latest.log']" />
|
||||
<div class="button-group">
|
||||
<Button>
|
||||
<ClipboardCopyIcon/>
|
||||
Copy
|
||||
</Button>
|
||||
<Button color="primary">
|
||||
<SendIcon/>
|
||||
Share
|
||||
</Button>
|
||||
<Button color="danger">
|
||||
<TrashIcon/>
|
||||
Delete
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-text">
|
||||
<div v-for="line in fileContents.value.split('\n')"> {{ line }} </div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Card, Button, TrashIcon, SendIcon, ClipboardCopyIcon, DropdownSelect } from 'omorphia'
|
||||
</script>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileContents: {
|
||||
value: "'ServerLevel[New World]'/minecraft:the_end\n" +
|
||||
"[22:13:02] [Server thread/INFO]: venashial lost connection: Disconnected\n" +
|
||||
"[22:13:02] [Server thread/INFO]: venashial left the game\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Stopping singleplayer server as player logged out\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Stopping server\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving players\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving worlds\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld\n" +
|
||||
"[22:13:05] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether\n" +
|
||||
"[22:13:05] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (New World): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved\n" +
|
||||
"[22:13:06] [Render thread/INFO]: Stopping worker threads\n" +
|
||||
"[22:13:07] [Render thread/INFO]: Stopping!\n" +
|
||||
"[22:13:07] [CraftPresence-ShutDown-Handler/INFO]: Shutting down CraftPresence...\n" +
|
||||
"'ServerLevel[New World]'/minecraft:the_end\n" +
|
||||
"[22:13:02] [Server thread/INFO]: venashial lost connection: Disconnected\n" +
|
||||
"[22:13:02] [Server thread/INFO]: venashial left the game\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Stopping singleplayer server as player logged out\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Stopping server\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving players\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving worlds\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld\n" +
|
||||
"[22:13:05] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether\n" +
|
||||
"[22:13:05] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (New World): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved\n" +
|
||||
"[22:13:06] [Render thread/INFO]: Stopping worker threads\n" +
|
||||
"[22:13:07] [Render thread/INFO]: Stopping!\n" +
|
||||
"[22:13:07] [CraftPresence-ShutDown-Handler/INFO]: Shutting down CraftPresence...\n" +
|
||||
"'ServerLevel[New World]'/minecraft:the_end\n" +
|
||||
"[22:13:02] [Server thread/INFO]: venashial lost connection: Disconnected\n" +
|
||||
"[22:13:02] [Server thread/INFO]: venashial left the game\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Stopping singleplayer server as player logged out\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Stopping server\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving players\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving worlds\n" +
|
||||
"[22:13:02] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld\n" +
|
||||
"[22:13:05] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether\n" +
|
||||
"[22:13:05] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (New World): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved\n" +
|
||||
"[22:13:05] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved\n" +
|
||||
"[22:13:06] [Render thread/INFO]: Stopping worker threads\n" +
|
||||
"[22:13:07] [Render thread/INFO]: Stopping!\n" +
|
||||
"[22:13:07] [CraftPresence-ShutDown-Handler/INFO]: Shutting down CraftPresence..."
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.log-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
.button-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.log-text {
|
||||
width: 100%;
|
||||
aspect-ratio: 2/1;
|
||||
font-family: var(--mono-font);
|
||||
background-color: var(--color-accent-contrast);
|
||||
color: var(--color-contrast);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 1.5rem;
|
||||
overflow: auto;
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
247
theseus_gui/src/pages/instance/Mods.vue
Normal file
247
theseus_gui/src/pages/instance/Mods.vue
Normal file
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<Card class="mod-card">
|
||||
<div class="card-row">
|
||||
<div class="iconified-input">
|
||||
<SearchIcon/>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search Mods"
|
||||
v-model="searchFilter"
|
||||
/>
|
||||
</div>
|
||||
<span class="manage">
|
||||
<span class="text-combo">
|
||||
Sort By
|
||||
<DropdownSelect :options="['Name', 'Version', 'Author']" v-model="sortFilter" default-value="Name" class="dropdown"/>
|
||||
</span>
|
||||
<Button color="primary">
|
||||
<PlusIcon />
|
||||
Add Mods
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<div class="table-row table-head">
|
||||
<div class="table-cell table-text">
|
||||
<Button color="success" iconOnly>
|
||||
<UpdatedIcon />
|
||||
</Button>
|
||||
</div>
|
||||
<div class="table-cell table-text name-cell"> Name </div>
|
||||
<div class="table-cell table-text"> Version </div>
|
||||
<div class="table-cell table-text"> Author </div>
|
||||
<div class="table-cell table-text"> Actions </div>
|
||||
</div>
|
||||
<div class="table-row" v-for="mod in search" :key="mod.name">
|
||||
<div class="table-cell table-text">
|
||||
<Button v-if="mod.outdated" iconOnly>
|
||||
<UpdatedIcon />
|
||||
</Button>
|
||||
<Button v-else disabled iconOnly>
|
||||
<CheckCircleIcon/>
|
||||
</Button>
|
||||
</div>
|
||||
<div class="table-cell table-text name-cell">
|
||||
<span class="mod-text">
|
||||
<Avatar :src="mod.icon"/>
|
||||
{{ mod.name }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="table-cell table-text"> {{ mod.version }} </div>
|
||||
<div class="table-cell table-text"> {{ mod.author }} </div>
|
||||
<div class="table-cell table-text manage">
|
||||
<Button iconOnly>
|
||||
<TrashIcon />
|
||||
</Button>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="switch stylized-toggle"
|
||||
id="switch-1"
|
||||
checked
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Mods",
|
||||
data() {
|
||||
return {
|
||||
searchFilter: "",
|
||||
sortFilter: "",
|
||||
mods: [
|
||||
{
|
||||
name: "Fabric API",
|
||||
icon: "https://cdn.modrinth.com/data/P7dR8mSH/icon.png",
|
||||
version: "0.76.0+1.19.4",
|
||||
author: "modmuss50",
|
||||
description: "Lightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.",
|
||||
outdated: true
|
||||
},
|
||||
{
|
||||
name: "Spirit",
|
||||
icon: "https://cdn.modrinth.com/data/b1LdOZlE/465598dc5d89f67fb8f8de6def21240fa35e3a54.png",
|
||||
version: "2.2.4",
|
||||
author: "CodexAdrian",
|
||||
description: "Create your own configurable mob spawner!",
|
||||
outdated: true
|
||||
},
|
||||
{
|
||||
name: "Botarium",
|
||||
icon: "https://cdn.modrinth.com/data/2u6LRnMa/98b286b0d541ad4f9409e0af3df82ad09403f179.gif",
|
||||
version: "2.0.5",
|
||||
author: "CodexAdrian",
|
||||
description: "A crossplatform API for devs that makes transfer and storage of items, fluids and energy easier, as well as some other helpful things",
|
||||
outdated: true
|
||||
},
|
||||
{
|
||||
name: "Tempad",
|
||||
icon: "https://cdn.modrinth.com/data/gKNwt7xu/icon.gif",
|
||||
version: "2.2.4",
|
||||
author: "CodexAdrian",
|
||||
description: "Create a portal to anywhere from anywhere",
|
||||
outdated: false
|
||||
},
|
||||
{
|
||||
name: "Sodium",
|
||||
icon: "https://cdn.modrinth.com/data/AANobbMI/icon.png",
|
||||
version: "0.4.10",
|
||||
author: "jellysquid3",
|
||||
description: "Modern rendering engine and client-side optimization mod for Minecraft",
|
||||
outdated: false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateSort(projects, sort) {
|
||||
switch (sort) {
|
||||
case 'Version':
|
||||
return projects.slice().sort((a, b) => {
|
||||
if (a.version < b.version) {
|
||||
return -1
|
||||
}
|
||||
if (a.version > b.version) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
case 'Author':
|
||||
return projects.slice().sort((a, b) => {
|
||||
if (a.author < b.author) {
|
||||
return -1
|
||||
}
|
||||
if (a.author > b.author) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
default:
|
||||
return projects.slice().sort((a, b) => {
|
||||
if (a.name < b.name) {
|
||||
return -1
|
||||
}
|
||||
if (a.name > b.name) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
search() {
|
||||
const filtered = this.mods.filter((mod) => {
|
||||
return mod.name.toLowerCase().includes(this.searchFilter.toLowerCase())
|
||||
})
|
||||
|
||||
return this.updateSort(filtered, this.sortFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script setup>
|
||||
import { Avatar, Button, TrashIcon, PlusIcon, Card, CheckCircleIcon, SearchIcon, UpdatedIcon, DropdownSelect } from 'omorphia'
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.table-container {
|
||||
display: grid;
|
||||
grid-template-rows: repeat(auto-fill, auto);
|
||||
width: 100%;
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: grid;
|
||||
grid-template-columns: min-content 2fr 1fr 1fr 8rem;
|
||||
}
|
||||
|
||||
.table-head {
|
||||
.table-cell {
|
||||
background-color: var(--color-accent-contrast);
|
||||
}
|
||||
}
|
||||
|
||||
.table-cell {
|
||||
padding: 1rem;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
vertical-align: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table-text {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: fade;
|
||||
}
|
||||
|
||||
.manage {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.mod-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
color: var(--color-contrast);
|
||||
}
|
||||
|
||||
.table-row:nth-child(even) .table-cell {
|
||||
background-color: var(--color-bg);
|
||||
}
|
||||
|
||||
.card-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: var(--color-raised-bg);
|
||||
}
|
||||
|
||||
.mod-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.text-combo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.name-cell {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
width: 7rem !important;
|
||||
}
|
||||
</style>
|
||||
230
theseus_gui/src/pages/instance/Options.vue
Normal file
230
theseus_gui/src/pages/instance/Options.vue
Normal file
@@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<Card class="settings-card">
|
||||
<h2 class="settings-title"> Java </h2>
|
||||
<div class="settings-group">
|
||||
<h3>Installation</h3>
|
||||
<input
|
||||
type="text"
|
||||
class="input installation-input"
|
||||
placeholder="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"
|
||||
ref="javaPath"
|
||||
v-model="javaPath"
|
||||
/>
|
||||
<span class="installation-buttons">
|
||||
<Button @click="saveJavaPath">
|
||||
<SearchIcon/>
|
||||
Auto Detect
|
||||
</Button>
|
||||
<Button @click="saveJavaPath">
|
||||
<BrowseIcon/>
|
||||
Browse
|
||||
</Button>
|
||||
<Button @click="saveJavaPath">
|
||||
<PlayIcon/>
|
||||
Test
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
<hr class="card-divider">
|
||||
<div class="settings-group">
|
||||
<h3>Arguments</h3>
|
||||
<input
|
||||
type="text"
|
||||
class="input installation-input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
</div>
|
||||
<hr class="card-divider">
|
||||
<div class="settings-group">
|
||||
<div class="sliders">
|
||||
<span class="slider">
|
||||
Minimum Memory
|
||||
<Slider
|
||||
v-model="javaMemory"
|
||||
:min="1024"
|
||||
:max="8192"
|
||||
:step="1024"
|
||||
/>
|
||||
</span>
|
||||
<span class="slider">
|
||||
Maximum Memory
|
||||
<Slider
|
||||
v-model="javaMemory"
|
||||
:min="1024"
|
||||
:max="8192"
|
||||
:step="1024"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card class="settings-card">
|
||||
<h2 class="settings-title"> Window </h2>
|
||||
<div class="settings-group">
|
||||
<div class="settings-group">
|
||||
<div class="sliders">
|
||||
<span class="slider">
|
||||
Width
|
||||
<Slider
|
||||
v-model="javaMemory"
|
||||
:min="1024"
|
||||
:max="8192"
|
||||
:step="1024"
|
||||
/>
|
||||
</span>
|
||||
<span class="slider">
|
||||
Height
|
||||
<Slider
|
||||
v-model="javaMemory"
|
||||
:min="1024"
|
||||
:max="8192"
|
||||
:step="1024"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Start in Fullscreen
|
||||
<input
|
||||
type="checkbox"
|
||||
id="fullscreen"
|
||||
name="fullscreen"
|
||||
v-model="fullscreen"
|
||||
class="switch stylized-toggle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="card-divider">
|
||||
<div class="settings-group">
|
||||
<h3>Console</h3>
|
||||
<div class="toggle-setting">
|
||||
Show console while game is running
|
||||
<input
|
||||
type="checkbox"
|
||||
id="fullscreen"
|
||||
name="fullscreen"
|
||||
v-model="fullscreen"
|
||||
class="switch stylized-toggle"
|
||||
/>
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Close console when game quits
|
||||
<input
|
||||
type="checkbox"
|
||||
id="fullscreen"
|
||||
name="fullscreen"
|
||||
v-model="fullscreen"
|
||||
class="switch stylized-toggle"
|
||||
/>
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Show console when game crashes
|
||||
<input
|
||||
type="checkbox"
|
||||
id="fullscreen"
|
||||
name="fullscreen"
|
||||
v-model="fullscreen"
|
||||
class="switch stylized-toggle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card class="settings-card">
|
||||
<h2 class="settings-title"> Commands </h2>
|
||||
<div class="settings-group">
|
||||
<div class="toggle-setting">
|
||||
Pre Launch
|
||||
<input
|
||||
type="text"
|
||||
class="input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Wrapper
|
||||
<input
|
||||
type="text"
|
||||
class="input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Post Launch
|
||||
<input
|
||||
type="text"
|
||||
class="input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {Card, Button, SearchIcon, Slider } from 'omorphia'
|
||||
import {BrowseIcon, PlayIcon} from "@/assets/icons";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.settings-title {
|
||||
color: var(--color-contrast)
|
||||
}
|
||||
|
||||
.settings-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.installation-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.installation-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
|
||||
.sliders {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
|
||||
.slider {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.toggle-setting {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.card-divider {
|
||||
background-color: var(--color-button-bg);
|
||||
border: none;
|
||||
color: var(--color-button-bg);
|
||||
height: 1px;
|
||||
margin: var(--gap-sm) 0;
|
||||
}
|
||||
</style>
|
||||
6
theseus_gui/src/pages/instance/index.js
Normal file
6
theseus_gui/src/pages/instance/index.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import Index from './Index.vue'
|
||||
import Mods from "./Mods.vue";
|
||||
import Options from "./Options.vue";
|
||||
import Logs from "./Logs.vue";
|
||||
|
||||
export { Index, Mods, Options, Logs }
|
||||
@@ -1,14 +0,0 @@
|
||||
<script setup>
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
console.log(route.path)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
AAAAAH
|
||||
{{ route.params.name }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import * as Pages from '@/pages'
|
||||
import * as Instance from '@/pages/instance'
|
||||
|
||||
/**
|
||||
* Configures application routing. Add page to pages/index and then add to route table here.
|
||||
@@ -22,6 +23,11 @@ export default new createRouter({
|
||||
name: 'Library',
|
||||
component: Pages.Library,
|
||||
},
|
||||
{
|
||||
path: '/add-instance',
|
||||
name: 'Add Instance',
|
||||
component: Pages.AddInstance,
|
||||
},
|
||||
{
|
||||
path: '/project',
|
||||
name: 'Project',
|
||||
@@ -32,6 +38,29 @@ export default new createRouter({
|
||||
name: 'Settings',
|
||||
component: Pages.Settings,
|
||||
},
|
||||
{
|
||||
path: '/instance/:id',
|
||||
name: 'Instance',
|
||||
component: Instance.Index,
|
||||
props: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'Mods',
|
||||
component: Instance.Mods,
|
||||
},
|
||||
{
|
||||
path: 'options',
|
||||
name: 'Options',
|
||||
component: Instance.Options,
|
||||
},
|
||||
{
|
||||
path: 'logs',
|
||||
name: 'Logs',
|
||||
component: Instance.Logs,
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
linkActiveClass: 'router-link-active',
|
||||
linkExactActiveClass: 'router-link-exact-active',
|
||||
|
||||
Reference in New Issue
Block a user