Initial balsamiq support
This commit is contained in:
parent
c98add1577
commit
acea881bb0
|
@ -58,6 +58,10 @@ class Blob < SimpleDelegator
|
|||
binary? && extname.downcase.delete('.') == 'sketch'
|
||||
end
|
||||
|
||||
def balsamiq?
|
||||
binary? && extname.downcase.delete('.') == 'bmpr'
|
||||
end
|
||||
|
||||
def stl?
|
||||
extname.downcase.delete('.') == 'stl'
|
||||
end
|
||||
|
@ -87,6 +91,8 @@ class Blob < SimpleDelegator
|
|||
'sketch'
|
||||
elsif stl?
|
||||
'stl'
|
||||
elsif balsamiq?
|
||||
'bmpr'
|
||||
elsif text?
|
||||
'text'
|
||||
else
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
- 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) } }
|
|
@ -0,0 +1,3 @@
|
|||
import renderBalsamiq from './balsamiq';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', renderBalsamiq);
|
|
@ -39,6 +39,7 @@ var config = {
|
|||
notebook_viewer: './blob/notebook_viewer.js',
|
||||
sketch_viewer: './blob/sketch_viewer.js',
|
||||
pdf_viewer: './blob/pdf_viewer.js',
|
||||
balsamiq_viewer: './blob/balsamiq_viewer.js',
|
||||
profile: './profile/profile_bundle.js',
|
||||
protected_branches: './protected_branches/protected_branches_bundle.js',
|
||||
protected_tags: './protected_tags',
|
||||
|
|
|
@ -950,9 +950,9 @@ ActiveRecord::Schema.define(version: 20170408033905) do
|
|||
t.boolean "lfs_enabled"
|
||||
t.text "description_html"
|
||||
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.string "import_jid"
|
||||
t.integer "auto_cancel_pending_pipelines", default: 0, null: false
|
||||
end
|
||||
|
||||
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree
|
||||
|
|
Loading…
Reference in New Issue