Skip to content

Commit

Permalink
Fix enabled profiles in link editor appear disabled (#2938)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtng authored and florian-h05 committed Dec 22, 2024
1 parent 813f119 commit ae1dbf9
Showing 1 changed file with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@
<f7-link external color="blue" target="_blank" :href="`${$store.state.websiteUrl}/link/profiles`">
Learn more about profiles.
</f7-link>
<f7-block v-if="!ready" class="text-align-center">
<f7-preloader />
<div>Loading...</div>
</f7-block>
<f7-list v-else>
<f7-list-item radio v-for="profileType in profileTypes"
:checked="!currentProfileType && profileType.uid === 'system:default' || currentProfileType && profileType.uid === currentProfileType.uid"
:disabled="!link.editable"
@change="onProfileTypeChange(profileType.uid)"
:key="profileType.uid" :title="profileType.label" name="profile-type" />
</f7-list>
</f7-block-footer>
<f7-block v-if="!ready" class="text-align-center">
<f7-preloader />
<div>Loading...</div>
</f7-block>
<f7-list v-else class="profile-list">
<f7-list-item radio v-for="profileType in profileTypes" class="profile-item"
:checked="!currentProfileType && profileType.uid === 'system:default' || currentProfileType && profileType.uid === currentProfileType.uid"
:disabled="!link.editable"
:class="{ 'profile-disabled': !link.editable }"
@change="onProfileTypeChange(profileType.uid)"
:key="profileType.uid" :title="profileType.label" name="profile-type" />
</f7-list>
</f7-col>
<f7-col v-if="profileTypeConfiguration != null">
<f7-block-title>Profile Configuration</f7-block-title>
Expand All @@ -77,6 +78,16 @@
</f7-page>
</template>

<style lang="stylus">
.profile-list
.profile-item.profile-disabled
pointer-events none
.icon-radio
opacity 0.3
.item-title
opacity 0.55
</style>

<script>
import ConfigSheet from '@/components/config/config-sheet.vue'
import Item from '@/components/item/item.vue'
Expand Down

0 comments on commit ae1dbf9

Please sign in to comment.