Use FontAwesome as web font instead of vue component (#7469)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * Update yarn.lock * wip * wip
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<FormBase>
|
||||
<FormRange v-model:value="masterVolume" :min="0" :max="1" :step="0.05">
|
||||
<template #label><Fa :icon="volumeIcon" :key="volumeIcon"/> {{ $ts.masterVolume }}</template>
|
||||
<template #label><i class="fas fa-volume-icon"></i> {{ $ts.masterVolume }}</template>
|
||||
</FormRange>
|
||||
|
||||
<FormGroup>
|
||||
@@ -9,17 +9,16 @@
|
||||
<FormButton v-for="type in Object.keys(sounds)" :key="type" :center="false" @click="edit(type)">
|
||||
{{ $t('_sfx.' + type) }}
|
||||
<template #suffix>{{ sounds[type].type || $ts.none }}</template>
|
||||
<template #suffixIcon><Fa :icon="faChevronDown"/></template>
|
||||
<template #suffixIcon><i class="fas fa-chevron-down"></i></template>
|
||||
</FormButton>
|
||||
</FormGroup>
|
||||
|
||||
<FormButton @click="reset()" danger><Fa :icon="faRedo"/> {{ $ts.default }}</FormButton>
|
||||
<FormButton @click="reset()" danger><i class="fas fa-redo"></i> {{ $ts.default }}</FormButton>
|
||||
</FormBase>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faMusic, faPlay, faVolumeUp, faVolumeMute, faChevronDown, faRedo } from '@fortawesome/free-solid-svg-icons';
|
||||
import FormRange from '@client/components/form/range.vue';
|
||||
import FormSelect from '@client/components/form/select.vue';
|
||||
import FormBase from '@client/components/form/base.vue';
|
||||
@@ -71,10 +70,9 @@ export default defineComponent({
|
||||
return {
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: this.$ts.sounds,
|
||||
icon: faMusic
|
||||
icon: 'fas fa-music'
|
||||
},
|
||||
sounds: {},
|
||||
faMusic, faPlay, faVolumeUp, faVolumeMute, faChevronDown, faRedo,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -84,7 +82,7 @@ export default defineComponent({
|
||||
set(value) { ColdDeviceStorage.set('sound_masterVolume', value); }
|
||||
},
|
||||
volumeIcon() {
|
||||
return this.masterVolume === 0 ? faVolumeMute : faVolumeUp;
|
||||
return this.masterVolume === 0 ? 'fas fa-volume-mute' : 'fas fa-volume-up';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user