Skip to content

Commit

Permalink
more settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ellite committed Feb 22, 2024
1 parent c8f2b57 commit 92327ef
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 16 deletions.
1 change: 1 addition & 0 deletions includes/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<link rel="stylesheet" href="styles/dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/font.css">
<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 ?>";
Expand Down
2 changes: 1 addition & 1 deletion includes/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$version = "v1.8.0a";
$version = "v1.8.0b";
?>
1 change: 1 addition & 0 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<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">
Expand Down
24 changes: 20 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,35 @@
"name": "Wallos - Personal Subscription Tracker",
"icons": [
{
"src": "images/icon/android-chrome-192x192",
"src": "images/icon/android-chrome-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/images/icon/android-chrome-512x512",
"src": "/images/icon/android-chrome-512x512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "images/icon/android-chrome-192x192.png",
"type": "image/png",
"sizes": "192x192",
"purpose": "maskable"
},
{
"src": "/images/icon/android-chrome-512x512.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "maskable"
}
],
"start_url": "/",
"start_url": "/",
"id": "com.wallos.app",
"background_color": "#FFFFFF",
"display": "standalone",
"scope": "/",
"theme_color": "#007bff"
"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"]
}
1 change: 1 addition & 0 deletions registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function validate($value) {
<link rel="stylesheet" href="styles/login.css?<?= $version ?>">
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
<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">
Expand Down
9 changes: 9 additions & 0 deletions scripts/all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('scripts/service-worker.js').then(function(registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.log('ServiceWorker registration failed: ', err);
});
});
}
12 changes: 1 addition & 11 deletions scripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,4 @@ document.addEventListener('DOMContentLoaded', function() {
document.querySelector('#sort-options').addEventListener('focus', function() {
isSortOptionsOpen = true;
});
});

if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('scripts/service-worker.js').then(function(registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.log('ServiceWorker registration failed: ', err);
});
});
}
});
2 changes: 2 additions & 0 deletions scripts/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ self.addEventListener('install', function(event) {
'/stats.php',
'/settings.php',
'/about.php',
'/endpoints/subscriptions/get.php',
'/styles/styles.css',
'/styles/dark-theme.css',
'/styles/font.css',
Expand All @@ -28,6 +29,7 @@ self.addEventListener('install', function(event) {
'/scripts/i18n/zh_cn.js',
'/scripts/i18n/zh_tw.js',
'/scripts/i18n/getlang.js',
'/images/*',
]);
})
);
Expand Down

0 comments on commit 92327ef

Please sign in to comment.