better drawer

This commit is contained in:
Emily
2024-12-19 16:46:03 +01:00
parent 3f26f1ab68
commit 7009a0ad02
17 changed files with 108 additions and 125 deletions

View File

@@ -222,7 +222,7 @@ async function deleteChat(chat_id: string) {
await reloadChatsList();
}
const { visible: pricingDrawerVisible } = usePricingDrawer()
const { showDrawer } = useDrawer();
async function clearAllChats() {
@@ -386,7 +386,7 @@ async function clearAllChats() {
<div class="manrope font-semibold text-text-dirty"> {{ chatsRemaining }} remaining requests
</div>
</div>
<LyxUiButton type="primary" class="text-[.9rem] text-center " @click="pricingDrawerVisible = true">
<LyxUiButton type="primary" class="text-[.9rem] text-center " @click="showDrawer('PRICING')">
Upgrade
</LyxUiButton>
</div>

View File

@@ -70,10 +70,10 @@ const showWarning = computed(() => {
})
const pricingDrawer = usePricingDrawer();
const { showDrawer } = useDrawer();
function goToUpgrade() {
pricingDrawer.visible.value = true;
showDrawer('PRICING');
}
</script>

View File

@@ -77,10 +77,10 @@ const showWarning = computed(() => {
return options.indexOf(selectedTimeFrom.value) > 1
})
const pricingDrawer = usePricingDrawer();
const { showDrawer } = useDrawer();
function goToUpgrade() {
pricingDrawer.visible.value = true;
showDrawer('PRICING');
}
</script>

View File

@@ -32,12 +32,18 @@ const firstInteraction = useFetch<boolean>('/api/project/first_interaction', {
const showDashboard = computed(() => project.value && firstInteraction.data.value);
const selfhosted = useSelfhosted();
const { showDrawer } = useDrawer();
</script>
<template>
<div class="dashboard w-full h-full overflow-y-auto overflow-x-hidden pb-[7rem] md:pt-4 lg:pt-0">
<div @click="showDrawer('DOCS','!w-[30vw] !min-w-[30vw]')">
test
</div>
<div v-if="showDashboard">
<div class="w-full px-4 py-2 gap-2 flex flex-col">
@@ -85,7 +91,7 @@ const selfhosted = useSelfhosted();
<BarCardOperatingSystems :key="refreshKey"></BarCardOperatingSystems>
</div>
</div>
</div>
</div>
</div>