Spaces:
Sleeping
Sleeping
Update templates/apps-hub/profile.html
Browse files- templates/apps-hub/profile.html +54 -53
templates/apps-hub/profile.html
CHANGED
|
@@ -1,54 +1,55 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Profile</title>
|
| 7 |
-
<script src="https://cdn.jsdelivr.net/npm/appwrite@15.0.0"></script>
|
| 8 |
-
<script src="/js/auth.js"></script>
|
| 9 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
| 10 |
-
<link rel="stylesheet" href="/
|
| 11 |
-
<link rel="stylesheet" href="/css/
|
| 12 |
-
<
|
| 13 |
-
<script src="/
|
| 14 |
-
</
|
| 15 |
-
<
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
<
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
<
|
| 22 |
-
<
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
<script>
|
| 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 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Profile</title>
|
| 7 |
+
<script src="https://cdn.jsdelivr.net/npm/appwrite@15.0.0"></script>
|
| 8 |
+
<script src="/js/auth.js"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
| 11 |
+
<link rel="stylesheet" href="/css/ai-sidebar.css">
|
| 12 |
+
<link rel="stylesheet" href="/css/profile-page.css">
|
| 13 |
+
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
| 14 |
+
<script src="/js/sidebar-component.js"></script>
|
| 15 |
+
</head>
|
| 16 |
+
<body>
|
| 17 |
+
<div id="app" class="ai-sidebar__container">
|
| 18 |
+
<sidebar-component></sidebar-component>
|
| 19 |
+
<main class="ai-sidebar__content">
|
| 20 |
+
<div class="profile-page__container">
|
| 21 |
+
<h1 class="profile-page__title">Profile</h1>
|
| 22 |
+
<div id="profilePageInfo" class="profile-page__info"></div>
|
| 23 |
+
<button @click="handleLogout" class="profile-page__logout-btn">Logout</button>
|
| 24 |
+
</div>
|
| 25 |
+
</main>
|
| 26 |
+
</div>
|
| 27 |
+
|
| 28 |
+
<script src="/js/profile-page.js"></script>
|
| 29 |
+
<script>
|
| 30 |
+
const { createApp } = Vue;
|
| 31 |
+
|
| 32 |
+
const app = createApp({
|
| 33 |
+
components: {
|
| 34 |
+
'sidebar-component': SidebarComponent
|
| 35 |
+
},
|
| 36 |
+
methods: {
|
| 37 |
+
async checkProfileAuthentication() {
|
| 38 |
+
const session = await checkAuth();
|
| 39 |
+
if (!session) {
|
| 40 |
+
redirectToLogin();
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
handleLogout() {
|
| 44 |
+
logout();
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
mounted() {
|
| 48 |
+
this.checkProfileAuthentication();
|
| 49 |
+
}
|
| 50 |
+
});
|
| 51 |
+
|
| 52 |
+
app.mount('#app');
|
| 53 |
+
</script>
|
| 54 |
+
</body>
|
| 55 |
</html>
|