feat(ui): add Settings link to HouseholdSwitcher for discoverability
This commit is contained in:
parent
218b56ccce
commit
b75ece2fc8
1 changed files with 17 additions and 0 deletions
|
|
@ -17,6 +17,12 @@
|
|||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
<router-link
|
||||
class="settings-link"
|
||||
:to="toSettings()"
|
||||
>
|
||||
Settings
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -35,6 +41,14 @@ function toHousehold(slug: string) {
|
|||
if (enabled) return { name: 'mealplan', params: { householdSlug: slug } }
|
||||
return { name: 'mealplan' }
|
||||
}
|
||||
|
||||
function toSettings() {
|
||||
const slug = activeSlug.value
|
||||
if (enabled && typeof slug === 'string' && slug.length > 0) {
|
||||
return { name: 'household-settings', params: { householdSlug: slug } }
|
||||
}
|
||||
return { name: 'household-settings' }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
@ -48,4 +62,7 @@ function toHousehold(slug: string) {
|
|||
margin: 0 0 0 8px;
|
||||
padding: 0;
|
||||
}
|
||||
.settings-link {
|
||||
margin-left: 12px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue