disable turbo. unwanted side effects.

This commit is contained in:
Christoph Haas 2025-05-13 01:18:43 +02:00
parent 882f7c4567
commit 522cd56807
5 changed files with 26 additions and 17 deletions

View file

@ -1,5 +1,5 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
// import "@hotwired/turbo-rails"
// import "controllers"
// import Lightbox from "photoswipe";
@ -154,8 +154,8 @@ function display_error(msg) { console.log("foo");
// };
// document.addEventListener("DOMContentLoaded", () => {
document.addEventListener("turbo:load", () => {
document.addEventListener("DOMContentLoaded", () => {
// document.addEventListener("turbo:load", () => {
console.log("DOM loaded");
// Handle uploads on specific views/pages. The DIV with ID
// #data-js-upload-form carries data attributes that tell us where

View file

@ -37,14 +37,14 @@
hr
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
= form_for(resource, as: resource_name, url: session_path(resource_name), data: { turbo: false }) do |f|
= f.hidden_field :provider, value: 'local'
.grid-x.grid-padding-x.align-center
.cell.small-4
h4.text-center Debian staff login
p.text-center
= link_to (icon('key-round'), text: 'Login via Salsa'), user_salsa_omniauth_authorize_path, class: 'button primary large', method: :post
= link_to icon('key-round') + 'Login via Salsa', user_salsa_omniauth_authorize_path, class: 'button primary large', method: :post
.cell.small-4
h4.text-center Admin login
p.text-center
@ -53,6 +53,7 @@ hr
= f.submit "Sign in", class: 'button'
/ - if devise_mapping.rememberable?
/ .small-6.cell
/ = f.check_box :remember_me

View file

@ -29,6 +29,6 @@
/ BUG: DELETE method is not used
- if current_user
li
= link_to destroy_user_session_path, data: { turbo_method: :delete }
= link_to destroy_user_session_path
= icon 'lock'
'Logout