Skip to content

Commit

Permalink
Replace v9 path by v10 (#933)
Browse files Browse the repository at this point in the history
* replace path in pkg

* replace path in docs/src

* Update getting-started.md

* Update go.mod

* Update makefile

* update doc

* update github doc

* Update README.md
  • Loading branch information
maxence-charriere committed Mar 7, 2024
1 parent 299dd6f commit 3ace962
Show file tree
Hide file tree
Showing 98 changed files with 13,088 additions and 39,614 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="https://github.com/maxence-charriere/go-app/actions"><img src="https://github.com/maxence-charriere/go-app/actions/workflows/build.yml/badge.svg?branch=master" alt="GitHub actions"></a>
<a href="https://goreportcard.com/report/github.com/maxence-charriere/go-app"><img src="https://goreportcard.com/badge/github.com/maxence-charriere/go-app" alt="Go Report Card"></a>
<a href="https://GitHub.com/maxence-charriere/go-app/releases/"><img src="https://img.shields.io/github/release/maxence-charriere/go-app.svg" alt="GitHub release"></a>
<a href="https://pkg.go.dev/github.com/maxence-charriere/go-app/v9/pkg/app"><img src="https://img.shields.io/badge/dev-reference-007d9c?logo=go&logoColor=white&style=flat" alt="pkg.go.dev docs"></a>
<a href="https://pkg.go.dev/github.com/maxence-charriere/go-app/v10/pkg/app"><img src="https://img.shields.io/badge/dev-reference-007d9c?logo=go&logoColor=white&style=flat" alt="pkg.go.dev docs"></a>
<a href="https://twitter.com/jonhymaxoo"><img alt="Twitter URL" src="https://img.shields.io/badge/twitter-@jonhymaxoo-35A9F8?logo=twitter&style=flat"></a>
<a href="https://opencollective.com/go-app" alt="Financial Contributors on Open Collective"><img src="https://opencollective.com/go-app/all/badge.svg?label=open+collective&color=4FB9F6" /></a>
</p>
Expand All @@ -34,7 +34,7 @@ An app created with go-app can out of the box **runs in its own window**, **supp

```sh
go mod init
go get -u github.com/maxence-charriere/go-app/v9/pkg/app
go get -u github.com/maxence-charriere/go-app/v10/pkg/app
```

## Declarative syntax
Expand Down
1,066 changes: 608 additions & 458 deletions docs/actions.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/app-worker.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const cacheName = "app-" + "08848207254ed19206a7e0901b6c869dca9004c8";
const resourcesToCache = ["/","/app.css","/app.js","/manifest.webmanifest","/wasm_exec.js","/web/app.wasm","/web/css/docs.css","/web/css/prism.css","/web/documents/home-next.md","/web/documents/home.md","/web/documents/updates.md","/web/documents/what-is-go-app.md","/web/icon.png","/web/js/prism.js","https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500\u0026display=swap","https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1013306768105236"];
const cacheName = "app-" + "8a5b8e9e77360856e3666adbdd05a1a9e4e08803";
const resourcesToCache = ["/","/app.css","/app.js","/manifest.webmanifest","/wasm_exec.js","/web/app.wasm","/web/css/docs.css","/web/css/prism.css","/web/documents/home-next.md","/web/documents/home.md","/web/documents/updates.md","/web/documents/what-is-go-app.md","/web/icon.png","/web/js/prism.js","https://fonts.googleapis.com/css2?family=montserrat:wght@400;500\u0026display=swap","https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1013306768105236"];

self.addEventListener("install", (event) => {
console.log("installing app worker 08848207254ed19206a7e0901b6c869dca9004c8");
console.log("installing app worker 8a5b8e9e77360856e3666adbdd05a1a9e4e08803");

event.waitUntil(
caches
Expand All @@ -28,7 +28,7 @@ self.addEventListener("activate", (event) => {
);
})
);
console.log("app worker 08848207254ed19206a7e0901b6c869dca9004c8 is activated");
console.log("app worker 8a5b8e9e77360856e3666adbdd05a1a9e4e08803 is activated");
});

self.addEventListener("fetch", (event) => {
Expand Down
19 changes: 11 additions & 8 deletions docs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ var goappNav = function () {};
var goappOnUpdate = function () {};
var goappOnAppInstallChange = function () {};

const goappEnv = {"GOAPP_INTERNAL_URLS":"null","GOAPP_ROOT_PREFIX":"","GOAPP_STATIC_RESOURCES_URL":"","GOAPP_VERSION":"08848207254ed19206a7e0901b6c869dca9004c8"};
const goappEnv = {"GOAPP_INTERNAL_URLS":"null","GOAPP_ROOT_PREFIX":"/","GOAPP_STATIC_RESOURCES_URL":"/web","GOAPP_VERSION":"8a5b8e9e77360856e3666adbdd05a1a9e4e08803"};
const goappLoadingLabel = "go-app documentation {progress}%";
const goappWasmContentLength = "";
const goappWasmContentLengthHeader = "";

let goappServiceWorkerRegistration;
Expand Down Expand Up @@ -55,7 +56,7 @@ function goappSetupNotifyUpdate(registration) {
if (!navigator.serviceWorker.controller) {
return;
}
if (newSW.state != "installed") {
if (newSW.state != "activated") {
return;
}
goappOnUpdate();
Expand Down Expand Up @@ -240,12 +241,14 @@ function goappCanLoadWebAssembly() {
async function fetchWithProgress(url, progess) {
const response = await fetch(url);

let contentLength;
try {
contentLength = response.headers.get(goappWasmContentLengthHeader);
} catch {}
if (!goappWasmContentLengthHeader || !contentLength) {
contentLength = response.headers.get("Content-Length");
let contentLength = goappWasmContentLength;
if (contentLength <= 0) {
try {
contentLength = response.headers.get(goappWasmContentLengthHeader);
} catch {}
if (!goappWasmContentLengthHeader || !contentLength) {
contentLength = response.headers.get("Content-Length");
}
}

const total = parseInt(contentLength, 10);
Expand Down
Loading

0 comments on commit 3ace962

Please sign in to comment.