You've already forked AstralRinth
forked from didirus/AstralRinth
Fix lint (again)
This commit is contained in:
@@ -9,12 +9,10 @@ import {
|
||||
ClientIcon,
|
||||
PlusIcon,
|
||||
SettingsIcon,
|
||||
Button,
|
||||
Avatar,
|
||||
} from 'omorphia'
|
||||
import { useTheming, useInstances } from '@/store/state'
|
||||
import { toggleTheme } from '@/helpers/theme'
|
||||
import Instance from '@/components/ui/Instance.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -39,7 +37,9 @@ watch(theme, (newState) => {
|
||||
<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>
|
||||
<button color="primary" class="button-base primary nav-button" icon-only>
|
||||
<PlusIcon />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings pages-list">
|
||||
@@ -194,7 +194,7 @@ watch(theme, (newState) => {
|
||||
.nav-button {
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
padding: .75rem;
|
||||
padding: 0.75rem;
|
||||
border-radius: var(--radius-md);
|
||||
|
||||
svg {
|
||||
|
||||
@@ -1,3 +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'
|
||||
export { default as BrowseIcon } from './folder-search.svg'
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
<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 { ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
instances: Array,
|
||||
news: Array,
|
||||
label: String,
|
||||
instances: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
},
|
||||
},
|
||||
news: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
},
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
canPaginate: Boolean,
|
||||
})
|
||||
const allowPagination = ref(false)
|
||||
@@ -16,9 +28,6 @@ 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
|
||||
@@ -32,10 +41,10 @@ const handleRightPage = () => {
|
||||
<div class="row">
|
||||
<div class="header">
|
||||
<p>{{ props.label }}</p>
|
||||
<hr>
|
||||
<hr />
|
||||
<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">
|
||||
@@ -129,4 +138,4 @@ const handleRightPage = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</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: {
|
||||
@@ -61,23 +61,23 @@ const handleRightPage = () => {
|
||||
<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 v-if="shouldRenderNormalInstances" ref="modsRow" class="instances">
|
||||
<Instance
|
||||
v-for="instance in props.instances"
|
||||
:key="instance.id"
|
||||
display="card"
|
||||
:instance="instance"
|
||||
class="row-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"/>
|
||||
<section v-else-if="shouldRenderNews" ref="newsRow" class="news">
|
||||
<News v-for="actualNews in props.news" :key="actualNews.id" :news="actualNews" />
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
@@ -184,4 +184,4 @@ const handleRightPage = () => {
|
||||
min-width: 12rem;
|
||||
max-width: 12rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -18,10 +18,17 @@ const props = defineProps({
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<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}`)">
|
||||
<RouterLink
|
||||
v-if="display === 'list'"
|
||||
class="instance-list-item"
|
||||
:to="`/instance/${props.instance.id}`"
|
||||
>{{ props.instance.name }}</RouterLink
|
||||
>
|
||||
<Card
|
||||
v-else-if="display === 'card'"
|
||||
class="instance-card-item"
|
||||
@click="$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>
|
||||
@@ -121,4 +128,4 @@ const props = defineProps({
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -88,4 +88,4 @@ const props = defineProps({
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div class="instance-container">
|
||||
<div class="side-cards">
|
||||
<Card class="instance-card">
|
||||
<Avatar size="lg" :src="getInstance(instances).img"/>
|
||||
<Avatar size="lg" :src="getInstance(instances).img" />
|
||||
<div class="instance-info">
|
||||
<h2 class="name">{{getInstance(instances).name}}</h2>
|
||||
<h2 class="name">{{ getInstance(instances).name }}</h2>
|
||||
Fabric {{ getInstance(instances).version }}
|
||||
</div>
|
||||
<span class="button-group">
|
||||
@@ -18,40 +18,40 @@
|
||||
</span>
|
||||
</Card>
|
||||
<div class="pages-list">
|
||||
<RouterLink :to="`/instance/${this.$route.params.id}/`" class="btn">
|
||||
<BoxIcon/>
|
||||
<RouterLink :to="`/instance/${$route.params.id}/`" class="btn">
|
||||
<BoxIcon />
|
||||
Mods
|
||||
</RouterLink>
|
||||
<RouterLink :to="`/instance/${this.$route.params.id}/options`" class="btn">
|
||||
<SettingsIcon/>
|
||||
<RouterLink :to="`/instance/${$route.params.id}/options`" class="btn">
|
||||
<SettingsIcon />
|
||||
Options
|
||||
</RouterLink>
|
||||
<RouterLink :to="`/instance/${this.$route.params.id}/logs`" class="btn">
|
||||
<FileIcon/>
|
||||
<RouterLink :to="`/instance/${$route.params.id}/logs`" class="btn">
|
||||
<FileIcon />
|
||||
Logs
|
||||
</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Promotion />
|
||||
<router-view/>
|
||||
<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'
|
||||
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();
|
||||
const instances = useInstances()
|
||||
instances.fetchInstances()
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
getInstance(instances) {
|
||||
return instances.instances.find((i) => i.id === parseInt(this.$route.params.id));
|
||||
}
|
||||
return instances.instances.find((i) => i.id === parseInt(this.$route.params.id))
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -266,4 +266,4 @@ Button {
|
||||
height: 1px;
|
||||
margin: var(--gap-xl) 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
<DropdownSelect :options="['logs/latest.log']" />
|
||||
<div class="button-group">
|
||||
<Button>
|
||||
<ClipboardCopyIcon/>
|
||||
<ClipboardCopyIcon />
|
||||
Copy
|
||||
</Button>
|
||||
<Button color="primary">
|
||||
<SendIcon/>
|
||||
<SendIcon />
|
||||
Share
|
||||
</Button>
|
||||
<Button color="danger">
|
||||
<TrashIcon/>
|
||||
<TrashIcon />
|
||||
Delete
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-text">
|
||||
<div v-for="line in fileContents.value.split('\n')"> {{ line }} </div>
|
||||
<div v-for="(line, index) in fileContents.value.split('\n')" :key="index">{{ line }}</div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
@@ -27,66 +27,66 @@
|
||||
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..."
|
||||
}
|
||||
};
|
||||
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">
|
||||
@@ -118,4 +118,4 @@ import { Card, Button, TrashIcon, SendIcon, ClipboardCopyIcon, DropdownSelect }
|
||||
overflow: auto;
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -2,63 +2,59 @@
|
||||
<Card class="mod-card">
|
||||
<div class="card-row">
|
||||
<div class="iconified-input">
|
||||
<SearchIcon/>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search Mods"
|
||||
v-model="searchFilter"
|
||||
/>
|
||||
<SearchIcon />
|
||||
<input v-model="searchFilter" type="text" placeholder="Search Mods" />
|
||||
</div>
|
||||
<span class="manage">
|
||||
<span class="text-combo">
|
||||
Sort By
|
||||
<DropdownSelect :options="['Name', 'Version', 'Author']" v-model="sortFilter" default-value="Name" class="dropdown"/>
|
||||
<DropdownSelect
|
||||
v-model="sortFilter"
|
||||
:options="['Name', 'Version', 'Author']"
|
||||
default-value="Name"
|
||||
class="dropdown"
|
||||
/>
|
||||
</span>
|
||||
<Button color="primary">
|
||||
<PlusIcon />
|
||||
Add Mods
|
||||
</Button>
|
||||
<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>
|
||||
<Button color="success" icon-only>
|
||||
<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 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 v-for="mod in search" :key="mod.name" class="table-row">
|
||||
<div class="table-cell table-text">
|
||||
<Button v-if="mod.outdated" iconOnly>
|
||||
<Button v-if="mod.outdated" icon-only>
|
||||
<UpdatedIcon />
|
||||
</Button>
|
||||
<Button v-else disabled iconOnly>
|
||||
<CheckCircleIcon/>
|
||||
<Button v-else disabled icon-only>
|
||||
<CheckCircleIcon />
|
||||
</Button>
|
||||
</div>
|
||||
<div class="table-cell table-text name-cell">
|
||||
<span class="mod-text">
|
||||
<Avatar :src="mod.icon"/>
|
||||
<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">{{ mod.version }}</div>
|
||||
<div class="table-cell table-text">{{ mod.author }}</div>
|
||||
<div class="table-cell table-text manage">
|
||||
<Button iconOnly>
|
||||
<Button icon-only>
|
||||
<TrashIcon />
|
||||
</Button>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="switch stylized-toggle"
|
||||
id="switch-1"
|
||||
checked
|
||||
/>
|
||||
<input id="switch-1" type="checkbox" class="switch stylized-toggle" checked />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,55 +63,66 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Mods",
|
||||
name: 'Mods',
|
||||
data() {
|
||||
return {
|
||||
searchFilter: "",
|
||||
sortFilter: "",
|
||||
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: '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: '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: '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: '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
|
||||
}
|
||||
]
|
||||
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,
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
search() {
|
||||
const filtered = this.mods.filter((mod) => {
|
||||
return mod.name.toLowerCase().includes(this.searchFilter.toLowerCase())
|
||||
})
|
||||
|
||||
return this.updateSort(filtered, this.sortFilter)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateSort(projects, sort) {
|
||||
switch (sort) {
|
||||
@@ -148,23 +155,24 @@ export default {
|
||||
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'
|
||||
import {
|
||||
Avatar,
|
||||
Button,
|
||||
TrashIcon,
|
||||
PlusIcon,
|
||||
Card,
|
||||
CheckCircleIcon,
|
||||
SearchIcon,
|
||||
UpdatedIcon,
|
||||
DropdownSelect,
|
||||
} from 'omorphia'
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -244,4 +252,4 @@ import { Avatar, Button, TrashIcon, PlusIcon, Card, CheckCircleIcon, SearchIcon,
|
||||
.dropdown {
|
||||
width: 7rem !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,172 +1,132 @@
|
||||
<template>
|
||||
<Card class="settings-card">
|
||||
<h2 class="settings-title"> Java </h2>
|
||||
<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"
|
||||
ref="javaPath"
|
||||
v-model="javaPath"
|
||||
type="text"
|
||||
class="input installation-input"
|
||||
placeholder="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"
|
||||
/>
|
||||
<span class="installation-buttons">
|
||||
<Button @click="saveJavaPath">
|
||||
<SearchIcon/>
|
||||
Auto Detect
|
||||
</Button>
|
||||
<Button @click="saveJavaPath">
|
||||
<BrowseIcon/>
|
||||
Browse
|
||||
</Button>
|
||||
<Button @click="saveJavaPath">
|
||||
<PlayIcon/>
|
||||
Test
|
||||
</Button>
|
||||
</span>
|
||||
<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">
|
||||
<hr class="card-divider" />
|
||||
<div class="settings-group">
|
||||
<h3>Arguments</h3>
|
||||
<input
|
||||
type="text"
|
||||
class="input installation-input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
<input ref="javaArgs" v-model="javaArgs" type="text" class="input installation-input" />
|
||||
</div>
|
||||
<hr class="card-divider">
|
||||
<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>
|
||||
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>
|
||||
<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"
|
||||
/>
|
||||
<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"
|
||||
/>
|
||||
<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"
|
||||
id="fullscreen"
|
||||
v-model="fullscreen"
|
||||
type="checkbox"
|
||||
name="fullscreen"
|
||||
class="switch stylized-toggle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="card-divider">
|
||||
<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"
|
||||
id="fullscreen"
|
||||
v-model="fullscreen"
|
||||
type="checkbox"
|
||||
name="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"
|
||||
id="fullscreen"
|
||||
v-model="fullscreen"
|
||||
type="checkbox"
|
||||
name="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"
|
||||
id="fullscreen"
|
||||
v-model="fullscreen"
|
||||
type="checkbox"
|
||||
name="fullscreen"
|
||||
class="switch stylized-toggle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card class="settings-card">
|
||||
<h2 class="settings-title"> Commands </h2>
|
||||
<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"
|
||||
/>
|
||||
<input ref="javaArgs" v-model="javaArgs" type="text" class="input" />
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Wrapper
|
||||
<input
|
||||
type="text"
|
||||
class="input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
<input ref="javaArgs" v-model="javaArgs" type="text" class="input" />
|
||||
</div>
|
||||
<div class="toggle-setting">
|
||||
Post Launch
|
||||
<input
|
||||
type="text"
|
||||
class="input"
|
||||
ref="javaArgs"
|
||||
v-model="javaArgs"
|
||||
/>
|
||||
<input ref="javaArgs" v-model="javaArgs" type="text" class="input" />
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {Card, Button, SearchIcon, Slider } from 'omorphia'
|
||||
import {BrowseIcon, PlayIcon} from "@/assets/icons";
|
||||
import { Card, Button, SearchIcon, Slider } from 'omorphia'
|
||||
import { BrowseIcon, PlayIcon } from '@/assets/icons'
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -177,7 +137,7 @@ import {BrowseIcon, PlayIcon} from "@/assets/icons";
|
||||
}
|
||||
|
||||
.settings-title {
|
||||
color: var(--color-contrast)
|
||||
color: var(--color-contrast);
|
||||
}
|
||||
|
||||
.settings-group {
|
||||
@@ -195,9 +155,8 @@ import {BrowseIcon, PlayIcon} from "@/assets/icons";
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
gap: 0.5rem;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
|
||||
.sliders {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Index from './Index.vue'
|
||||
import Mods from "./Mods.vue";
|
||||
import Options from "./Options.vue";
|
||||
import Logs from "./Logs.vue";
|
||||
import Mods from './Mods.vue'
|
||||
import Options from './Options.vue'
|
||||
import Logs from './Logs.vue'
|
||||
|
||||
export { Index, Mods, Options, Logs }
|
||||
export { Index, Mods, Options, Logs }
|
||||
|
||||
@@ -45,9 +45,9 @@ export default new createRouter({
|
||||
props: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'Mods',
|
||||
component: Instance.Mods,
|
||||
path: '',
|
||||
name: 'Mods',
|
||||
component: Instance.Mods,
|
||||
},
|
||||
{
|
||||
path: 'options',
|
||||
@@ -58,9 +58,9 @@ export default new createRouter({
|
||||
path: 'logs',
|
||||
name: 'Logs',
|
||||
component: Instance.Logs,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
linkActiveClass: 'router-link-active',
|
||||
linkExactActiveClass: 'router-link-exact-active',
|
||||
|
||||
@@ -3,7 +3,7 @@ import vue from '@vitejs/plugin-vue'
|
||||
import alias from '@rollup/plugin-alias'
|
||||
import { resolve } from 'path'
|
||||
import eslint from 'vite-plugin-eslint'
|
||||
import svgLoader from "vite-svg-loader"
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
|
||||
const projectRootDir = resolve(__dirname)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user