Update LoraBell app URLs and remove outdated HTML file

- Changed LoraBell's LAN address from a local HTML file to a direct IP link in multiple files for improved accessibility.
- Removed the now obsolete lorabell-info.html file from the public directory.
- Updated service worker cache revision for index.html to ensure proper asset management.
This commit is contained in:
Dorian
2026-02-18 08:42:24 +00:00
parent dd9038b917
commit d6ecf5ea2f
6 changed files with 23 additions and 42 deletions

View File

@@ -230,25 +230,11 @@ function launchApp(id: string) {
const isDev = import.meta.env.DEV
const pkg = packages.value[id]
// Get the LAN address from the package manifest
let lanAddress = pkg?.installed?.['interface-addresses']?.main?.['lan-address']
// Replace localhost with the current hostname (for remote access)
if (lanAddress && lanAddress.includes('localhost')) {
const currentHost = window.location.hostname
lanAddress = lanAddress.replace('localhost', currentHost)
}
if (lanAddress) {
useAppLauncherStore().open({ url: lanAddress, title: pkg?.manifest?.title || id })
return
}
// Fallback: Special handling for apps with Docker containers / no-web-interface devices
// Explicit URLs for apps that need them (checked first to avoid package data issues)
const appUrls: Record<string, { dev: string, prod: string }> = {
'lorabell': {
dev: '/lorabell-info.html',
prod: '/lorabell-info.html'
dev: 'http://192.168.1.166',
prod: 'http://192.168.1.166'
},
'atob': {
dev: 'http://localhost:8102',
@@ -266,7 +252,7 @@ function launchApp(id: string) {
if (appUrls[id]) {
let url = isDev ? appUrls[id].dev : appUrls[id].prod
// Replace localhost with current hostname for remote access
// Replace localhost with current hostname for remote access (not for external IPs like LoraBell)
if (url.includes('localhost')) {
const currentHost = window.location.hostname
url = url.replace('localhost', currentHost)
@@ -275,6 +261,20 @@ function launchApp(id: string) {
return
}
// Get the LAN address from the package
let lanAddress = pkg?.installed?.['interface-addresses']?.main?.['lan-address']
// Replace localhost with the current hostname (for remote access)
if (lanAddress && lanAddress.includes('localhost')) {
const currentHost = window.location.hostname
lanAddress = lanAddress.replace('localhost', currentHost)
}
if (lanAddress) {
useAppLauncherStore().open({ url: lanAddress, title: pkg?.manifest?.title || id })
return
}
// For other apps, navigate to app details which has launch functionality
router.push(`/dashboard/apps/${id}`)
}