From: Daniel Karbach Date: Sun, 25 Jun 2023 11:05:49 +0000 (+0200) Subject: add simple doors tracker X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=c9ed47875647d76d5a794f69f173a1d7ac5984b0;p=alttp.git add simple doors tracker --- diff --git a/public/dungeon/ct.png b/public/dungeon/ct.png new file mode 100644 index 0000000..3eda6c8 Binary files /dev/null and b/public/dungeon/ct.png differ diff --git a/public/dungeon/dp.png b/public/dungeon/dp.png new file mode 100644 index 0000000..86b80a3 Binary files /dev/null and b/public/dungeon/dp.png differ diff --git a/public/dungeon/ep.png b/public/dungeon/ep.png new file mode 100644 index 0000000..2b92c87 Binary files /dev/null and b/public/dungeon/ep.png differ diff --git a/public/dungeon/gt.png b/public/dungeon/gt.png new file mode 100644 index 0000000..cc95d58 Binary files /dev/null and b/public/dungeon/gt.png differ diff --git a/public/dungeon/hc.png b/public/dungeon/hc.png new file mode 100644 index 0000000..b5ae7a8 Binary files /dev/null and b/public/dungeon/hc.png differ diff --git a/public/dungeon/ip.png b/public/dungeon/ip.png new file mode 100644 index 0000000..54f0f2e Binary files /dev/null and b/public/dungeon/ip.png differ diff --git a/public/dungeon/mm.png b/public/dungeon/mm.png new file mode 100644 index 0000000..e550ea4 Binary files /dev/null and b/public/dungeon/mm.png differ diff --git a/public/dungeon/pd.png b/public/dungeon/pd.png new file mode 100644 index 0000000..fd2d37a Binary files /dev/null and b/public/dungeon/pd.png differ diff --git a/public/dungeon/sp.png b/public/dungeon/sp.png new file mode 100644 index 0000000..1510975 Binary files /dev/null and b/public/dungeon/sp.png differ diff --git a/public/dungeon/sw.png b/public/dungeon/sw.png new file mode 100644 index 0000000..0a7ab90 Binary files /dev/null and b/public/dungeon/sw.png differ diff --git a/public/dungeon/th.png b/public/dungeon/th.png new file mode 100644 index 0000000..070d451 Binary files /dev/null and b/public/dungeon/th.png differ diff --git a/public/dungeon/tr.png b/public/dungeon/tr.png new file mode 100644 index 0000000..03217db Binary files /dev/null and b/public/dungeon/tr.png differ diff --git a/public/dungeon/tt.png b/public/dungeon/tt.png new file mode 100644 index 0000000..875142d Binary files /dev/null and b/public/dungeon/tt.png differ diff --git a/public/item/fighter-sword.png b/public/item/fighter-sword.png new file mode 100644 index 0000000..06ff4fe Binary files /dev/null and b/public/item/fighter-sword.png differ diff --git a/resources/js/app.js b/resources/js/app.js index 16e3e65..c2de141 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -19,7 +19,7 @@ toastr.options.positionClass = 'toast-bottom-right'; */ import AosApp from './components/aos/App'; -import App from './components/App'; +import App from './components/app'; if (document.getElementById('aos-root')) { ReactDOM.render(, document.getElementById('aos-root')); diff --git a/resources/js/components/App.js b/resources/js/components/App.js deleted file mode 100644 index 3ad2494..0000000 --- a/resources/js/components/App.js +++ /dev/null @@ -1,127 +0,0 @@ -import axios from 'axios'; -import React, { useEffect, useState } from 'react'; -import { Helmet } from 'react-helmet'; -import { useTranslation } from 'react-i18next'; -import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'; - -import Footer from './common/Footer'; -import Header from './common/Header'; -import AlttpSeed from './pages/AlttpSeed'; -import Front from './pages/Front'; -import Map from './pages/Map'; -import Schedule from './pages/Schedule'; -import Technique from './pages/Technique'; -import Techniques from './pages/Techniques'; -import Tournament from './pages/Tournament'; -import User from './pages/User'; -import AlttpBaseRomProvider from '../helpers/AlttpBaseRomContext'; -import UserContext from '../helpers/UserContext'; -import i18n from '../i18n'; - -const App = () => { - const [user, setUser] = useState(null); - - const { t } = useTranslation(); - - const checkAuth = async () => { - try { - const response = await axios.get('/api/user'); - setUser(response.data); - } catch (e) { - setUser(null); - } - }; - - const doLogout = async () => { - await axios.post('/logout'); - await checkAuth(); - }; - - useEffect(() => { - let timer = null; - axios - .get('/sanctum/csrf-cookie') - .then(() => { - checkAuth(); - timer = setInterval(checkAuth, 15 * 60 * 1000); - }); - return () => { - if (timer) clearInterval(timer); - }; - }, []); - - useEffect(() => { - window.Echo.channel('App.Control') - .listen('PleaseRefresh', () => { - location.reload(); - }); - return () => { - window.Echo.leave('App.Control'); - }; - }, []); - - return - - - - - {t('general.appName')} - - -
- - } - /> - } - /> - } /> - } - /> - } - /> - } /> - } - /> - } - /> - } - /> - } - /> - } /> - } - /> - } - /> - } /> - } /> - } /> - } /> - -