fix(ui): add help for field

This commit is contained in:
Denis Gukov 2024-12-02 01:26:18 +05:00
parent b7a41bf569
commit 63b02a8e17
2 changed files with 16 additions and 5 deletions

View File

@ -26,6 +26,7 @@ Can use used in tandem with ItemFormBase.js. See KeyForm.vue for example.
@click="toggleHelp()"
class="mr-3"
:style="{opacity: needHelp ? 1 : 0.3}"
v-if="helpButton"
>
<v-icon>mdi-help-box</v-icon>
</v-btn>

View File

@ -187,6 +187,21 @@
<div>
<v-subheader class="px-0">
{{ $t('extraVariables') }}
<v-tooltip v-if="needHelp" bottom color="black" open-delay="300" max-width="400">
<template v-slot:activator="{ on, attrs }">
<v-icon
class="ml-1"
v-bind="attrs"
v-on="on"
>mdi-help-box</v-icon>
</template>
<div>
<div><code>--extra-vars</code> for Ansible</div>
<div><code>-var</code> for Terraform/OpenTofu</div>
</div>
</v-tooltip>
<v-spacer />
<v-btn icon @click="addSecret('var')">
<v-icon>
@ -467,11 +482,6 @@ export default {
[curr.name]: curr.value,
}), {});
// this.predefinedEnvVars.forEach((index) => {
// const predefinedVar = PREDEFINED_ENV_VARS[index];
// env[predefinedVar.name] = predefinedVar.value;
// });
const secrets = (this.secrets || []).map((s) => {
let operation;
if (s.new) {