Fix enabled profiles in link editor appear disabled (#2938)
Reported on the community: https://community.openhab.org/t/enocean-impossible-to-link-a-rockerswitch-channel-with-an-item-in-main-ui-there-is-no-profile-available-for-the-selected-item/160987/40 Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>pull/2887/head
parent
0ead7b8100
commit
0071de993c
|
@ -51,18 +51,19 @@
|
||||||
<f7-link external color="blue" target="_blank" :href="`${$store.state.websiteUrl}/link/profiles`">
|
<f7-link external color="blue" target="_blank" :href="`${$store.state.websiteUrl}/link/profiles`">
|
||||||
Learn more about profiles.
|
Learn more about profiles.
|
||||||
</f7-link>
|
</f7-link>
|
||||||
|
</f7-block-footer>
|
||||||
<f7-block v-if="!ready" class="text-align-center">
|
<f7-block v-if="!ready" class="text-align-center">
|
||||||
<f7-preloader />
|
<f7-preloader />
|
||||||
<div>Loading...</div>
|
<div>Loading...</div>
|
||||||
</f7-block>
|
</f7-block>
|
||||||
<f7-list v-else>
|
<f7-list v-else class="profile-list">
|
||||||
<f7-list-item radio v-for="profileType in profileTypes"
|
<f7-list-item radio v-for="profileType in profileTypes" class="profile-item"
|
||||||
:checked="!currentProfileType && profileType.uid === 'system:default' || currentProfileType && profileType.uid === currentProfileType.uid"
|
:checked="!currentProfileType && profileType.uid === 'system:default' || currentProfileType && profileType.uid === currentProfileType.uid"
|
||||||
:disabled="!link.editable"
|
:disabled="!link.editable"
|
||||||
|
:class="{ 'profile-disabled': !link.editable }"
|
||||||
@change="onProfileTypeChange(profileType.uid)"
|
@change="onProfileTypeChange(profileType.uid)"
|
||||||
:key="profileType.uid" :title="profileType.label" name="profile-type" />
|
:key="profileType.uid" :title="profileType.label" name="profile-type" />
|
||||||
</f7-list>
|
</f7-list>
|
||||||
</f7-block-footer>
|
|
||||||
</f7-col>
|
</f7-col>
|
||||||
<f7-col v-if="profileTypeConfiguration != null">
|
<f7-col v-if="profileTypeConfiguration != null">
|
||||||
<f7-block-title>Profile Configuration</f7-block-title>
|
<f7-block-title>Profile Configuration</f7-block-title>
|
||||||
|
@ -77,6 +78,16 @@
|
||||||
</f7-page>
|
</f7-page>
|
||||||
</template>
|
</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>
|
<script>
|
||||||
import ConfigSheet from '@/components/config/config-sheet.vue'
|
import ConfigSheet from '@/components/config/config-sheet.vue'
|
||||||
import Item from '@/components/item/item.vue'
|
import Item from '@/components/item/item.vue'
|
||||||
|
|
Loading…
Reference in New Issue