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:
Adrian O.V
2023-07-21 17:59:34 -04:00
committed by GitHub
parent 448de384d1
commit 4941260805
10 changed files with 99 additions and 85 deletions

View File

@@ -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,