-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: add tooltips on InlineParameterEditor with parameter name, …
…options, and description
- Loading branch information
1 parent
104dc15
commit 1f75ea8
Showing
2 changed files
with
123 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
core/frontend/src/components/parameter-editor/ParameterLabel.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template> | ||
<div class="d-flex align-center"> | ||
<span>{{ label }}</span> | ||
<v-tooltip bottom> | ||
<template #activator="{ on, attrs }"> | ||
<v-icon | ||
small | ||
class="ml-2" | ||
v-bind="attrs" | ||
v-on="on" | ||
> | ||
mdi-information | ||
</v-icon> | ||
</template> | ||
<div> | ||
<strong>{{ param?.name }}</strong><br> | ||
<span v-if="param?.description">Description: {{ param.description }}<br></span> | ||
<span v-if="param?.range">Range: {{ param.range.low }} to {{ param.range.high }}<br></span> | ||
<span v-if="param?.units">Units: {{ param.units }}<br></span> | ||
<span v-if="param?.options">Options: {{ formatOptions }}<br></span> | ||
<span v-if="param?.rebootRequired">Requires reboot</span> | ||
</div> | ||
</v-tooltip> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue, { PropType } from 'vue' | ||
import Parameter from '@/types/autopilot/parameter' | ||
export default Vue.extend({ | ||
name: 'ParameterLabel', | ||
props: { | ||
label: { | ||
type: String, | ||
required: true, | ||
}, | ||
param: { | ||
type: Object as PropType<Parameter>, | ||
required: true, | ||
}, | ||
formatOptions: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
}) | ||
</script> |