feat: Add new emoji assets and an UpdateBanner component.
Some checks failed
Build and Release / build-and-release (push) Failing after 3m28s
Some checks failed
Build and Release / build-and-release (push) Failing after 3m28s
This commit is contained in:
41
packages/platform-web/src/index.js
Normal file
41
packages/platform-web/src/index.js
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Web/Capacitor platform implementation.
|
||||
* Uses Web Crypto API, localStorage, and Page Visibility API.
|
||||
*/
|
||||
import crypto from './crypto.js';
|
||||
import session from './session.js';
|
||||
import settings from './settings.js';
|
||||
import idle from './idle.js';
|
||||
|
||||
const webPlatform = {
|
||||
crypto,
|
||||
session,
|
||||
settings,
|
||||
idle,
|
||||
links: {
|
||||
openExternal(url) {
|
||||
window.open(url, '_blank', 'noopener,noreferrer');
|
||||
},
|
||||
async fetchMetadata(url) {
|
||||
// On web, metadata fetching would hit CORS. Use a Convex action or proxy instead.
|
||||
// Return null to gracefully skip link previews that require server-side fetching.
|
||||
return null;
|
||||
},
|
||||
},
|
||||
screenCapture: {
|
||||
async getScreenSources() {
|
||||
// Web uses getDisplayMedia directly (no source picker like Electron).
|
||||
// Return empty array; the web UI should call navigator.mediaDevices.getDisplayMedia() directly.
|
||||
return [];
|
||||
},
|
||||
},
|
||||
windowControls: null,
|
||||
updates: null,
|
||||
features: {
|
||||
hasWindowControls: false,
|
||||
hasScreenCapture: true,
|
||||
hasNativeUpdates: false,
|
||||
},
|
||||
};
|
||||
|
||||
export default webPlatform;
|
||||
Reference in New Issue
Block a user