mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
icon add
This commit is contained in:
@@ -1,11 +1,29 @@
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('./firebase-messaging-sw.js')
|
||||
.then(function(registration) {
|
||||
console.log('Registration successful, scope is:', registration.scope);
|
||||
}).catch(function(err) {
|
||||
console.log('Service worker registration failed, error:', err);
|
||||
});
|
||||
}
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker
|
||||
.register("./firebase-messaging-sw.js")
|
||||
.then(function(registration) {
|
||||
console.log("Registration successful, scope is:", registration.scope);
|
||||
messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration })
|
||||
.then((currentToken) => {
|
||||
if (currentToken) {
|
||||
console.log('current token for client: ', currentToken);
|
||||
|
||||
// Track the token -> client mapping, by sending to backend server
|
||||
// show on the UI that permission is secured
|
||||
} else {
|
||||
console.log('No registration token available. Request permission to generate one.');
|
||||
|
||||
// shows on the UI that permission is required
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log('An error occurred while retrieving token. ', err);
|
||||
// catch error while creating client token
|
||||
});
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.log("Service worker registration failed, error:" , err );
|
||||
});
|
||||
}
|
||||
// Scripts for firebase and firebase messaging
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
<param name="ios-package" value="sqlDB"/>
|
||||
</feature>
|
||||
|
||||
<feature name="CDVOrientation">
|
||||
<param name="ios-package" value="CDVOrientation"/>
|
||||
</feature>
|
||||
|
||||
<feature name="SQLitePlugin">
|
||||
<param name="ios-package" value="SQLitePlugin"/>
|
||||
</feature>
|
||||
|
||||
+2
-1
@@ -10,11 +10,12 @@ def capacitor_pods
|
||||
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app'
|
||||
pod 'CapacitorBrowser', :path => '..\..\node_modules\@capacitor\browser'
|
||||
pod 'CapacitorCamera', :path => '..\..\node_modules\@capacitor\camera'
|
||||
pod 'CapacitorFilesystem', :path => '..\..\node_modules\@capacitor\filesystem'
|
||||
pod 'CapacitorHaptics', :path => '..\..\node_modules\@capacitor\haptics'
|
||||
pod 'CapacitorKeyboard', :path => '..\..\node_modules\@capacitor\keyboard'
|
||||
pod 'CapacitorNetwork', :path => '..\..\node_modules\@capacitor\network'
|
||||
pod 'CapacitorFilesystem', :path => '..\..\node_modules\@capacitor\filesystem'
|
||||
pod 'CapacitorPushNotifications', :path => '..\..\node_modules\@capacitor\push-notifications'
|
||||
pod 'CapacitorVoiceRecorder', :path => '..\..\node_modules\capacitor-voice-recorder'
|
||||
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
|
||||
|
||||
Generated
+10
@@ -2040,6 +2040,11 @@
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/app/-/app-1.0.5.tgz",
|
||||
"integrity": "sha512-U0dAw1CAjKyguSRxKDabszsQ4dj679RnxaUZrSHDR5Jnt5x308oQuKXFP++wnMBbw72D02iqjG0a+/Ujye7C9g=="
|
||||
},
|
||||
"@capacitor/browser": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/browser/-/browser-1.0.6.tgz",
|
||||
"integrity": "sha512-ZDx+HNPRQZKHpWxbYEyDz34Ge4fwhiiGg2UEnA+ol+pmdvHyYxw/c8HafCEVRJutHrXcVdSNoBNAeEPkQeabrQ=="
|
||||
},
|
||||
"@capacitor/camera": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/camera/-/camera-1.2.0.tgz",
|
||||
@@ -7894,6 +7899,11 @@
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-okhttp/-/cordova-plugin-okhttp-2.0.0.tgz",
|
||||
"integrity": "sha1-6GT2C//zQqHZJHeugvckmqYIXIA="
|
||||
},
|
||||
"cordova-plugin-screen-orientation": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.2.tgz",
|
||||
"integrity": "sha512-2w6CMC+HGvbhogJetalwGurL2Fx8DQCCPy3wlSZHN1/W7WoQ5n9ujVozcoKrY4VaagK6bxrPFih+ElkO8Uqfzg=="
|
||||
},
|
||||
"cordova-plugin-splashscreen": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.4.tgz",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"@angular/router": "~12.1.2",
|
||||
"@capacitor/android": "3.3.1",
|
||||
"@capacitor/app": "^1.0.5",
|
||||
"@capacitor/browser": "1.0.6",
|
||||
"@capacitor/camera": "^1.2.0",
|
||||
"@capacitor/core": "^3.3.0",
|
||||
"@capacitor/filesystem": "^1.0.6",
|
||||
@@ -93,6 +94,7 @@
|
||||
"cordova-plugin-dbcopy": "git+https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git",
|
||||
"cordova-plugin-filepath": "^1.5.8",
|
||||
"cordova-plugin-okhttp": "^2.0.0",
|
||||
"cordova-plugin-screen-orientation": "^3.0.2",
|
||||
"cordova-res": "^0.15.3",
|
||||
"cordova-sqlite-storage": "^5.1.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
||||
Reference in New Issue
Block a user