File size: 5,170 Bytes
5acd9c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa0155d
5acd9c3
 
 
 
aa0155d
5acd9c3
 
 
 
 
d1c1604
5acd9c3
aa0155d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5acd9c3
 
aa0155d
 
 
 
 
 
d1c1604
aa0155d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5acd9c3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html>
<head>
  <!--
    If you are serving your web app in a path other than the root, change the
    href value below to reflect the base path you are serving from.

    The path provided below has to start and end with a slash "/" in order for
    it to work correctly.

    For more details:
    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

    This is a placeholder for base href that will be replaced by the value of
    the `--base-href` argument provided to `flutter build`.
  -->
  <base href="$FLUTTER_BASE_HREF">

  <meta charset="UTF-8">
  <meta content="IE=Edge" http-equiv="X-UA-Compatible">
  <meta name="description" content="AI-powered video generation platform">

  <!-- iOS meta tags & icons -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="AITube">
  <link rel="apple-touch-icon" href="icons/Icon-192.png">

  <!-- Favicon -->
  <link rel="icon" type="image/png" href="favicon.png"/>

  <title>#aitube2</title>
  <link rel="manifest" href="manifest.json">
  
  <style>
    html, body {
      background-color: #1a1a1a;
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    }
    
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }
    
    .loading-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #1a1a1a;
      z-index: 1000;
      opacity: 1;
      transition: opacity 0.5s ease;
    }
    
    .logo-container {
      width: 80px;
      height: 80px;
      margin-bottom: 24px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
    .logo {
      width: 100%;
      height: 100%;
      object-fit: contain;
      animation: shake 1.2s infinite ease-in-out;
      transform-origin: bottom center;
    }
    
    .loading-text {
      color: #ffffff;
      font-size: 20px;
      margin-bottom: 16px;
      font-weight: 500;
    }
    
    @keyframes shake {
      0%, 100% {
        transform: translateX(0) rotate(0deg);
      }
      10% {
        transform: translateX(-5px) rotate(-10deg);
      }
      20% {
        transform: translateX(5px) rotate(10deg);
      }
      30% {
        transform: translateX(-5px) rotate(-10deg);
      }
      40% {
        transform: translateX(5px) rotate(10deg);
      }
      50% {
        transform: translateX(0) rotate(0deg);
      }
      /* Pause between 50% and 100% */
    }
    
    #flutter-target {
      display: none;
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
  </style>
</head>
<body>
  <div id="flutter-target"></div>
  
  <div class="loading-container" id="loading">
    <div class="logo-container">
      <img src="aitube.svg" alt="AITube Logo" class="logo">
    </div>
    <div class="loading-text">Loading #aitube2...</div>
  </div>

  <script>
    // Hide loading screen once Flutter app is ready
    window.addEventListener('flutter-first-frame', function() {
      var loading = document.getElementById('loading');
      var flutterTarget = document.getElementById('flutter-target');
      
      // Fade out loading screen
      loading.style.opacity = '0';
      loading.style.transition = 'opacity 0.5s ease';
      
      // Show Flutter app
      flutterTarget.style.display = 'block';
      
      // Remove loading completely after transition
      setTimeout(function() {
        loading.style.display = 'none';
      }, 500);
    });
  </script>
  
  <!-- Add version parameter for cache busting -->
  <script src="flutter_bootstrap.js?v=BUILD_TIMESTAMP" async></script>
  
  <!-- Add cache busting script -->
  <script>
    // Check for app updates on each load
    if ('serviceWorker' in navigator) {
      window.addEventListener('load', function() {
        navigator.serviceWorker.ready.then(function(registration) {
          // Check for updates every time the page loads
          registration.update();
          
          // Listen for updates
          registration.addEventListener('updatefound', function() {
            // New service worker found
            const newWorker = registration.installing;
            
            newWorker.addEventListener('statechange', function() {
              if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
                // New content is available, prompt user to refresh
                if (confirm('A new version is available. Reload now?')) {
                  window.location.reload();
                }
              }
            });
          });
        });
      });
    }
  </script>
</body>
</html>