@cluesmith/codev 2.0.1 → 2.0.2
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.
- package/package.json +1 -1
- package/templates/tower.html +9 -18
package/package.json
CHANGED
package/templates/tower.html
CHANGED
|
@@ -1785,21 +1785,7 @@
|
|
|
1785
1785
|
}
|
|
1786
1786
|
|
|
1787
1787
|
async function cloudConnect() {
|
|
1788
|
-
//
|
|
1789
|
-
if (lastCloudStatus && lastCloudStatus.registered) {
|
|
1790
|
-
cloudLoading = true;
|
|
1791
|
-
renderCloudStatus({ registered: true, state: 'connecting' });
|
|
1792
|
-
try {
|
|
1793
|
-
await authFetch('./api/tunnel/connect', { method: 'POST' });
|
|
1794
|
-
showToast('Connecting to cloud...', 'success');
|
|
1795
|
-
} catch (err) {
|
|
1796
|
-
showToast('Connect failed: ' + err.message, 'error');
|
|
1797
|
-
}
|
|
1798
|
-
cloudLoading = false;
|
|
1799
|
-
setTimeout(refresh, 2000);
|
|
1800
|
-
return;
|
|
1801
|
-
}
|
|
1802
|
-
// Not registered: open the connect dialog
|
|
1788
|
+
// Always show dialog so user can review/change preferences
|
|
1803
1789
|
showConnectDialog();
|
|
1804
1790
|
}
|
|
1805
1791
|
|
|
@@ -1828,9 +1814,14 @@
|
|
|
1828
1814
|
const errorEl = document.getElementById('connect-error');
|
|
1829
1815
|
errorEl.style.display = 'none';
|
|
1830
1816
|
errorEl.textContent = '';
|
|
1831
|
-
//
|
|
1832
|
-
|
|
1833
|
-
|
|
1817
|
+
// Pre-populate with existing registration values, or defaults
|
|
1818
|
+
if (lastCloudStatus && lastCloudStatus.towerName) {
|
|
1819
|
+
nameInput.value = lastCloudStatus.towerName;
|
|
1820
|
+
} else {
|
|
1821
|
+
nameInput.value = (lastCloudStatus && lastCloudStatus.hostname) || '';
|
|
1822
|
+
}
|
|
1823
|
+
document.getElementById('connect-server-url').value =
|
|
1824
|
+
(lastCloudStatus && lastCloudStatus.serverUrl) || 'https://cloud.codevos.ai';
|
|
1834
1825
|
dialog.style.display = 'flex';
|
|
1835
1826
|
nameInput.focus();
|
|
1836
1827
|
}
|