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
09a876a8
Commit
09a876a8
authored
Jul 13, 2020
by
Roger Meier
Committed by
Phil Hughes
Jul 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new icon for api preview
Closes #118440
parent
58a7f989
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
10 deletions
+13
-10
app/models/blob_viewer/image.rb
app/models/blob_viewer/image.rb
+1
-1
app/models/blob_viewer/notebook.rb
app/models/blob_viewer/notebook.rb
+1
-1
app/models/blob_viewer/open_api.rb
app/models/blob_viewer/open_api.rb
+1
-3
app/models/blob_viewer/rich.rb
app/models/blob_viewer/rich.rb
+1
-1
app/models/blob_viewer/svg.rb
app/models/blob_viewer/svg.rb
+1
-1
app/models/diff_viewer/image.rb
app/models/diff_viewer/image.rb
+1
-1
app/views/projects/blob/_viewer_switcher.html.haml
app/views/projects/blob/_viewer_switcher.html.haml
+2
-2
changelogs/unreleased/feat-use-new-api-icon.yml
changelogs/unreleased/feat-use-new-api-icon.yml
+5
-0
No files found.
app/models/blob_viewer/image.rb
View file @
09a876a8
...
...
@@ -8,7 +8,7 @@ module BlobViewer
self
.
partial_name
=
'image'
self
.
extensions
=
UploaderHelper
::
SAFE_IMAGE_EXT
self
.
binary
=
true
self
.
switcher_icon
=
'
picture-o
'
self
.
switcher_icon
=
'
doc-image
'
self
.
switcher_title
=
'image'
end
end
app/models/blob_viewer/notebook.rb
View file @
09a876a8
...
...
@@ -8,7 +8,7 @@ module BlobViewer
self
.
partial_name
=
'notebook'
self
.
extensions
=
%w(ipynb)
self
.
binary
=
false
self
.
switcher_icon
=
'
file-text-o
'
self
.
switcher_icon
=
'
doc-text
'
self
.
switcher_title
=
'notebook'
end
end
app/models/blob_viewer/open_api.rb
View file @
09a876a8
...
...
@@ -8,8 +8,6 @@ module BlobViewer
self
.
partial_name
=
'openapi'
self
.
file_types
=
%i(openapi)
self
.
binary
=
false
# TODO: get an icon for OpenAPI
self
.
switcher_icon
=
'file-pdf-o'
self
.
switcher_title
=
'OpenAPI'
self
.
switcher_icon
=
'api'
end
end
app/models/blob_viewer/rich.rb
View file @
09a876a8
...
...
@@ -6,7 +6,7 @@ module BlobViewer
included
do
self
.
type
=
:rich
self
.
switcher_icon
=
'
file-text-o
'
self
.
switcher_icon
=
'
doc-text
'
self
.
switcher_title
=
'rendered file'
end
end
...
...
app/models/blob_viewer/svg.rb
View file @
09a876a8
...
...
@@ -8,7 +8,7 @@ module BlobViewer
self
.
partial_name
=
'svg'
self
.
extensions
=
%w(svg)
self
.
binary
=
false
self
.
switcher_icon
=
'
picture-o
'
self
.
switcher_icon
=
'
doc-image
'
self
.
switcher_title
=
'image'
end
end
app/models/diff_viewer/image.rb
View file @
09a876a8
...
...
@@ -8,7 +8,7 @@ module DiffViewer
self
.
partial_name
=
'image'
self
.
extensions
=
UploaderHelper
::
SAFE_IMAGE_EXT
self
.
binary
=
true
self
.
switcher_icon
=
'
picture-o
'
self
.
switcher_icon
=
'
doc-image
'
self
.
switcher_title
=
_
(
'image diff'
)
end
end
app/views/projects/blob/_viewer_switcher.html.haml
View file @
09a876a8
...
...
@@ -5,8 +5,8 @@
.btn-group.js-blob-viewer-switcher.ml-2
{
role:
"group"
}
>
-
simple_label
=
"Display
#{
simple_viewer
.
switcher_title
}
"
%button
.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip
{
'aria-label'
=>
simple_label
,
title:
simple_label
,
data:
{
viewer:
'simple'
,
container:
'body'
}
}
>
=
icon
(
simple_viewer
.
switcher_icon
)
=
sprite_
icon
(
simple_viewer
.
switcher_icon
)
-
rich_label
=
"Display
#{
rich_viewer
.
switcher_title
}
"
%button
.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip
{
'aria-label'
=>
rich_label
,
title:
rich_label
,
data:
{
viewer:
'rich'
,
container:
'body'
}
}
>
=
icon
(
rich_viewer
.
switcher_icon
)
=
sprite_
icon
(
rich_viewer
.
switcher_icon
)
changelogs/unreleased/feat-use-new-api-icon.yml
0 → 100644
View file @
09a876a8
---
title
:
Use new icon for api preview
merge_request
:
34700
author
:
Roger Meier
type
:
added
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