Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
floki1250 committed Oct 7, 2024
1 parent 2b68be8 commit 9cb3f66
Show file tree
Hide file tree
Showing 23 changed files with 83 additions and 53 deletions.
26 changes: 14 additions & 12 deletions components/NfcTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@

<script setup>
import { onMounted } from 'vue'
const permissions = cordova.plugins.permissions;
onMounted(() => {
document.addEventListener("deviceready", onDeviceReady, false);
});
function onDeviceReady () {
const permissions = cordova.plugins.permissions;
console.log(device.cordova);
console.log(permissions);
// Check if NFC permission is granted
permissions.hasPermission(permissions.NFC, status => {
if (!status.hasPermission) {
alert('NFC permission not granted. Requesting permission...');
permissions.requestPermission(permissions.NFC, success => {
alert('NFC permission granted');
enableNFC();
}, error => {
alert('NFC permission denied');
});
} else {
permissions.checkPermission(permissions.NFC, status => {
alert('NFC permission not granted. Requesting permission...');
permissions.requestPermission(permissions.NFC, success => {
alert('NFC permission granted');
enableNFC();
}
}, error => {
alert('NFC permission denied');
});
}, error => {
alert('permission denied');
});
}
Expand Down
5 changes: 5 additions & 0 deletions mobile/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@
<content src="index.html" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<platform name="android">
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.nfc" android:required="true" />
</platform>
</widget>
21 changes: 21 additions & 0 deletions mobile/package-lock.json

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

4 changes: 3 additions & 1 deletion mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"cordova-android": "^13.0.0",
"cordova-browser": "^7.0.0",
"cordova-plugin-android-permissions": "^1.1.5",
"cordova-plugin-device": "^3.0.0",
"cordova-plugin-vibration": "^3.1.1"
},
"cordova": {
Expand All @@ -27,7 +28,8 @@
"plugins": {
"cordova-plugin-vibration": {},
"community-cordova-plugin-nfc": {},
"cordova-plugin-android-permissions": {}
"cordova-plugin-android-permissions": {},
"cordova-plugin-device": {}
}
}
}
10 changes: 5 additions & 5 deletions mobile/www/200.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MagicPing V2.0</title>
<link rel="stylesheet" href="/web/entry.BlM566_W.css">
<link rel="modulepreload" as="script" crossorigin href="/web/B1llnzT6.js">
<link rel="prefetch" as="script" crossorigin href="/web/lQ4nfYQb.js">
<link rel="modulepreload" as="script" crossorigin href="/web/B6ZPosoZ.js">
<link rel="prefetch" as="script" crossorigin href="/web/DMXJlFpQ.js">
<link rel="prefetch" as="style" href="/web/error-404.BiiGkIq1.css">
<link rel="prefetch" as="script" crossorigin href="/web/BpyJzbHH.js">
<link rel="prefetch" as="script" crossorigin href="/web/oXyxjP8b.js">
<link rel="prefetch" as="style" href="/web/error-500.CoUYIs1G.css">
<link rel="prefetch" as="script" crossorigin href="/web/CMBsRUCY.js">
<script type="module" src="/web/B1llnzT6.js" crossorigin></script>
<link rel="prefetch" as="script" crossorigin href="/web/DcR8A0nI.js">
<script type="module" src="/web/B6ZPosoZ.js" crossorigin></script>
<script id="unhead:payload" type="application/json">{"title":"MagicPing V2.0"}</script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildAssetsDir:"/web/",cdnURL:""}}</script></body></html>
10 changes: 5 additions & 5 deletions mobile/www/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MagicPing V2.0</title>
<link rel="stylesheet" href="/web/entry.BlM566_W.css">
<link rel="modulepreload" as="script" crossorigin href="/web/B1llnzT6.js">
<link rel="prefetch" as="script" crossorigin href="/web/lQ4nfYQb.js">
<link rel="modulepreload" as="script" crossorigin href="/web/B6ZPosoZ.js">
<link rel="prefetch" as="script" crossorigin href="/web/DMXJlFpQ.js">
<link rel="prefetch" as="style" href="/web/error-404.BiiGkIq1.css">
<link rel="prefetch" as="script" crossorigin href="/web/BpyJzbHH.js">
<link rel="prefetch" as="script" crossorigin href="/web/oXyxjP8b.js">
<link rel="prefetch" as="style" href="/web/error-500.CoUYIs1G.css">
<link rel="prefetch" as="script" crossorigin href="/web/CMBsRUCY.js">
<script type="module" src="/web/B1llnzT6.js" crossorigin></script>
<link rel="prefetch" as="script" crossorigin href="/web/DcR8A0nI.js">
<script type="module" src="/web/B6ZPosoZ.js" crossorigin></script>
<script id="unhead:payload" type="application/json">{"title":"MagicPing V2.0"}</script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildAssetsDir:"/web/",cdnURL:""}}</script></body></html>
10 changes: 5 additions & 5 deletions mobile/www/Receive/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MagicPing V2.0</title>
<link rel="stylesheet" href="/web/entry.BlM566_W.css">
<link rel="modulepreload" as="script" crossorigin href="/web/B1llnzT6.js">
<link rel="prefetch" as="script" crossorigin href="/web/lQ4nfYQb.js">
<link rel="modulepreload" as="script" crossorigin href="/web/B6ZPosoZ.js">
<link rel="prefetch" as="script" crossorigin href="/web/DMXJlFpQ.js">
<link rel="prefetch" as="style" href="/web/error-404.BiiGkIq1.css">
<link rel="prefetch" as="script" crossorigin href="/web/BpyJzbHH.js">
<link rel="prefetch" as="script" crossorigin href="/web/oXyxjP8b.js">
<link rel="prefetch" as="style" href="/web/error-500.CoUYIs1G.css">
<link rel="prefetch" as="script" crossorigin href="/web/CMBsRUCY.js">
<script type="module" src="/web/B1llnzT6.js" crossorigin></script>
<link rel="prefetch" as="script" crossorigin href="/web/DcR8A0nI.js">
<script type="module" src="/web/B6ZPosoZ.js" crossorigin></script>
<script id="unhead:payload" type="application/json">{"title":"MagicPing V2.0"}</script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildAssetsDir:"/web/",cdnURL:""}}</script></body></html>
10 changes: 5 additions & 5 deletions mobile/www/Send/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MagicPing V2.0</title>
<link rel="stylesheet" href="/web/entry.BlM566_W.css">
<link rel="modulepreload" as="script" crossorigin href="/web/B1llnzT6.js">
<link rel="prefetch" as="script" crossorigin href="/web/lQ4nfYQb.js">
<link rel="modulepreload" as="script" crossorigin href="/web/B6ZPosoZ.js">
<link rel="prefetch" as="script" crossorigin href="/web/DMXJlFpQ.js">
<link rel="prefetch" as="style" href="/web/error-404.BiiGkIq1.css">
<link rel="prefetch" as="script" crossorigin href="/web/BpyJzbHH.js">
<link rel="prefetch" as="script" crossorigin href="/web/oXyxjP8b.js">
<link rel="prefetch" as="style" href="/web/error-500.CoUYIs1G.css">
<link rel="prefetch" as="script" crossorigin href="/web/CMBsRUCY.js">
<script type="module" src="/web/B1llnzT6.js" crossorigin></script>
<link rel="prefetch" as="script" crossorigin href="/web/DcR8A0nI.js">
<script type="module" src="/web/B6ZPosoZ.js" crossorigin></script>
<script id="unhead:payload" type="application/json">{"title":"MagicPing V2.0"}</script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildAssetsDir:"/web/",cdnURL:""}}</script></body></html>
10 changes: 5 additions & 5 deletions mobile/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MagicPing V2.0</title>
<link rel="stylesheet" href="/web/entry.BlM566_W.css">
<link rel="modulepreload" as="script" crossorigin href="/web/B1llnzT6.js">
<link rel="prefetch" as="script" crossorigin href="/web/lQ4nfYQb.js">
<link rel="modulepreload" as="script" crossorigin href="/web/B6ZPosoZ.js">
<link rel="prefetch" as="script" crossorigin href="/web/DMXJlFpQ.js">
<link rel="prefetch" as="style" href="/web/error-404.BiiGkIq1.css">
<link rel="prefetch" as="script" crossorigin href="/web/BpyJzbHH.js">
<link rel="prefetch" as="script" crossorigin href="/web/oXyxjP8b.js">
<link rel="prefetch" as="style" href="/web/error-500.CoUYIs1G.css">
<link rel="prefetch" as="script" crossorigin href="/web/CMBsRUCY.js">
<script type="module" src="/web/B1llnzT6.js" crossorigin></script>
<link rel="prefetch" as="script" crossorigin href="/web/DcR8A0nI.js">
<script type="module" src="/web/B6ZPosoZ.js" crossorigin></script>
<script id="unhead:payload" type="application/json">{"title":"MagicPing V2.0"}</script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildAssetsDir:"/web/",cdnURL:""}}</script></body></html>
Loading

0 comments on commit 9cb3f66

Please sign in to comment.