refactor(client): refactor header tab handling
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| <template> | ||||
| <MkStickyContainer> | ||||
| 	<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template> | ||||
| 	<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template> | ||||
| 	<MkSpacer :content-max="700"> | ||||
| 		<div v-if="tab === 'featured'" class="_content grwlizim featured"> | ||||
| 			<MkPagination v-slot="{items}" :pagination="featuredPagination"> | ||||
| @@ -59,20 +59,17 @@ const headerActions = $computed(() => [{ | ||||
| }]); | ||||
|  | ||||
| const headerTabs = $computed(() => [{ | ||||
| 	active: tab === 'featured', | ||||
| 	key: 'featured', | ||||
| 	title: i18n.ts._channel.featured, | ||||
| 	icon: 'fas fa-fire-alt', | ||||
| 	onClick: () => { tab = 'featured'; }, | ||||
| }, { | ||||
| 	active: tab === 'following', | ||||
| 	key: 'following', | ||||
| 	title: i18n.ts._channel.following, | ||||
| 	icon: 'fas fa-heart', | ||||
| 	onClick: () => { tab = 'following'; }, | ||||
| }, { | ||||
| 	active: tab === 'owned', | ||||
| 	key: 'owned', | ||||
| 	title: i18n.ts._channel.owned, | ||||
| 	icon: 'fas fa-edit', | ||||
| 	onClick: () => { tab = 'owned'; }, | ||||
| }]); | ||||
|  | ||||
| definePageMetadata(computed(() => ({ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo