feat: convert wallos into a progressive web app (#151)
fix: improve traditional chinese translations
This commit is contained in:
parent
0c796b9e6e
commit
19e2058976
BIN
images/icon/maskable_icon_x192.png
Normal file
BIN
images/icon/maskable_icon_x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
BIN
images/icon/maskable_icon_x512.png
Normal file
BIN
images/icon/maskable_icon_x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
@ -30,13 +30,15 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>Wallos - Subscription Tracker</title>
|
||||
<meta name="theme-color" content="<?= $theme == "light" ? "#FFFFFF" : "#222222" ?>"/>
|
||||
<link rel="icon" type="image/png" href="images/icon/favicon.ico" sizes="16x16">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="images/icon/apple-touch-icon.png">
|
||||
<link rel="manifest" href="images/icon/site.webmanifest">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="stylesheet" href="styles/styles.css?<?= $version ?>">
|
||||
<link rel="stylesheet" href="styles/dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Barlow:300,400,500,600,700">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
<script type="text/javascript" src="scripts/all.js?<?= $version ?>"></script>
|
||||
<script type="text/javascript" src="scripts/common.js?<?= $version ?>"></script>
|
||||
<script type="text/javascript">
|
||||
window.theme = "<?= $theme ?>";
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
$version = "v1.7.0";
|
||||
$version = "v1.8.0";
|
||||
?>
|
||||
@ -75,13 +75,15 @@ if (isset($_POST['username']) && isset($_POST['password'])) {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="<?= $theme == "light" ? "#FFFFFF" : "#222222" ?>"/>
|
||||
<title>Wallos - Subscription Tracker</title>
|
||||
<link rel="icon" type="image/png" href="images/icon/favicon.ico" sizes="16x16">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="images/icon/apple-touch-icon.png">
|
||||
<link rel="manifest" href="images/icon/site.webmanifest">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="stylesheet" href="styles/login.css?<?= $version ?>">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Barlow:300,400,500,600,700">
|
||||
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
|
||||
<script type="text/javascript" src="scripts/all.js?<?= $version ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
|
||||
37
manifest.json
Normal file
37
manifest.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"short_name": "Wallos",
|
||||
"name": "Wallos - Subscription Tracker",
|
||||
"icons": [
|
||||
{
|
||||
"src": "images/icon/android-chrome-192x192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "images/icon/android-chrome-512x512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
},
|
||||
{
|
||||
"src": "images/icon/maskable_icon_x192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "images/icon/maskable_icon_x512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"start_url": "/",
|
||||
"id": "com.wallos.app",
|
||||
"background_color": "#FFFFFF",
|
||||
"display": "standalone",
|
||||
"scope": "/",
|
||||
"theme_color": "#FFFFFF",
|
||||
"description": "Wallos is a personal subscription tracker that helps you keep track of your subscriptions and save money.",
|
||||
"orientation": "portrait-primary",
|
||||
"display_override": ["window-controls-overlay"]
|
||||
}
|
||||
@ -90,13 +90,16 @@ if (isset($_POST['username'])) {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="<?= $theme == "light" ? "#FFFFFF" : "#222222" ?>"/>
|
||||
<title>Wallos - Subscription Tracker</title>
|
||||
<link rel="icon" type="image/png" href="images/icon/favicon.ico" sizes="16x16">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="images/icon/apple-touch-icon.png">
|
||||
<link rel="manifest" href="images/icon/site.webmanifest">
|
||||
<link rel="manifest" href="manifes.json">
|
||||
<link rel="stylesheet" href="styles/login.css?<?= $version ?>">
|
||||
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Barlow:300,400,500,600,700">
|
||||
<script type="text/javascript" src="scripts/registration.js?<?= $version ?>"></script>
|
||||
<script type="text/javascript" src="scripts/all.js?<?= $version ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
|
||||
9
scripts/all.js
Normal file
9
scripts/all.js
Normal file
@ -0,0 +1,9 @@
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('service-worker.js').then(function(registration) {
|
||||
//console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
}, function(err) {
|
||||
console.log('ServiceWorker registration failed: ', err);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -316,4 +316,4 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
document.querySelector('#sort-options').addEventListener('focus', function() {
|
||||
isSortOptionsOpen = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
44
service-worker.js
Normal file
44
service-worker.js
Normal file
@ -0,0 +1,44 @@
|
||||
self.addEventListener('install', function(event) {
|
||||
event.waitUntil(
|
||||
caches.open('my-cache').then(function(cache) {
|
||||
return cache.addAll([
|
||||
'.',
|
||||
'index.php',
|
||||
'stats.php',
|
||||
'settings.php',
|
||||
'about.php',
|
||||
'endpoints/subscriptions/get.php',
|
||||
'styles/styles.css',
|
||||
'styles/dark-theme.css',
|
||||
'styles/login.css',
|
||||
'scripts/common.js',
|
||||
'scripts/dashboard.js',
|
||||
'scripts/stats.js',
|
||||
'scripts/settings.js',
|
||||
'scripts/registration.js',
|
||||
'scripts/i18n/en.js',
|
||||
'scripts/i18n/de.js',
|
||||
'scripts/i18n/el.js',
|
||||
'scripts/i18n/es.js',
|
||||
'scripts/i18n/fr.js',
|
||||
'scripts/i18n/jp.js',
|
||||
'scripts/i18n/pt.js',
|
||||
'scripts/i18n/tr.js',
|
||||
'scripts/i18n/zh_cn.js',
|
||||
'scripts/i18n/zh_tw.js',
|
||||
'scripts/i18n/getlang.js',
|
||||
'images/icon/favicon.ico',
|
||||
'images/wallossolid.png',
|
||||
'images/wallossolidwhite.png',
|
||||
]);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', function(event) {
|
||||
event.respondWith(
|
||||
caches.match(event.request).then(function(response) {
|
||||
return response || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user