Commit acea881b authored by Jacob Schatz's avatar Jacob Schatz Committed by Luke "Jared" Bennett

Initial balsamiq support

parent c98add15
...@@ -58,6 +58,10 @@ class Blob < SimpleDelegator ...@@ -58,6 +58,10 @@ class Blob < SimpleDelegator
binary? && extname.downcase.delete('.') == 'sketch' binary? && extname.downcase.delete('.') == 'sketch'
end end
def balsamiq?
binary? && extname.downcase.delete('.') == 'bmpr'
end
def stl? def stl?
extname.downcase.delete('.') == 'stl' extname.downcase.delete('.') == 'stl'
end end
...@@ -87,6 +91,8 @@ class Blob < SimpleDelegator ...@@ -87,6 +91,8 @@ class Blob < SimpleDelegator
'sketch' 'sketch'
elsif stl? elsif stl?
'stl' 'stl'
elsif balsamiq?
'bmpr'
elsif text? elsif text?
'text' 'text'
else else
......
- content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('common_vue')
= page_specific_javascript_bundle_tag('balsamiq_viewer')
.file-content#js-balsamiq-viewer{ data: { endpoint: namespace_project_raw_path(@project.namespace, @project, @id) } }
\ No newline at end of file
import renderBalsamiq from './balsamiq';
document.addEventListener('DOMContentLoaded', renderBalsamiq);
\ No newline at end of file
...@@ -39,6 +39,7 @@ var config = { ...@@ -39,6 +39,7 @@ var config = {
notebook_viewer: './blob/notebook_viewer.js', notebook_viewer: './blob/notebook_viewer.js',
sketch_viewer: './blob/sketch_viewer.js', sketch_viewer: './blob/sketch_viewer.js',
pdf_viewer: './blob/pdf_viewer.js', pdf_viewer: './blob/pdf_viewer.js',
balsamiq_viewer: './blob/balsamiq_viewer.js',
profile: './profile/profile_bundle.js', profile: './profile/profile_bundle.js',
protected_branches: './protected_branches/protected_branches_bundle.js', protected_branches: './protected_branches/protected_branches_bundle.js',
protected_tags: './protected_tags', protected_tags: './protected_tags',
......
...@@ -950,9 +950,9 @@ ActiveRecord::Schema.define(version: 20170408033905) do ...@@ -950,9 +950,9 @@ ActiveRecord::Schema.define(version: 20170408033905) do
t.boolean "lfs_enabled" t.boolean "lfs_enabled"
t.text "description_html" t.text "description_html"
t.boolean "only_allow_merge_if_all_discussions_are_resolved" t.boolean "only_allow_merge_if_all_discussions_are_resolved"
t.integer "auto_cancel_pending_pipelines", default: 0, null: false
t.boolean "printing_merge_request_link_enabled", default: true, null: false t.boolean "printing_merge_request_link_enabled", default: true, null: false
t.string "import_jid" t.string "import_jid"
t.integer "auto_cancel_pending_pipelines", default: 0, null: false
end end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree
......
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