Refactor the client to implement a channel navbar #76
5 changed files with 11 additions and 11 deletions
|
@ -31,9 +31,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { NavbarInterface, NavbarItem } from '~/types/interfaces';
|
||||
import type { INavbar, NavbarItem } from '~/types/interfaces';
|
||||
|
||||
const props = defineProps<NavbarInterface>();
|
||||
const props = defineProps<INavbar>();
|
||||
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const defaultIcon = `${runtimeConfig.app.baseURL}/icon.svg`
|
||||
|
|
|
@ -48,14 +48,14 @@ import Loading from '~/components/Popups/Loading.vue';
|
|||
import Button from '~/components/UserInterface/Button.vue';
|
||||
import Navbar from '~/components/UserInterface/Navbar.vue';
|
||||
import VerticalSpacer from '~/components/UserInterface/VerticalSpacer.vue';
|
||||
import type { GuildResponse, NavbarInterface, NavbarItem } from '~/types/interfaces';
|
||||
import type { GuildResponse, INavbar, NavbarItem } from '~/types/interfaces';
|
||||
|
||||
definePageMeta({
|
||||
keepalive: true
|
||||
});
|
||||
|
||||
const loading = useState("loading", () => false);
|
||||
const navbar = useState<NavbarInterface>("navbar")
|
||||
const navbar = useState<INavbar>("navbar")
|
||||
|
||||
const createButtonContainer = ref<HTMLButtonElement>();
|
||||
|
||||
|
@ -163,7 +163,7 @@ onMounted(() => {
|
|||
helpItem
|
||||
],
|
||||
channelItems: [] // set by the channel
|
||||
} as NavbarInterface
|
||||
} as INavbar
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@ import ChannelEntry from "~/components/Guild/ChannelEntry.vue";
|
|||
import GuildOptionsMenu from "~/components/Guild/GuildOptionsMenu.vue";
|
||||
import MemberEntry from "~/components/Guild/MemberEntry.vue";
|
||||
import ResizableSidebar from "~/components/UserInterface/ResizableSidebar.vue";
|
||||
import type { ChannelResponse, GuildMemberResponse, GuildResponse, NavbarInterface } from "~/types/interfaces";
|
||||
import type { ChannelResponse, GuildMemberResponse, GuildResponse, INavbar } from "~/types/interfaces";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const loading = useState("loading");
|
||||
const navbar = useState<NavbarInterface>("navbar");
|
||||
const navbar = useState<INavbar>("navbar");
|
||||
|
||||
const channelUrlPath = `channels/${route.params.channelId}`;
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ export interface NavbarItem {
|
|||
callback: (...args: any[]) => any;
|
||||
}
|
||||
|
||||
export interface NavbarInterface {
|
||||
export interface INavbar {
|
||||
clientItems?: NavbarItem[]
|
||||
channelItems?: NavbarItem[] // search bar will require some changes
|
||||
contextName?: string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { NavbarInterface, NavbarOptions } from "~/types/interfaces";
|
||||
import type { INavbar, NavbarOptions } from "~/types/interfaces";
|
||||
|
||||
const navbar = useState<NavbarInterface>("navbar")
|
||||
const navbar = useState<INavbar>("navbar")
|
||||
|
||||
export default async (options: NavbarOptions) => {
|
||||
await nextTick()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue