Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
007f6f27
Commit
007f6f27
authored
Dec 09, 2021
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error state reporting
- make it full width - properly report it with red border
parent
96db744c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
56 deletions
+65
-56
app/assets/javascripts/import_entities/import_groups/components/import_target_cell.vue
..._entities/import_groups/components/import_target_cell.vue
+65
-56
No files found.
app/assets/javascripts/import_entities/import_groups/components/import_target_cell.vue
View file @
007f6f27
...
...
@@ -37,11 +37,17 @@ export default {
this
.
group
.
progress
?.
message
||
getInvalidNameValidationMessage
(
this
.
group
.
importTarget
)
);
},
validNameState
()
{
// bootstrap-vue requires null for "indifferent" state, if we return true
// this will highlight field in green like "passed validation"
return
this
.
group
.
flags
.
isInvalid
&&
this
.
group
.
flags
.
isAvailableForImport
?
false
:
null
;
},
},
};
</
script
>
<
template
>
<div>
<div
class=
"gl-display-flex gl-align-items-stretch"
>
<import-group-dropdown
#default
="
{ namespaces }"
...
...
@@ -84,23 +90,26 @@ export default {
<gl-form-input
class=
"gl-rounded-top-left-none gl-rounded-bottom-left-none"
:class=
"{
'gl-inset-border-1-gray-200!': group.flags.isAvailableForImport,
'gl-inset-border-1-gray-100!': !group.flags.isAvailableForImport,
'is-invalid': group.flags.isInvalid && group.flags.isAvailableForImport,
'gl-inset-border-1-gray-200!':
group.flags.isAvailableForImport && !group.flags.isInvalid,
'gl-inset-border-1-gray-100!':
!group.flags.isAvailableForImport && !group.flags.isInvalid,
}"
debounce=
"500"
:disabled=
"!group.flags.isAvailableForImport"
:value=
"group.importTarget.newName"
:aria-label=
"__('New name')"
:state=
"validNameState"
@
input=
"$emit('update-new-name', $event)"
/>
<p
</div>
</div>
<div
v-if=
"group.flags.isAvailableForImport && (group.flags.isInvalid || validationMessage)"
class=
"gl-text-red-500 gl-m-0 gl-mt-2"
role=
"alert"
>
{{ validationMessage }}
</p>
</div>
</div>
</template>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment