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
b6ef9d14
Commit
b6ef9d14
authored
Jul 05, 2021
by
Jacques Erasmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create empty viewer
Created an empty blob viewer
parent
1c9a3538
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
app/assets/javascripts/repository/components/blob_viewers/empty_viewer.vue
...ripts/repository/components/blob_viewers/empty_viewer.vue
+3
-0
app/assets/javascripts/repository/components/blob_viewers/index.js
...s/javascripts/repository/components/blob_viewers/index.js
+1
-2
spec/frontend/repository/components/blob_viewers/__snapshots__/empty_viewer_spec.js.snap
...ents/blob_viewers/__snapshots__/empty_viewer_spec.js.snap
+9
-0
spec/frontend/repository/components/blob_viewers/empty_viewer_spec.js
...d/repository/components/blob_viewers/empty_viewer_spec.js
+14
-0
No files found.
app/assets/javascripts/repository/components/blob_viewers/empty_viewer.vue
0 → 100644
View file @
b6ef9d14
<
template
>
<div
class=
"nothing-here-block"
>
{{
__
(
'
Empty file
'
)
}}
</div>
</
template
>
app/assets/javascripts/repository/components/blob_viewers/index.js
View file @
b6ef9d14
export
const
loadViewer
=
(
type
)
=>
{
switch
(
type
)
{
case
'
empty
'
:
// TODO (follow-up): import the empty viewer
return
null
;
// () => import(/* webpackChunkName: 'blob_empty_viewer' */ './empty_viewer.vue');
return
()
=>
import
(
/* webpackChunkName: 'blob_empty_viewer' */
'
./empty_viewer.vue
'
);
case
'
text
'
:
// TODO (follow-up): import the text viewer
return
null
;
// () => import(/* webpackChunkName: 'blob_text_viewer' */ './text_viewer.vue');
...
...
spec/frontend/repository/components/blob_viewers/__snapshots__/empty_viewer_spec.js.snap
0 → 100644
View file @
b6ef9d14
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Empty Viewer matches the snapshot 1`] = `
<div
class="nothing-here-block"
>
Empty file
</div>
`;
spec/frontend/repository/components/blob_viewers/empty_viewer_spec.js
0 → 100644
View file @
b6ef9d14
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
EmptyViewer
from
'
~/repository/components/blob_viewers/empty_viewer.vue
'
;
describe
(
'
Empty Viewer
'
,
()
=>
{
let
wrapper
;
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
EmptyViewer
);
});
it
(
'
matches the snapshot
'
,
()
=>
{
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
});
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