AstraOS commited on
Commit
b445a43
·
verified ·
1 Parent(s): 7b6fd8a

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +11 -0
app.js CHANGED
@@ -49,9 +49,20 @@ class SakuraCyberDashboard {
49
  async launchLiveStreamer() {
50
  this.log('Connecting to Live Stream...');
51
  try {
 
52
  const response = await fetch('/launch/live-streamer', { method: 'POST' });
53
  const data = await response.json();
54
  this.log(`Live Stream Established: ${data.status}`);
 
 
 
 
 
 
 
 
 
 
55
  } catch (error) {
56
  this.log(`Stream Connection Error: ${error.message}`);
57
  }
 
49
  async launchLiveStreamer() {
50
  this.log('Connecting to Live Stream...');
51
  try {
52
+ // Optionally notify backend (keep if needed)
53
  const response = await fetch('/launch/live-streamer', { method: 'POST' });
54
  const data = await response.json();
55
  this.log(`Live Stream Established: ${data.status}`);
56
+
57
+ // Open Telegram bot in new window
58
+ const width = Math.min(1000, window.innerWidth * 0.8);
59
+ const height = width * (4/3); // Slightly different ratio if needed
60
+ const left = (window.innerWidth - width) / 2;
61
+ const top = (window.innerHeight - height) / 2;
62
+
63
+ window.open('https://telegram.me/python3463_bot', 'Telegram Bot',
64
+ `width=${width},height=${height},left=${left},top=${top}`);
65
+
66
  } catch (error) {
67
  this.log(`Stream Connection Error: ${error.message}`);
68
  }