Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
subugoe
ahiqar
Website
Commits
20a41e08
Commit
20a41e08
authored
3 years ago
by
schneider210
Browse files
Options
Downloads
Patches
Plain Diff
fix: display error message for empty search and search containing whitespace only
parent
f5010e73
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!56
no-search-result
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/.vuepress/components/SearchResultEmpty.vue
+9
-6
9 additions, 6 deletions
src/.vuepress/components/SearchResultEmpty.vue
with
9 additions
and
6 deletions
src/.vuepress/components/SearchResultEmpty.vue
+
9
−
6
View file @
20a41e08
...
...
@@ -2,12 +2,13 @@
<div>
<v-alert
border=
"left"
colored-border
color=
"red accent-4"
colored-border
elevation=
"2"
>
>
<!-- TODO: provide translation -->
No search results found for
<code>
{{
query
}}
</code>
<span
v-if=
"validQuery"
>
Please enter a valid search term.
</span>
<span
v-else
>
No search results found for
<code>
{{
query
}}
</code></span>
</v-alert>
</div>
</
template
>
...
...
@@ -20,8 +21,10 @@ export default {
default
:
()
=>
''
,
},
},
computed
:
{
validQuery
()
{
return
!
this
.
query
.
match
(
/
\b\s
*
\b
/
);
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment