インジケーターとか

This commit is contained in:
mattyatea 2023-11-02 14:32:07 +09:00
parent b1b6966b6b
commit c2208fb1c5
15 changed files with 29 additions and 21 deletions

View file

@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:class="$style.itemText">{{ navbarItemDef[item].title }}</span>
<span v-if="navbarItemDef[item].indicated"
:class="[$style.itemIndicator,{[$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light'}]">
<span v-if="navbarItemDef[item].indicateValue" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span><i
<span v-if="navbarItemDef[item].indicateValue && indicatorCounterToggle" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span><i
v-else class="_indicatorCircle"></i></span>
</component>
</template>
@ -82,7 +82,7 @@ import {$i, openAccountMenu as openAccountMenu_} from '@/account';
import {bannerDark, bannerLight, defaultStore, iconDark, iconLight} from '@/store';
import {i18n} from '@/i18n';
import {instance} from '@/instance';
const indicatorCounterToggle = computed(defaultStore.makeGetterSetter('indicatorCounterToggle'));
let bannerUrl = ref(defaultStore.state.bannerUrl);
let iconUrl = ref(defaultStore.state.iconUrl);
function hexToRgb(hex) {

View file

@ -36,8 +36,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span
:class="$style.itemText">{{ navbarItemDef[item].title }}</span>
<span v-if="navbarItemDef[item].indicated"
:class="[$style.itemIndicator,{[$style.gamingDark]: gamingType === 'dark',[$style.gamingLight]: gamingType === 'light'}]">
<span v-if="navbarItemDef[item].indicateValue" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span><i
:class="[$style.itemIndicator ,{[$style.gamingDark]: gamingType === 'dark',[$style.gamingLight]: gamingType === 'light'}]">
<span v-if="navbarItemDef[item].indicateValue && indicatorCounterToggle" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span><i
v-else class="_indicatorCircle"></i></span>
</component>
</template>
@ -95,7 +95,7 @@ import {$i, openAccountMenu as openAccountMenu_} from '@/account';
import {bannerDark, bannerLight, defaultStore, iconDark, iconLight} from '@/store';
import {i18n} from '@/i18n';
import {instance} from '@/instance';
const indicatorCounterToggle = computed(defaultStore.makeGetterSetter('indicatorCounterToggle'));
function hexToRgb(hex) {
hex = hex.replace(/^#/, '');
const r = parseInt(hex.substring(0, 2), 16);