You've already forked AstralRinth
forked from didirus/AstralRinth
Fixes and enhancements (#350)
* Fixes #147 * Fixes #149 and #151 * Fixed #153 * Fixes #154 * Update ContextMenu.vue * Revert temp change to test windows * More bug fixes * Fixed modpack install bug * Fixes #314 * Lint * Fix #261
This commit is contained in:
@@ -122,14 +122,14 @@ async function setLogs() {
|
||||
}
|
||||
|
||||
const copyLog = () => {
|
||||
if (logs.value[selectedLogIndex.value]) {
|
||||
if (logs.value.length > 0 && logs.value[selectedLogIndex.value]) {
|
||||
navigator.clipboard.writeText(logs.value[selectedLogIndex.value].stdout)
|
||||
copied.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const share = async () => {
|
||||
if (logs.value[selectedLogIndex.value]) {
|
||||
if (logs.value.length > 0 && logs.value[selectedLogIndex.value]) {
|
||||
const url = await ofetch('https://api.mclo.gs/1/log', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -146,7 +146,7 @@ watch(selectedLogIndex, async (newIndex) => {
|
||||
copied.value = false
|
||||
userScrolled.value = false
|
||||
|
||||
if (newIndex !== 0) {
|
||||
if (logs.value.length > 1 && newIndex !== 0) {
|
||||
logs.value[newIndex].stdout = 'Loading...'
|
||||
logs.value[newIndex].stdout = await get_output_by_datetime(
|
||||
props.instance.uuid,
|
||||
|
||||
@@ -61,12 +61,6 @@
|
||||
<DropdownIcon v-if="sortColumn === 'Version'" :class="{ down: ascending }" />
|
||||
</Button>
|
||||
</div>
|
||||
<div v-if="selected.length === 0" class="table-cell table-text">
|
||||
<Button class="transparent" @click="sortProjects('Author')">
|
||||
Author
|
||||
<DropdownIcon v-if="sortColumn === 'Author'" :class="{ down: ascending }" />
|
||||
</Button>
|
||||
</div>
|
||||
<div v-if="selected.length === 0" class="table-cell table-text actions-cell">
|
||||
<Button class="transparent" @click="sortProjects('Enabled')">
|
||||
Actions
|
||||
@@ -187,18 +181,22 @@
|
||||
<router-link
|
||||
v-if="mod.slug"
|
||||
:to="{ path: `/project/${mod.slug}/`, query: { i: props.instance.path } }"
|
||||
class="mod-text"
|
||||
class="mod-content"
|
||||
>
|
||||
<Avatar :src="mod.icon" />
|
||||
{{ mod.name }}
|
||||
<div v-tooltip="`${mod.name} by ${mod.author}`" class="mod-text">
|
||||
<div class="title">{{ mod.name }}</div>
|
||||
<span class="no-wrap">by {{ mod.author }}</span>
|
||||
</div>
|
||||
</router-link>
|
||||
<div v-else class="mod-text">
|
||||
<div v-else class="mod-content">
|
||||
<Avatar :src="mod.icon" />
|
||||
{{ mod.name }}
|
||||
<span v-tooltip="`${mod.name}`" class="title">{{ mod.name }}</span>
|
||||
</div>
|
||||
</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">
|
||||
<span v-tooltip="`${mod.version}`">{{ mod.version }}</span>
|
||||
</div>
|
||||
<div class="table-cell table-text manage">
|
||||
<Button v-tooltip="'Remove project'" icon-only @click="removeMod(mod)">
|
||||
<TrashIcon />
|
||||
@@ -225,6 +223,9 @@
|
||||
:checked="!mod.disabled"
|
||||
@change="toggleDisableMod(mod)"
|
||||
/>
|
||||
<Button v-tooltip="`Show ${mod.file_name}`" icon-only @click="showInFolder(mod.path)">
|
||||
<FolderOpenIcon />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -344,6 +345,7 @@ import { handleError } from '@/store/notifications.js'
|
||||
import mixpanel from 'mixpanel-browser'
|
||||
import { open } from '@tauri-apps/api/dialog'
|
||||
import { listen } from '@tauri-apps/api/event'
|
||||
import { showInFolder } from '@/helpers/utils.js'
|
||||
import { MenuIcon, ToggleIcon, TextInputIcon, AddProjectImage } from '@/assets/icons'
|
||||
|
||||
const router = useRouter()
|
||||
@@ -765,7 +767,7 @@ listen('tauri://file-drop', async (event) => {
|
||||
}
|
||||
|
||||
.table-row {
|
||||
grid-template-columns: min-content 2fr 1fr 1fr 11rem;
|
||||
grid-template-columns: min-content 2fr 1fr 13.25rem;
|
||||
|
||||
&.show-options {
|
||||
grid-template-columns: min-content auto;
|
||||
@@ -807,6 +809,11 @@ listen('tauri://file-drop', async (event) => {
|
||||
|
||||
.name-cell {
|
||||
padding-left: 0;
|
||||
|
||||
.btn {
|
||||
margin-left: var(--gap-sm);
|
||||
min-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
@@ -845,6 +852,22 @@ listen('tauri://file-drop', async (event) => {
|
||||
}
|
||||
}
|
||||
|
||||
.mod-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
|
||||
.mod-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: var(--color-contrast);
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
|
||||
.actions-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user