basically working for one user (no user/all users actually)
This commit is contained in:
@ -17,8 +17,18 @@ import {Socket} from "phoenix"
|
||||
import NProgress from "nprogress"
|
||||
import {LiveSocket} from "phoenix_live_view"
|
||||
|
||||
let Hooks = {}
|
||||
Hooks.SnippetInput = {
|
||||
updated(){
|
||||
// + cursor reposition logic
|
||||
// console.log(['dings', this.el.dataset])
|
||||
this.el.value = this.el.dataset.updatedVal
|
||||
// this.el.select()
|
||||
}
|
||||
}
|
||||
|
||||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
||||
let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}})
|
||||
let liveSocket = new LiveSocket("/live", Socket, {hooks: Hooks, params: {_csrf_token: csrfToken}})
|
||||
|
||||
// Show progress bar on live navigation and form submits
|
||||
window.addEventListener("phx:page-loading-start", info => NProgress.start())
|
||||
|
||||
Reference in New Issue
Block a user