kullanıcı avatar denemesi.
This commit is contained in:
+6
-3
@@ -10,6 +10,7 @@ let activeTab = "desktop";
|
||||
|
||||
async function render() {
|
||||
const user = pb.authStore.model;
|
||||
const avatar = pb.users.avatar;
|
||||
|
||||
if (!user) {
|
||||
renderLogin();
|
||||
@@ -47,7 +48,9 @@ async function render() {
|
||||
<button id="navSettings" class="w-full flex items-center gap-3 px-4 py-3 rounded-xl font-medium ${activeTab === "settings" ? "bg-white/10 text-white" : "text-slate-400 hover:text-white"}">⚙️ Ayarlar</button>
|
||||
</nav>
|
||||
</div>
|
||||
<button id="logoutBtn" class="bg-rose-500/20 text-rose-300 py-2 rounded-xl border border-rose-500/30">🚪 Çıkış Yap</button>
|
||||
<button id="profileBtn" class="bg-rose-500/20 text-rose-300 py-2 rounded-xl border border-rose-500/30">
|
||||
<image href= "avatar">
|
||||
</button>
|
||||
</aside>
|
||||
|
||||
<main id="mainContent" class="relative z-20 flex-1 h-screen p-8 flex items-center justify-center">
|
||||
@@ -68,8 +71,8 @@ async function render() {
|
||||
activeTab = "settings";
|
||||
render();
|
||||
});
|
||||
document.getElementById("logoutBtn").addEventListener("click", () => {
|
||||
pb.authStore.clear();
|
||||
document.getElementById("profileBtn").addEventListener("click", () => {
|
||||
activeTab = "profile";
|
||||
render();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user