Spaces:
Sleeping
Sleeping
Update agents
Browse files
static/js/apps-hub/sidebar-component.js
CHANGED
|
@@ -1,41 +1,43 @@
|
|
| 1 |
-
// sidebar-component.js
|
| 2 |
-
const SidebarComponent = {
|
| 3 |
-
template: `
|
| 4 |
-
<aside class="ai-sidebar__sidebar">
|
| 5 |
-
<div class="ai-sidebar__title">AI Apps</div>
|
| 6 |
-
<ul class="ai-sidebar__app-list">
|
| 7 |
-
<li v-for="app in apps" :key="app.id" class="ai-sidebar__app-item" @click="navigateToApp(app)">
|
| 8 |
-
<div class="ai-sidebar__app-icon" :style="{ backgroundColor: app.color }">
|
| 9 |
-
<i :class="app.icon"></i>
|
| 10 |
-
</div>
|
| 11 |
-
<span class="ai-sidebar__app-name">{{ app.name }}</span>
|
| 12 |
-
</li>
|
| 13 |
-
</ul>
|
| 14 |
-
<div class="ai-sidebar__footer">
|
| 15 |
-
<a href="/profile" class="ai-sidebar__app-item">
|
| 16 |
-
<div class="ai-sidebar__app-icon" style="backgroundColor: #3f72af">
|
| 17 |
-
<i class="fas fa-user"></i>
|
| 18 |
-
</div>
|
| 19 |
-
<span class="ai-sidebar__app-name">Profile</span>
|
| 20 |
-
</a>
|
| 21 |
-
</div>
|
| 22 |
-
</aside>
|
| 23 |
-
`,
|
| 24 |
-
setup() {
|
| 25 |
-
const apps = Vue.ref([
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
};
|
|
|
|
| 1 |
+
// sidebar-component.js
|
| 2 |
+
const SidebarComponent = {
|
| 3 |
+
template: `
|
| 4 |
+
<aside class="ai-sidebar__sidebar">
|
| 5 |
+
<div class="ai-sidebar__title">AI Apps</div>
|
| 6 |
+
<ul class="ai-sidebar__app-list">
|
| 7 |
+
<li v-for="app in apps" :key="app.id" class="ai-sidebar__app-item" @click="navigateToApp(app)">
|
| 8 |
+
<div class="ai-sidebar__app-icon" :style="{ backgroundColor: app.color }">
|
| 9 |
+
<i :class="app.icon"></i>
|
| 10 |
+
</div>
|
| 11 |
+
<span class="ai-sidebar__app-name">{{ app.name }}</span>
|
| 12 |
+
</li>
|
| 13 |
+
</ul>
|
| 14 |
+
<div class="ai-sidebar__footer">
|
| 15 |
+
<a href="/profile" class="ai-sidebar__app-item">
|
| 16 |
+
<div class="ai-sidebar__app-icon" style="backgroundColor: #3f72af">
|
| 17 |
+
<i class="fas fa-user"></i>
|
| 18 |
+
</div>
|
| 19 |
+
<span class="ai-sidebar__app-name">Profile</span>
|
| 20 |
+
</a>
|
| 21 |
+
</div>
|
| 22 |
+
</aside>
|
| 23 |
+
`,
|
| 24 |
+
setup() {
|
| 25 |
+
const apps = Vue.ref([
|
| 26 |
+
{ id: 1, name: 'iResearcher', icon: 'fas fa-flask', color: '#6C5CE7', url: '/research-pro' },
|
| 27 |
+
{ id: 2, name: 'ArticleCrafter', icon: 'fas fa-pen-fancy', color: '#2ECC71', url: '/article-writer' },
|
| 28 |
+
{ id: 3, name: 'FollowUpPro', icon: 'fas fa-comments', color: '#3498DB', url: '/followup-agent' },
|
| 29 |
+
{ id: 4, name: 'DigiYatra Assistant', icon: 'fas fa-plane', color: '#E74C3C', url: '/digiyatra-assistant' },
|
| 30 |
+
{ id: 5, name: 'FileConverter', icon: 'fas fa-file-export', color: '#F39C12', url: '/file-convert' },
|
| 31 |
+
|
| 32 |
+
]);
|
| 33 |
+
|
| 34 |
+
const navigateToApp = (app) => {
|
| 35 |
+
window.location.href = app.url;
|
| 36 |
+
};
|
| 37 |
+
|
| 38 |
+
return {
|
| 39 |
+
apps,
|
| 40 |
+
navigateToApp
|
| 41 |
+
};
|
| 42 |
+
}
|
| 43 |
};
|