Lots of refactoring
- Removing test mentions in readme - moving login page as an app - removing vite broken config - removing auto-generated and unused vite configuration (base.css) Overall simplification (sorry @Wal I kinda destroyed your login page a bit but seems fixable 👉👈)
This commit is contained in:
@ -1,18 +1,26 @@
|
||||
<script setup>
|
||||
import 'https://kit.fontawesome.com/fb3bbd0a95.js'
|
||||
import { toast } from 'vue3-toastify';
|
||||
import { ref } from 'vue'
|
||||
import { toast } from 'vue3-toastify';
|
||||
import { ref, computed } from 'vue'
|
||||
import i18n, { setLang } from './i18n.js'
|
||||
import Inscription from "./Inscription.vue"
|
||||
|
||||
|
||||
const test = ref();
|
||||
// Liste des apps
|
||||
import LoginPage from './Apps/Login.vue'
|
||||
import Inscription from "./Apps/Inscription.vue"
|
||||
|
||||
async function draw(e) {
|
||||
test.value = (await fetch("http://localhost:8080/ping"));
|
||||
test.value = await test.value.json();
|
||||
toast(test.value['txt']);
|
||||
}
|
||||
const apps = {
|
||||
'/login': LoginPage,
|
||||
'/inscription': Inscription
|
||||
}
|
||||
const currentPath = ref(window.location.hash)
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
currentPath.value = window.location.hash
|
||||
})
|
||||
|
||||
const currentView = computed(() => {
|
||||
return apps[currentPath.value.slice(1) || '/']
|
||||
})
|
||||
|
||||
const home=ref(i18n("app.home"))
|
||||
const notifications=ref(i18n("app.notifications"))
|
||||
@ -37,7 +45,7 @@
|
||||
<div class=" fa-solid fa-house" style="margin-top: 7px; margin-bottom: 3px;"></div>
|
||||
</a></li>
|
||||
<li style="float: right;" title=login>
|
||||
<a href="/login">
|
||||
<a href="#/login">
|
||||
<div class="fa-solid fa-user" style="margin-top: 7px; margin-bottom: 3px;"></div>
|
||||
</a></li>
|
||||
<li style="float: right;" title=notifications>
|
||||
@ -75,7 +83,7 @@
|
||||
<li ><a href="#Forum">
|
||||
<div class="fa-solid fa-envelope" style="font-size: 40px;" ></div>
|
||||
<div class="text">{{i18n("app.forum")}}</div></a></li>
|
||||
<li><a href="#Inscription">
|
||||
<li><a href="#/inscription">
|
||||
<div class="fa-solid fa-users" style="font-size: 40px;"></div>
|
||||
<div class="text">{{i18n("app.inscription.requests")}}</div></a></li>
|
||||
</ul>
|
||||
@ -83,7 +91,7 @@
|
||||
</div>
|
||||
<div class="page">
|
||||
<div style=" margin:50px;">
|
||||
<Inscription></Inscription>
|
||||
<component :is="currentView" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user