mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Added Description Field for Secrets and Variables (#33526)
Fixes #33484 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
<div class="flex-item-title">
|
||||
{{.Name}}
|
||||
</div>
|
||||
<div class="flex-item-body">
|
||||
{{if .Description}}{{.Description}}{{else}}-{{end}}
|
||||
</div>
|
||||
<div class="flex-item-body">
|
||||
******
|
||||
</div>
|
||||
@@ -72,9 +75,20 @@
|
||||
<textarea required
|
||||
id="secret-data"
|
||||
name="data"
|
||||
maxlength="{{.DataMaxLength}}"
|
||||
placeholder="{{ctx.Locale.Tr "secrets.creation.value_placeholder"}}"
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="secret-description">{{ctx.Locale.Tr "secrets.creation.description"}}</label>
|
||||
<textarea
|
||||
id="secret-description"
|
||||
name="description"
|
||||
rows="2"
|
||||
maxlength="{{.DescriptionMaxLength}}"
|
||||
placeholder="{{ctx.Locale.Tr "secrets.creation.description_placeholder"}}"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||
</form>
|
||||
|
@@ -7,6 +7,7 @@
|
||||
data-modal-header="{{ctx.Locale.Tr "actions.variables.creation"}}"
|
||||
data-modal-dialog-variable-name=""
|
||||
data-modal-dialog-variable-data=""
|
||||
data-modal-dialog-variable-description=""
|
||||
>
|
||||
{{ctx.Locale.Tr "actions.variables.creation"}}
|
||||
</button>
|
||||
@@ -24,6 +25,9 @@
|
||||
<div class="flex-item-title">
|
||||
{{.Name}}
|
||||
</div>
|
||||
<div class="flex-item-body">
|
||||
{{if .Description}}{{.Description}}{{else}}-{{end}}
|
||||
</div>
|
||||
<div class="flex-item-body">
|
||||
{{.Data}}
|
||||
</div>
|
||||
@@ -39,6 +43,7 @@
|
||||
data-modal-header="{{ctx.Locale.Tr "actions.variables.edit"}}"
|
||||
data-modal-dialog-variable-name="{{.Name}}"
|
||||
data-modal-dialog-variable-data="{{.Data}}"
|
||||
data-modal-dialog-variable-description="{{.Description}}"
|
||||
>
|
||||
{{svg "octicon-pencil"}}
|
||||
</button>
|
||||
@@ -82,9 +87,20 @@
|
||||
<textarea required
|
||||
name="data"
|
||||
id="dialog-variable-data"
|
||||
maxlength="{{.DataMaxLength}}"
|
||||
placeholder="{{ctx.Locale.Tr "secrets.creation.value_placeholder"}}"
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="dialog-variable-description">{{ctx.Locale.Tr "secrets.creation.description"}}</label>
|
||||
<textarea
|
||||
name="description"
|
||||
id="dialog-variable-description"
|
||||
rows="2"
|
||||
maxlength="{{.DescriptionMaxLength}}"
|
||||
placeholder="{{ctx.Locale.Tr "secrets.creation.description_placeholder"}}"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||
</form>
|
||||
|
25
templates/swagger/v1_json.tmpl
generated
25
templates/swagger/v1_json.tmpl
generated
@@ -19325,6 +19325,11 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Data"
|
||||
},
|
||||
"description": {
|
||||
"description": "the description of the variable",
|
||||
"type": "string",
|
||||
"x-go-name": "Description"
|
||||
},
|
||||
"name": {
|
||||
"description": "the name of the variable",
|
||||
"type": "string",
|
||||
@@ -20988,6 +20993,11 @@
|
||||
"description": "Data of the secret to update",
|
||||
"type": "string",
|
||||
"x-go-name": "Data"
|
||||
},
|
||||
"description": {
|
||||
"description": "Description of the secret to update",
|
||||
"type": "string",
|
||||
"x-go-name": "Description"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
@@ -21498,6 +21508,11 @@
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "Description of the variable to create",
|
||||
"type": "string",
|
||||
"x-go-name": "Description"
|
||||
},
|
||||
"value": {
|
||||
"description": "Value of the variable to create",
|
||||
"type": "string",
|
||||
@@ -25459,6 +25474,11 @@
|
||||
"format": "date-time",
|
||||
"x-go-name": "Created"
|
||||
},
|
||||
"description": {
|
||||
"description": "the secret's description",
|
||||
"type": "string",
|
||||
"x-go-name": "Description"
|
||||
},
|
||||
"name": {
|
||||
"description": "the secret's name",
|
||||
"type": "string",
|
||||
@@ -26034,6 +26054,11 @@
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "Description of the variable to update",
|
||||
"type": "string",
|
||||
"x-go-name": "Description"
|
||||
},
|
||||
"name": {
|
||||
"description": "New name for the variable. If the field is empty, the variable name won't be updated.",
|
||||
"type": "string",
|
||||
|
Reference in New Issue
Block a user