Joaquín Sánchez 2024-04-30 01:31:43 +09:00 zatwierdzone przez GitHub
commit a02152d4d4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -15,6 +15,14 @@ export default defineNuxtRouteMiddleware((to) => {
function handleAuth(to: RouteLocationNormalized) {
if (to.path === '/') {
// handle PWA protocol handler
if (to.query['protocol-handler'] && to.query.target) {
const target = (to.query.target as string).replace(/^web\+ap:\/\//, 'https://')
// eslint-disable-next-line no-console
console.log(target)
return navigateTo('/home')
}
// Installed PWA shortcut to notifications
if (to.query['notifications-pwa-shortcut'] !== undefined) {
if (currentUser.value)

Wyświetl plik

@ -124,6 +124,10 @@ export async function createI18n(): Promise<LocalizedWebManifest> {
edge_side_panel: {
preferred_width: 480,
},
protocol_handlers: [{
protocol: 'web+ap',
url: '/?protocol-handler=1&target=%s',
}],
}
if (env === 'release') {