debian-mirror-gitlab/app/views/projects/diffs/_replaced_image_diff.html.haml

62 lines
2.3 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
- blob = diff_file.blob
- old_blob = diff_file.old_blob
- blob_raw_url = diff_file_blob_raw_url(diff_file)
- old_blob_raw_url = diff_file_old_blob_raw_url(diff_file)
- click_to_comment = local_assigns.fetch(:click_to_comment, true)
- diff_view_data = local_assigns.fetch(:diff_view_data, '')
- class_name = ''
- if click_to_comment
- class_name = 'js-add-image-diff-note-button click-to-comment'
.image.js-replaced-image{ data: diff_view_data }
.two-up.view
.wrap
.frame.deleted
= image_tag(old_blob_raw_url, alt: diff_file.old_path, lazy: false)
2021-02-22 17:27:13 +05:30
%p.image-info.gl-display-none
2018-03-17 18:26:18 +05:30
%span.meta-filesize= number_to_human_size(old_blob.size)
|
%strong W:
%span.meta-width
|
%strong H:
%span.meta-height
.wrap
= render partial: "projects/diffs/image_diff_frame", locals: { class_name: "added js-image-frame #{class_name}", position: position, note_type: DiffNote.name, image_path: blob_raw_url, alt: diff_file.new_path }
2021-02-22 17:27:13 +05:30
%p.image-info.gl-display-none
2018-03-17 18:26:18 +05:30
%span.meta-filesize= number_to_human_size(blob.size)
|
%strong W:
%span.meta-width
|
%strong H:
%span.meta-height
2021-02-22 17:27:13 +05:30
.swipe.view.gl-display-none
2018-03-17 18:26:18 +05:30
.swipe-frame
2019-07-07 11:18:12 +05:30
.frame.deleted.old-diff
2018-03-17 18:26:18 +05:30
= image_tag(old_blob_raw_url, alt: diff_file.old_path, lazy: false)
2019-07-07 11:18:12 +05:30
.swipe-wrap.left-oriented
= render partial: "projects/diffs/image_diff_frame", locals: { class_name: "added old-diff js-image-frame #{class_name}", position: position, note_type: DiffNote.name, image_path: blob_raw_url, alt: diff_file.new_path }
2018-03-17 18:26:18 +05:30
%span.swipe-bar
%span.top-handle
%span.bottom-handle
2021-02-22 17:27:13 +05:30
.onion-skin.view.gl-display-none
2018-03-17 18:26:18 +05:30
.onion-skin-frame
.frame.deleted
= image_tag(old_blob_raw_url, alt: diff_file.old_path, lazy: false)
= render partial: "projects/diffs/image_diff_frame", locals: { class_name: "added js-image-frame #{class_name}", position: position, note_type: DiffNote.name, image_path: blob_raw_url, alt: diff_file.new_path }
.controls
.transparent
.drag-track
.dragger{ :style => "left: 0px;" }
.opaque
2021-02-22 17:27:13 +05:30
.view-modes.gl-display-none
2018-03-17 18:26:18 +05:30
%ul.view-modes-menu
%li.two-up{ data: { mode: 'two-up' } } 2-up
%li.swipe{ data: { mode: 'swipe' } } Swipe
%li.onion-skin{ data: { mode: 'onion-skin' } } Onion skin