Skip to content

Commit

Permalink
service worker mess
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzapanther committed Aug 31, 2023
1 parent 1d5058a commit 4530bfa
Show file tree
Hide file tree
Showing 30 changed files with 63 additions and 688 deletions.
3 changes: 0 additions & 3 deletions android/.idea/.gitignore

This file was deleted.

17 changes: 17 additions & 0 deletions android/.idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin: 'com.android.application'

android {
namespace "com.wildwoodag.chuch"
namespace "com.wildwoodag.church"
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.wildwoodag.chuch"
applicationId "com.wildwoodag.church"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wildwoodag.chuch;
package com.wildwoodag.church;

import com.getcapacitor.BridgeActivity;

Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<resources>
<string name="app_name">Wildwood Assembly</string>
<string name="title_activity_main">Wildwood Assembly</string>
<string name="package_name">com.wildwoodag.chuch</string>
<string name="custom_url_scheme">com.wildwoodag.chuch</string>
<string name="package_name">com.wildwoodag.church</string>
<string name="custom_url_scheme">com.wildwoodag.church</string>
</resources>
6 changes: 3 additions & 3 deletions android/variables.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
minSdkVersion = 22
compileSdkVersion = 34
targetSdkVersion = 34
minSdkVersion = 28
compileSdkVersion = 33
targetSdkVersion = 33
androidxActivityVersion = '1.7.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
Expand Down
2 changes: 1 addition & 1 deletion capacitor.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"appId": "com.wildwoodag.chuch",
"appId": "com.wildwoodag.church",
"appName": "Wildwood Assembly",
"webDir": "public",
"server": {
Expand Down
30 changes: 30 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,36 @@ function showContent() {
}

showContent();

function registerServiceWorker () {
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/service-worker.js")
.then((reg) => {
if (reg.installing) {
console.log("Service worker installing");
} else if (reg.waiting) {
console.log("Service worker installed");
} else if (reg.active) {
console.log("Service worker active");
}
})
.catch((e) => {
console.error('Registration failed');
console.error(e);
});
}
}

window.addEventListener("load", (event) => {
if (window.Capacitor) {
console.log("Native Platform SW");
registerServiceWorker();
} else {
console.log("Web Platform");
// todo: show app download buttons
}

});
</script>
<img alt="Cross" src="/img/cross.jpg" style="width: 40%; float: right; border-radius: 10px;">

Expand Down
13 changes: 0 additions & 13 deletions ios/.gitignore

This file was deleted.

Loading

0 comments on commit 4530bfa

Please sign in to comment.