Allow mods to be added to unlocked instances. (#760)

* Allow mods to be added to unlocked instances.

* Learn about optional chaining?.
This commit is contained in:
chaos
2023-10-02 10:27:04 -07:00
committed by GitHub
parent 6f8ffcaf35
commit 7fbc9fa357

View File

@@ -247,13 +247,15 @@ const check_valid = computed(() => {
</Button> </Button>
<div <div
v-tooltip=" v-tooltip="
profile.metadata.linked_data && !profile.installedMod profile.metadata.linked_data?.locked && !profile.installedMod
? 'Unpair an instance to add mods.' ? 'Unpair or unlock an instance to add mods.'
: '' : ''
" "
> >
<Button <Button
:disabled="profile.installedMod || profile.installing || profile.metadata.linked_data" :disabled="
profile.installedMod || profile.installing || profile.metadata.linked_data?.locked
"
@click="install(profile)" @click="install(profile)"
> >
<DownloadIcon v-if="!profile.installedMod && !profile.installing" /> <DownloadIcon v-if="!profile.installedMod && !profile.installing" />
@@ -263,7 +265,7 @@ const check_valid = computed(() => {
? 'Installing...' ? 'Installing...'
: profile.installedMod : profile.installedMod
? 'Installed' ? 'Installed'
: profile.metadata.linked_data : profile.metadata.linked_data && profile.metadata.linked_data.locked
? 'Paired' ? 'Paired'
: 'Install' : 'Install'
}} }}