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>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<router-link
|
||||||
|
class="settings-link"
|
||||||
|
:to="toSettings()"
|
||||||
|
>
|
||||||
|
Settings
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -35,6 +41,14 @@ function toHousehold(slug: string) {
|
||||||
if (enabled) return { name: 'mealplan', params: { householdSlug: slug } }
|
if (enabled) return { name: 'mealplan', params: { householdSlug: slug } }
|
||||||
return { name: 'mealplan' }
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
@ -48,4 +62,7 @@ function toHousehold(slug: string) {
|
||||||
margin: 0 0 0 8px;
|
margin: 0 0 0 8px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
.settings-link {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue