Skip to content

Commit

Permalink
Rename generic indicator "Templates" to "Presets"
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and patrickelectric committed Sep 15, 2023
1 parent efcffc3 commit 19e7391
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/components/mini-widgets/VeryGenericIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<div class="flex items-center mb-3 justify-evenly">
<div
class="px-3 py-1 transition-all rounded-md cursor-pointer select-none text-slate-100 hover:bg-slate-400"
:class="{ 'bg-slate-400': currentTab === 'templates' }"
@click="currentTab = 'templates'"
:class="{ 'bg-slate-400': currentTab === 'presets' }"
@click="currentTab = 'presets'"
>
Templates
Presets
</div>
<div
class="px-3 py-1 transition-all rounded-md cursor-pointer select-none text-slate-100 hover:bg-slate-400"
Expand Down Expand Up @@ -93,9 +93,9 @@
/>
</div>
</div>
<div v-if="currentTab === 'templates'" class="flex flex-wrap items-center justify-around">
<div v-if="currentTab === 'presets'" class="flex flex-wrap items-center justify-around">
<div
v-for="(template, i) in veryGenericIndicatorTemplates"
v-for="(template, i) in veryGenericIndicatorPresets"
:key="i"
class="flex items-center w-[6.25rem] h-12 py-1 pl-6 pr-1 rounded-md text-white justify-center cursor-pointer hover:bg-slate-100/20 transition-all"
@click="setIndicatorFromTemplate(template)"
Expand All @@ -121,7 +121,7 @@ import { computed, onBeforeMount, onMounted, ref, toRefs, watch } from 'vue'
import Dropdown from '@/components/Dropdown.vue'
import { round } from '@/libs/utils'
import { useMainVehicleStore } from '@/stores/mainVehicle'
import { type VeryGenericIndicatorTemplate, veryGenericIndicatorTemplates } from '@/types/genericIndicator'
import { type VeryGenericIndicatorPreset, veryGenericIndicatorPresets } from '@/types/genericIndicator'
import Dialog from '../Dialog.vue'
Expand Down Expand Up @@ -175,9 +175,9 @@ let iconsNames: string[] = []
const showConfigurationMenu = ref(false)
const iconSearchString = ref('')
const currentTab = ref('templates')
const currentTab = ref('presets')
const setIndicatorFromTemplate = (template: VeryGenericIndicatorTemplate): void => {
const setIndicatorFromTemplate = (template: VeryGenericIndicatorPreset): void => {
options.displayName = template.displayName
options.variableName = template.variableName
options.iconName = template.iconName
Expand Down
4 changes: 2 additions & 2 deletions src/types/genericIndicator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Variables that define generic indicator
*/
export interface VeryGenericIndicatorTemplate {
export interface VeryGenericIndicatorPreset {
/**
* Name to be displayed on the widget
*/
Expand All @@ -28,7 +28,7 @@ export interface VeryGenericIndicatorTemplate {
variableMultiplier: number
}

export const veryGenericIndicatorTemplates: VeryGenericIndicatorTemplate[] = [
export const veryGenericIndicatorPresets: VeryGenericIndicatorPreset[] = [
{
displayName: 'Cam Tilt',
variableName: 'CamTilt',
Expand Down

0 comments on commit 19e7391

Please sign in to comment.