Commit 86f1f6d6 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'feat/use-new-api-icon' into 'master'

Feat/use new api icon

Closes #118440

See merge request gitlab-org/gitlab!34700
parents 240f0a19 09a876a8
...@@ -8,7 +8,7 @@ module BlobViewer ...@@ -8,7 +8,7 @@ module BlobViewer
self.partial_name = 'image' self.partial_name = 'image'
self.extensions = UploaderHelper::SAFE_IMAGE_EXT self.extensions = UploaderHelper::SAFE_IMAGE_EXT
self.binary = true self.binary = true
self.switcher_icon = 'picture-o' self.switcher_icon = 'doc-image'
self.switcher_title = 'image' self.switcher_title = 'image'
end end
end end
...@@ -8,7 +8,7 @@ module BlobViewer ...@@ -8,7 +8,7 @@ module BlobViewer
self.partial_name = 'notebook' self.partial_name = 'notebook'
self.extensions = %w(ipynb) self.extensions = %w(ipynb)
self.binary = false self.binary = false
self.switcher_icon = 'file-text-o' self.switcher_icon = 'doc-text'
self.switcher_title = 'notebook' self.switcher_title = 'notebook'
end end
end end
...@@ -8,8 +8,6 @@ module BlobViewer ...@@ -8,8 +8,6 @@ module BlobViewer
self.partial_name = 'openapi' self.partial_name = 'openapi'
self.file_types = %i(openapi) self.file_types = %i(openapi)
self.binary = false self.binary = false
# TODO: get an icon for OpenAPI self.switcher_icon = 'api'
self.switcher_icon = 'file-pdf-o'
self.switcher_title = 'OpenAPI'
end end
end end
...@@ -6,7 +6,7 @@ module BlobViewer ...@@ -6,7 +6,7 @@ module BlobViewer
included do included do
self.type = :rich self.type = :rich
self.switcher_icon = 'file-text-o' self.switcher_icon = 'doc-text'
self.switcher_title = 'rendered file' self.switcher_title = 'rendered file'
end end
end end
......
...@@ -8,7 +8,7 @@ module BlobViewer ...@@ -8,7 +8,7 @@ module BlobViewer
self.partial_name = 'svg' self.partial_name = 'svg'
self.extensions = %w(svg) self.extensions = %w(svg)
self.binary = false self.binary = false
self.switcher_icon = 'picture-o' self.switcher_icon = 'doc-image'
self.switcher_title = 'image' self.switcher_title = 'image'
end end
end end
...@@ -8,7 +8,7 @@ module DiffViewer ...@@ -8,7 +8,7 @@ module DiffViewer
self.partial_name = 'image' self.partial_name = 'image'
self.extensions = UploaderHelper::SAFE_IMAGE_EXT self.extensions = UploaderHelper::SAFE_IMAGE_EXT
self.binary = true self.binary = true
self.switcher_icon = 'picture-o' self.switcher_icon = 'doc-image'
self.switcher_title = _('image diff') self.switcher_title = _('image diff')
end end
end end
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.btn-group.js-blob-viewer-switcher.ml-2{ role: "group" }> .btn-group.js-blob-viewer-switcher.ml-2{ role: "group" }>
- simple_label = "Display #{simple_viewer.switcher_title}" - 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' } }> %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}" - 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' } }> %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)
---
title: Use new icon for api preview
merge_request: 34700
author: Roger Meier
type: added
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment