AhmadMustafa commited on
Commit
fa52b9a
·
1 Parent(s): f705453

update: css

Browse files
Files changed (1) hide show
  1. utils.py +0 -19
utils.py CHANGED
@@ -99,10 +99,8 @@ openai_tools = [
99
  },
100
  ]
101
 
102
-
103
  css = """
104
  .gradio-container {
105
-
106
  padding-top: 0px !important;
107
  padding-left: 0px !important;
108
  padding-right: 0px !important;
@@ -112,23 +110,18 @@ css = """
112
  #component-0 {
113
  gap: 0px !important;
114
  }
115
-
116
  .icon-button-wrapper button[title="Clear"] {
117
  display: none !important;
118
  }
119
-
120
  .image-preview .icon-button-wrapper {
121
  display: block !important;
122
  }
123
-
124
  .image-preview .icon-button-wrapper button[title="Clear"] {
125
  display: block !important;
126
  }
127
-
128
  .download-link {
129
  display: none !important;
130
  }
131
-
132
  footer {
133
  display: none !important;
134
  }
@@ -136,7 +129,6 @@ footer {
136
  flex-grow: 1 !important;
137
  border-width: 0px !important;
138
  }
139
-
140
  #link-frame {
141
  position: absolute !important;
142
  width: 1px !important;
@@ -170,7 +162,6 @@ a {
170
  .flex-wrap {
171
  border-style: none !important;
172
  }
173
-
174
  .panel-full-width {
175
  border-style: none !important;
176
  border-width: 0px !important;
@@ -179,7 +170,6 @@ ol {
179
  list-style-position: outside;
180
  margin-left: 20px;
181
  }
182
-
183
  body.waiting * {
184
  cursor: progress;
185
  }
@@ -205,7 +195,6 @@ head = f"""
205
  appId: "{os.getenv('FIREBASE_APP_ID')}",
206
  measurementId: "{os.getenv('FIREBASE_MEASUREMENT_ID')}"
207
  }};
208
-
209
  // Initialize Firebase
210
  const app = initializeApp(firebaseConfig);
211
  const realtimeDB = getDatabase(app);
@@ -213,37 +202,30 @@ head = f"""
213
  const COLLECTIONS = {{
214
  COLLAB_EDIT_LINK: "collab_link_handler",
215
  }};
216
-
217
  // Event listener for click
218
  document.addEventListener('click', function (event) {{
219
  var link = event.target.closest('a');
220
  event.preventDefault();
221
  if (link && link.href) {{
222
-
223
  // Parse the URL to extract 'st' and 'et'
224
  const url = new URL(link.href);
225
  const startTime = url.searchParams.get('st');
226
  const endTime = url.searchParams.get('et');
227
  const userId = url.searchParams.get('uid') || "";
228
-
229
  if (startTime || endTime) {{
230
  let components = url.pathname.split("/");
231
  let callId = components[2];
232
  let recordingSessionId = components[3];
233
-
234
  let data = {{
235
  startTime: parseInt(startTime, 10),
236
  endTime: parseInt(endTime, 10),
237
  }};
238
-
239
  console.log("Data to save:", data);
240
-
241
  // Firebase reference
242
  let reference = ref(
243
  realtimeDB,
244
  `${{rollAccount}}/${{COLLECTIONS.COLLAB_EDIT_LINK}}/${{userId}}/${{callId}}/${{recordingSessionId}}`
245
  );
246
-
247
  set(reference, data)
248
  .then(() => {{
249
  console.log("Data saved successfully:", data);
@@ -259,7 +241,6 @@ head = f"""
259
 
260
  js = """function refresh() {
261
  const url = new URL(window.location);
262
-
263
  if (url.searchParams.get('__theme') !== 'dark') {
264
  url.searchParams.set('__theme', 'dark');
265
  window.location.href = url.href;
 
99
  },
100
  ]
101
 
 
102
  css = """
103
  .gradio-container {
 
104
  padding-top: 0px !important;
105
  padding-left: 0px !important;
106
  padding-right: 0px !important;
 
110
  #component-0 {
111
  gap: 0px !important;
112
  }
 
113
  .icon-button-wrapper button[title="Clear"] {
114
  display: none !important;
115
  }
 
116
  .image-preview .icon-button-wrapper {
117
  display: block !important;
118
  }
 
119
  .image-preview .icon-button-wrapper button[title="Clear"] {
120
  display: block !important;
121
  }
 
122
  .download-link {
123
  display: none !important;
124
  }
 
125
  footer {
126
  display: none !important;
127
  }
 
129
  flex-grow: 1 !important;
130
  border-width: 0px !important;
131
  }
 
132
  #link-frame {
133
  position: absolute !important;
134
  width: 1px !important;
 
162
  .flex-wrap {
163
  border-style: none !important;
164
  }
 
165
  .panel-full-width {
166
  border-style: none !important;
167
  border-width: 0px !important;
 
170
  list-style-position: outside;
171
  margin-left: 20px;
172
  }
 
173
  body.waiting * {
174
  cursor: progress;
175
  }
 
195
  appId: "{os.getenv('FIREBASE_APP_ID')}",
196
  measurementId: "{os.getenv('FIREBASE_MEASUREMENT_ID')}"
197
  }};
 
198
  // Initialize Firebase
199
  const app = initializeApp(firebaseConfig);
200
  const realtimeDB = getDatabase(app);
 
202
  const COLLECTIONS = {{
203
  COLLAB_EDIT_LINK: "collab_link_handler",
204
  }};
 
205
  // Event listener for click
206
  document.addEventListener('click', function (event) {{
207
  var link = event.target.closest('a');
208
  event.preventDefault();
209
  if (link && link.href) {{
 
210
  // Parse the URL to extract 'st' and 'et'
211
  const url = new URL(link.href);
212
  const startTime = url.searchParams.get('st');
213
  const endTime = url.searchParams.get('et');
214
  const userId = url.searchParams.get('uid') || "";
 
215
  if (startTime || endTime) {{
216
  let components = url.pathname.split("/");
217
  let callId = components[2];
218
  let recordingSessionId = components[3];
 
219
  let data = {{
220
  startTime: parseInt(startTime, 10),
221
  endTime: parseInt(endTime, 10),
222
  }};
 
223
  console.log("Data to save:", data);
 
224
  // Firebase reference
225
  let reference = ref(
226
  realtimeDB,
227
  `${{rollAccount}}/${{COLLECTIONS.COLLAB_EDIT_LINK}}/${{userId}}/${{callId}}/${{recordingSessionId}}`
228
  );
 
229
  set(reference, data)
230
  .then(() => {{
231
  console.log("Data saved successfully:", data);
 
241
 
242
  js = """function refresh() {
243
  const url = new URL(window.location);
 
244
  if (url.searchParams.get('__theme') !== 'dark') {
245
  url.searchParams.set('__theme', 'dark');
246
  window.location.href = url.href;