Refactor the client to implement a channel navbar #76
1 changed files with 12 additions and 18 deletions
|
@ -55,7 +55,18 @@ definePageMeta({
|
|||
});
|
||||
|
||||
const loading = useState("loading", () => false);
|
||||
const navbar = useState<INavbar>("navbar")
|
||||
const navbar = useState<INavbar>("navbar", () => {
|
||||
return {
|
||||
clientItems: [
|
||||
twig marked this conversation as resolved
Outdated
|
||||
{
|
||||
title: "Source",
|
||||
icon: "lucide:code-xml",
|
||||
callback: () => { open("https://git.gorb.app/gorb/frontend") }
|
||||
}
|
||||
],
|
||||
channelItems: [] // set by the channel
|
||||
}
|
||||
})
|
||||
|
||||
const createButtonContainer = ref<HTMLButtonElement>();
|
||||
|
||||
|
@ -150,23 +161,6 @@ const options = [
|
|||
|
||||
const guilds = await api.fetchMyGuilds();
|
||||
|
||||
onMounted(() => {
|
||||
if (!navbar.value) {
|
||||
const sourceLinkItem: NavbarItem = {
|
||||
title: "Source",
|
||||
icon: "lucide:code-xml",
|
||||
callback: () => { open("https://git.gorb.app/gorb/frontend") }
|
||||
}
|
||||
|
||||
navbar.value = {
|
||||
clientItems: [
|
||||
sourceLinkItem
|
||||
],
|
||||
channelItems: [] // set by the channel
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function createDropdown() {
|
||||
const dropdown = h(GuildDropdown, { options });
|
||||
const div = document.createElement("div");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue
This should be an anchor element, not a button
disagree, i'd like to put an inbox here, that would be a popup, not a link
Right but I think all clickable elements that lead you to an external site should be anchor elements. Here I'm specifically talking about the source code element.
sure, i'm reworking it anyways