feat: Ajout du mode offline
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Simon 2024-04-29 23:56:00 +02:00
parent 370949cfe0
commit 2de488f3bf
5 changed files with 5917 additions and 3863 deletions

View File

@ -15,11 +15,16 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scores Ceiba</title>
<meta name="description" content="L'application Scores de Ceiba">
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
</head>
<body>
<div id="app"></div>

9672
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,23 +10,24 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
},
"dependencies": {
"@splidejs/vue-splide": "^0.5.18",
"@splidejs/vue-splide": "^0.6.12",
"html-to-image": "^1.11.11",
"pinia": "^2.0.11",
"pinia": "^2.1.7",
"pinia-plugin-persist": "^1.0.0",
"sass": "^1.49.9",
"sass-loader": "^12.6.0",
"sharp": "^0.30.3",
"vue": "^3.2.31",
"vue-router": "^4.0.12"
"sass": "^1.75.0",
"sass-loader": "^14.2.1",
"sharp": "^0.33.3",
"vite-plugin-pwa": "^0.19.8",
"vue": "^3.4.26",
"vue-router": "^4.3.2"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.0",
"@vitejs/plugin-vue": "^2.2.2",
"@vue/eslint-config-prettier": "^7.0.0",
"eslint": "^8.5.0",
"eslint-plugin-vue": "^8.2.0",
"prettier": "^2.5.1",
"vite": "^2.8.4"
"@rushstack/eslint-patch": "^1.10.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"eslint": "^9.1.1",
"eslint-plugin-vue": "^9.25.0",
"prettier": "^3.2.5",
"vite": "^5.2.10"
}
}

View File

@ -1,10 +1,16 @@
import { createApp } from "vue";
import { createPinia } from "pinia";
import piniaPersist from "pinia-plugin-persist";
import { registerSW } from "virtual:pwa-register";
import App from "@/App.vue";
import router from "@/router";
if ("serviceWorker" in navigator) {
// && !/localhost/.test(window.location)) {
registerSW();
}
const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPersist);

View File

@ -1,11 +1,75 @@
import { fileURLToPath, URL } from "url";
import { VitePWA } from "vite-plugin-pwa";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
// publicDir: 'public',
// includeAssets: ['public/answers/*.web'],
plugins: [
vue(),
VitePWA({
name: "My First Progressive Web app",
short_name: "First PWA",
theme_color: "#eb5252",
background_color: "#000000",
registerType: 'autoUpdate',
injectRegister: 'auto',
// workbox: {
// globPatterns: ['**/*.{js,css,html,ico,png,svg,webp}']
// },
includeAssets: ['favicon.ico', '/favicon/android-icon-*.png', 'mask-icon.svg'],
manifest: {
theme_color: "#eb5252",
orientation: "portrait",
display: "fullscreen",
Scope: "/",
icons: [
{
src: "/favicon/android-icon-36x36.png",
sizes: "36x36",
type: "image/png",
density: "0.75"
},
{
src: "/favicon/android-icon-48x48.png",
sizes: "48x48",
type: "image/png",
density: "1.0"
},
{
src: "/favicon/android-icon-72x72.png",
sizes: "72x72",
type: "image/png",
density: "1.5"
},
{
src: "/favicon/android-icon-96x96.png",
sizes: "96x96",
type: "image/png",
density: "2.0"
},
{
src: "/favicon/android-icon-144x144.png",
sizes: "144x144",
type: "image/png",
density: "3.0"
},
{
src: "/favicon/android-icon-192x192.png",
sizes: "192x192",
type: "image/png",
density: "4.0"
}
]
},
devOptions: {
enabled: true
}
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),