lab
This commit is contained in:
parent
7cd9c68a10
commit
36984ff1d4
20 changed files with 321 additions and 391 deletions
|
|
@ -12,14 +12,13 @@ html
|
|||
/ = stylesheet_link_tag :app, "data-turbo-track": "reload"
|
||||
/ = javascript_include_tag "application", "data-turbo-track": "reload", type: "module"
|
||||
|
||||
/ = stylesheet_link_tag "foundation", media: "all"
|
||||
= stylesheet_link_tag "application", media: "all"
|
||||
/ = javascript_include_tag "jquery/dist/jquery.min.js"
|
||||
/ = javascript_include_tag "foundation-sites/dist/js/foundation.min"
|
||||
= javascript_include_tag "jquery-3.7.1.min.js", "data-turbo-track": "reload", type: "module"
|
||||
= javascript_include_tag "foundation", "data-turbo-track": "reload", type: "module"
|
||||
= javascript_include_tag "debshots", "data-turbo-track": "reload", type: "module"
|
||||
/ = javascript_include_tag "application", "data-turbo-track": "reload", type: "module"
|
||||
|
||||
/ = javascript_include_tag "jquery.js", "data-turbo-track": "reload", type: "module"
|
||||
/ = javascript_include_tag "foundation", "data-turbo-track": "reload", type: "module"
|
||||
/ = javascript_include_tag "debshots", "data-turbo-track": "reload", type: "module"
|
||||
|
||||
= javascript_importmap_tags
|
||||
|
||||
= csrf_meta_tags
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@
|
|||
/ ' My uploads
|
||||
|
||||
li
|
||||
= link_to destroy_user_session_path, method: :delete
|
||||
= link_to destroy_user_session_path, data: { turbo_method: :delete }
|
||||
= fa_icon 'lock 2x', text: 'Logout'
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@
|
|||
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
||||
|
||||
javascript:
|
||||
import {upload_paste_handler} from 'aplication';
|
||||
|
||||
// Handle Ctrl-V to paste an image directly
|
||||
document.onpaste = upload_paste_handler;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,16 +64,18 @@ h1 = "Upload screenshots for #{@package.name}"
|
|||
' from a shell using after setting "export LANG=C".
|
||||
li can be pasted here from your clipboard (Ctrl-V)
|
||||
|
||||
/ javascript:
|
||||
/ // Hide the submit button unless images are selected for upload
|
||||
/ // $(document).ready(upload_form_init);
|
||||
/ import upload_form_init from '../../assets/javascripts/upload.js';
|
||||
/ document.addEventListener('DOMContentLoaded', upload_form_init);
|
||||
|
||||
javascript:
|
||||
// Hide the submit button unless images are selected for upload
|
||||
$(document).ready(upload_form_init);
|
||||
/ // import upload_paste_handler from '../../assets/javascripts/debshots.js';
|
||||
/ // Handle Ctrl-V to paste an image directly
|
||||
/ document.onpaste = upload_paste_handler;
|
||||
|
||||
// Handle Ctrl-V to paste an image directly
|
||||
document.onpaste = upload_paste_handler;
|
||||
/ // Where to send POST requests for uploads
|
||||
/ var ajax_upload_url = '#{{upload_receive_json_path}}';
|
||||
|
||||
// Where to send POST requests for uploads
|
||||
var ajax_upload_url = '#{{upload_receive_json_path}}';
|
||||
|
||||
// Where to go to after a successful image upload
|
||||
var after_upload_url = '#{{package_path(@package)}}';
|
||||
/ // Where to go to after a successful image upload
|
||||
/ var after_upload_url = '#{{package_path(@package)}}';
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
.image
|
||||
- if @random_pick
|
||||
a href=package_path(@random_pick.name)
|
||||
= small_img(@random_pick.screenshots.first)
|
||||
= small_img(@random_pick.screenshots.publicly.first)
|
||||
- else
|
||||
'No uploaded screenshots yet.
|
||||
.text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue