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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
0bf40fd4
Commit
0bf40fd4
authored
Sep 04, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Projects Dropdown Searched Projects List Component
parent
33697aa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
app/assets/javascripts/projects_dropdown/components/projects_list_search.vue
...pts/projects_dropdown/components/projects_list_search.vue
+63
-0
No files found.
app/assets/javascripts/projects_dropdown/components/projects_list_search.vue
0 → 100644
View file @
0bf40fd4
<
script
>
import
{
s__
}
from
'
../../locale
'
;
import
projectsListItem
from
'
./projects_list_item.vue
'
;
export
default
{
components
:
{
projectsListItem
,
},
props
:
{
matcher
:
{
type
:
String
,
required
:
true
,
},
projects
:
{
type
:
Array
,
required
:
true
,
},
searchFailed
:
{
type
:
Boolean
,
required
:
true
,
},
},
computed
:
{
isListEmpty
()
{
return
this
.
projects
.
length
===
0
;
},
listEmptyMessage
()
{
return
this
.
searchFailed
?
s__
(
'
ProjectsDropdown|Something went wrong on our end.
'
)
:
s__
(
'
ProjectsDropdown|No projects matched your query
'
);
},
},
};
</
script
>
<
template
>
<div
class=
"projects-list-search-container"
>
<ul
class=
"list-unstyled"
>
<li
v-if=
"isListEmpty"
:class=
"
{ 'section-failure': searchFailed }"
class="section-empty"
>
{{
listEmptyMessage
}}
</li>
<projects-list-item
v-else
v-for=
"(project, index) in projects"
:key=
"index"
:project-id=
"project.id"
:project-name=
"project.name"
:namespace=
"project.namespace"
:web-url=
"project.webUrl"
:avatar-url=
"project.avatarUrl"
:matcher=
"matcher"
/>
</ul>
</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