Skip to content

Commit

Permalink
Fix version auth
Browse files Browse the repository at this point in the history
  • Loading branch information
midudev committed Jul 1, 2024
1 parent 6cc50e3 commit 1fe3b46
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 36 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,38 @@
"prepare": "husky install && bash -c 'chmod ug+x .husky/*'"
},
"dependencies": {
"@astrojs/db": "0.11.3",
"@auth/core": "0.18.6",
"@astrojs/db": "0.11.7",
"@auth/core": "0.32.0",
"@fontsource-variable/jost": "5.0.19",
"@vercel/analytics": "1.2.2",
"astro": "4.8.6",
"astro": "4.11.3",
"auth-astro": "4.1.2",
"valibot": "0.30.0"
},
"devDependencies": {
"@antfu/eslint-config": "0.43.1",
"@astrojs/check": "0.7.0",
"@astrojs/sitemap": "3.1.4",
"@astrojs/sitemap": "3.1.6",
"@astrojs/tailwind": "5.1.0",
"@astrojs/vercel": "7.6.0",
"@astrojs/vercel": "7.7.2",
"@midudev/tailwind-animations": "0.0.7",
"@types/dom-view-transitions": "1.0.4",
"@typescript-eslint/parser": "7.9.0",
"@typescript-eslint/parser": "7.14.1",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-astro": "1.2.0",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-astro": "1.2.2",
"eslint-plugin-jsx-a11y": "6.9.0",
"husky": "9.0.11",
"lightningcss": "1.25.0",
"lint-staged": "15.2.2",
"lightningcss": "1.25.1",
"lint-staged": "15.2.7",
"postcss-import": "16.1.0",
"postcss-nesting": "12.1.4",
"prettier": "3.2.5",
"prettier-plugin-astro": "0.13.0",
"postcss-nesting": "12.1.5",
"prettier": "3.3.2",
"prettier-plugin-astro": "0.14.0",
"prettier-plugin-astro-organize-imports": "0.4.8",
"prettier-plugin-tailwindcss": "0.5.14",
"prettier-plugin-tailwindcss": "0.6.5",
"tailwindcss": "3.4.3",
"typescript": "5.4.5",
"typescript": "5.5.2",
"vite-plugin-pwa": "0.20.0"
}
}
44 changes: 23 additions & 21 deletions src/components/Pronosticos/Intro.astro
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,32 @@ import Typography from "@/components/Typography.astro"
<script>
import { $ } from "@/lib/dom-selector"

const $login = $("#login")
document.addEventListener("astro:page-load", () => {
const $login = $("#login")

if ($login) {
$login.onclick = () => {
const width = 600
const height = 700
const left = window.innerWidth / 2 - width / 2
const top = window.innerHeight / 2 - height / 2
if ($login) {
$login.onclick = () => {
const width = 600
const height = 700
const left = window.innerWidth / 2 - width / 2
const top = window.innerHeight / 2 - height / 2

window.open(
"/auth/twitch",
"Twitch Login",
`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${width}, height=${height}, top=${top}, left=${left}`
)
window.open(
"/auth/twitch",
"Twitch Login",
`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${width}, height=${height}, top=${top}, left=${left}`
)

$login.setAttribute("aria-disabled", "true")
const $span = $login.querySelector("span")
$login.setAttribute("aria-disabled", "true")
const $span = $login.querySelector("span")

if ($span) $span.innerText = "Iniciando sesión..."
// Añade un temporizador que restablezca el botón después de 3 segundos
setTimeout(() => {
$login.removeAttribute("aria-disabled")
if ($span) $span.innerText = "¡Inicia sesión para participar!"
}, 3000)
if ($span) $span.innerText = "Iniciando sesión..."
// Añade un temporizador que restablezca el botón después de 3 segundos
setTimeout(() => {
$login.removeAttribute("aria-disabled")
if ($span) $span.innerText = "¡Inicia sesión para participar!"
}, 3000)
}
}
}
})
</script>

0 comments on commit 1fe3b46

Please sign in to comment.