Skip to content

Commit

Permalink
HTTPS as default asset #2
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Feb 25, 2025
1 parent ae18e40 commit 8b81fd8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/Asset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<b-collapse :id="uid" v-model="expanded" :accordion="type" role="tabpanel" @input="collapseToggled">
<template v-if="hasAlternatives">
<b-tabs card>
<b-tab :title="asset['alternate:name'] || $t('assets.alternate.main')" active>
<b-tab :title="asset['alternate:name'] || $t('assets.alternate.main')" :active="tab === 0">
<AssetAlternative :asset="asset" :context="context" :shown="shown" hasAlternatives @show="show" />
</b-tab>
<b-tab v-for="(altAsset, key) in alternatives" :title="altAsset['alternate:name'] || key" :key="key">
<b-tab v-for="(altAsset, key) in alternatives" :title="altAsset['alternate:name'] || key" :key="key" :active="tab === 1">
<AssetAlternative :asset="altAsset" :context="context" :shown="shown" hasAlternatives :key="key" @show="show" />
</b-tab>
</b-tabs>
Expand Down Expand Up @@ -85,7 +85,8 @@ export default {
},
data() {
return {
expanded: false
expanded: false,
tab: 0
};
},
computed: {
Expand Down Expand Up @@ -140,6 +141,11 @@ export default {
this.expanded = false;
}
},
mounted() {
if (this.asset.alternate?.https) {
this.tab = 1;
}
},
methods: {
displayRole(role) {
let key = `assets.role.${role}`;
Expand Down

0 comments on commit 8b81fd8

Please sign in to comment.