Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache fixed
Browse files Browse the repository at this point in the history
mk-emeks committed Apr 26, 2024
1 parent 6bfd899 commit 688ecfe
Showing 5 changed files with 14 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# sensum

## v1.1.0
* Refresh cache using the service worker (see if it works)
* Use Standalone as default mode for PWA

## v1.0.0
* Display app version
* Calculate gas cost for a sensation + UI changes
2 changes: 1 addition & 1 deletion sensum-pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sensum-pwa",
"private": true,
"version": "1.0.0",
"version": "1.1.0",
"type": "module",
"scripts": {
"dev": "vite",
2 changes: 1 addition & 1 deletion sensum-pwa/src/ServiceWorker.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import { registerRoute, NavigationRoute } from 'workbox-routing';
// })

// self.__WB_MANIFEST is default injection point
precacheAndRoute(self.__WB_MANIFEST);
precacheAndRoute({url: self.__WB_MANIFEST, revision: import.meta.env.APP_VERSION});

// clean old assets
cleanupOutdatedCaches();
18 changes: 6 additions & 12 deletions sensum-pwa/src/core/ui/navbar/Core_Ui_Navbar.res
Original file line number Diff line number Diff line change
@@ -12,23 +12,17 @@ module DefaultRightComponent = {

@react.component
let make = (~rightComponent: React.element=<DefaultRightComponent />) => {
let onClick = event => {
ReactEvent.Mouse.preventDefault(event)
RescriptReactRouter.replace("/dsensum")
}


// FIXME: Make it responsive!
<header
className="border-purple-900 border-b-2 flex justify-between">
<div className="flex flex-row items-baseline">
<button onClick>
<h1 className="pl-2 text-xl lg:text-4xl text-purple-50">
{"δensum"->React.string}
</h1>
</button>
<div className="flex flex-row items-baseline group relative">
<h1 className="pl-2 text-xl lg:text-4xl text-purple-50">
{"δensum"->React.string}
</h1>
<a className="pl-2 text-sm lg:text-md text-purple-50" >
{`(v${appVersion})`->React.string}
</a>
</a>
</div>
{rightComponent}
</header>
4 changes: 2 additions & 2 deletions sensum-pwa/vite.config.js
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ export default defineConfig({
name: 'd-sensum',
short_name: 'δensum',
// https://developer.mozilla.org/en-US/docs/Web/Manifest/display_override#values
display_override: ["minimal-ui", "browser"],
display: "minimal-ui",
display_override: ["standalone", "minimal-ui", "browser"],
display: "standalone",
start_url: '/dsensum/',
description: 'mysterious app',
theme_color: '#4B3968',

0 comments on commit 688ecfe

Please sign in to comment.