web/satellite/vuetify-poc: add tier indicator
This change indicates the user's tier in the My Account dropdown button of the Vuetify project. Resolves #6278 Change-Id: I0db6bfe8e03720b87ff77e947f785031eed7e528
This commit is contained in:
parent
c48f58e968
commit
ad5c2e171a
@ -80,6 +80,15 @@
|
|||||||
<img src="@poc/assets/icon-dropdown.svg" alt="Account Dropdown">
|
<img src="@poc/assets/icon-dropdown.svg" alt="Account Dropdown">
|
||||||
</template>
|
</template>
|
||||||
My Account
|
My Account
|
||||||
|
<v-chip
|
||||||
|
class="ml-2 font-weight-bold"
|
||||||
|
:color="isPaidTier ? 'success' : 'default'"
|
||||||
|
variant="outlined"
|
||||||
|
size="small"
|
||||||
|
rounded
|
||||||
|
>
|
||||||
|
{{ isPaidTier ? 'Pro' : 'Free' }}
|
||||||
|
</v-chip>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -155,6 +164,7 @@ import {
|
|||||||
VListItemTitle,
|
VListItemTitle,
|
||||||
VListItemSubtitle,
|
VListItemSubtitle,
|
||||||
VDivider,
|
VDivider,
|
||||||
|
VChip,
|
||||||
} from 'vuetify/components';
|
} from 'vuetify/components';
|
||||||
|
|
||||||
import { useAppStore } from '@poc/store/appStore';
|
import { useAppStore } from '@poc/store/appStore';
|
||||||
@ -206,6 +216,13 @@ const satelliteName = computed<string>(() => {
|
|||||||
return configStore.state.config.satelliteName;
|
return configStore.state.config.satelliteName;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns user's paid tier status from store.
|
||||||
|
*/
|
||||||
|
const isPaidTier = computed<boolean>(() => {
|
||||||
|
return usersStore.state.user.paidTier;
|
||||||
|
});
|
||||||
|
|
||||||
function toggleTheme(newTheme: string): void {
|
function toggleTheme(newTheme: string): void {
|
||||||
if ((newTheme === 'dark' && theme.global.current.value.dark) || (newTheme === 'light' && !theme.global.current.value.dark)) {
|
if ((newTheme === 'dark' && theme.global.current.value.dark) || (newTheme === 'light' && !theme.global.current.value.dark)) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user