@rip-lang/server 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.html +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rip-lang/server",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Pure Rip application server — multi-worker, hot reload, HTTPS, mDNS",
5
5
  "type": "module",
6
6
  "main": "server.rip",
package/server.html CHANGED
@@ -56,7 +56,7 @@
56
56
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
57
57
 
58
58
  <!-- App Card -->
59
- <a :href="getAppUrl()" target="_blank" class="block bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20 hover:bg-white/90 hover:shadow-xl transition-all duration-200 cursor-pointer">
59
+ <div @click="getAppUrl() && window.open(getAppUrl(), '_blank')" class="block bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20 transition-all duration-200" :class="getAppUrl() ? 'hover:bg-white/90 hover:shadow-xl cursor-pointer' : ''">
60
60
  <div class="flex items-center justify-between">
61
61
  <div>
62
62
  <p class="text-sm font-medium text-gray-600">Current App</p>
@@ -68,7 +68,7 @@
68
68
  </svg>
69
69
  </div>
70
70
  </div>
71
- </a>
71
+ </div>
72
72
 
73
73
  <!-- Status Card -->
74
74
  <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20">
@@ -406,9 +406,10 @@
406
406
  },
407
407
 
408
408
  getAppUrl() {
409
- // Use first registered host, or fall back to localhost
410
- const host = this.status.hosts?.[0] || 'localhost'
411
- return this.getHostUrl(host)
409
+ // Only use .local hosts (mDNS)
410
+ const hosts = this.status.hosts || []
411
+ const host = hosts.find(h => h.endsWith('.local'))
412
+ return host ? this.getHostUrl(host) : null
412
413
  }
413
414
  }
414
415
  }