- Configurable server URL (default: pedshub.com) - Android + iOS platforms initialized - Dark theme matching quiz app (#0f172a) - Status bar and navigation bar color matched - Auto-redirect on subsequent launches - App ID: com.pedshub.quiz, App Name: PedsHub Build: cd mobile && npx cap sync && npx cap open android Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
51 lines
1.4 KiB
JavaScript
51 lines
1.4 KiB
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
var core = require('@capacitor/core');
|
|
|
|
const App = core.registerPlugin('App', {
|
|
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.AppWeb()),
|
|
});
|
|
|
|
class AppWeb extends core.WebPlugin {
|
|
constructor() {
|
|
super();
|
|
this.handleVisibilityChange = () => {
|
|
const data = {
|
|
isActive: document.hidden !== true,
|
|
};
|
|
this.notifyListeners('appStateChange', data);
|
|
if (document.hidden) {
|
|
this.notifyListeners('pause', null);
|
|
}
|
|
else {
|
|
this.notifyListeners('resume', null);
|
|
}
|
|
};
|
|
document.addEventListener('visibilitychange', this.handleVisibilityChange, false);
|
|
}
|
|
exitApp() {
|
|
throw this.unimplemented('Not implemented on web.');
|
|
}
|
|
async getInfo() {
|
|
throw this.unimplemented('Not implemented on web.');
|
|
}
|
|
async getLaunchUrl() {
|
|
return { url: '' };
|
|
}
|
|
async getState() {
|
|
return { isActive: document.hidden !== true };
|
|
}
|
|
async minimizeApp() {
|
|
throw this.unimplemented('Not implemented on web.');
|
|
}
|
|
}
|
|
|
|
var web = /*#__PURE__*/Object.freeze({
|
|
__proto__: null,
|
|
AppWeb: AppWeb
|
|
});
|
|
|
|
exports.App = App;
|
|
//# sourceMappingURL=plugin.cjs.js.map
|