Skip to content

Commit

Permalink
feat(kb): Delete document
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Aug 1, 2024
1 parent 52cfbfe commit 56da0ba
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 83 deletions.
9 changes: 9 additions & 0 deletions public/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions public/icons/delete.svg

This file was deleted.

5 changes: 0 additions & 5 deletions public/icons/delete_lighten.svg

This file was deleted.

29 changes: 0 additions & 29 deletions public/icons/svg/delete.svg

This file was deleted.

5 changes: 0 additions & 5 deletions public/icons/svg/settings.svg

This file was deleted.

5 changes: 0 additions & 5 deletions public/icons/svg/settings_lighten.svg

This file was deleted.

23 changes: 8 additions & 15 deletions src/components/ChatsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<q-list>
<q-item v-close-popup clickable @click="openChatSettings(chat)">
<q-item-section avatar>
<q-avatar :icon="`img:icons/svg/settings${$q.dark.mode ? '_lighten' : ''}.svg`" />
<ltai-icon class="tw-mx-auto" name="svguse:icons.svg#settings" />
</q-item-section>
<q-item-section>
<q-item-label>Settings</q-item-label>
Expand All @@ -43,7 +43,7 @@

<q-item v-close-popup clickable @click="deleteChatConfirm(chat.id)">
<q-item-section avatar>
<q-avatar :icon="`img:icons/delete${$q.dark.mode ? '_lighten' : ''}.svg`" />
<ltai-icon class="tw-mx-auto" name="svguse:icons.svg#delete" />
</q-item-section>
<q-item-section>
<q-item-label>Delete</q-item-label>
Expand All @@ -54,19 +54,11 @@
</q-item-section>
</q-item>
</q-scroll-area>
<q-dialog v-model="deleteChatConfirmAction">
<q-card>
<q-card-section class="row items-center">
<q-avatar color="primary" icon="delete" text-color="white" />
<span class="q-ml-xl">Are you sure you want to delete the current chat conversation?</span>
</q-card-section>

<q-card-actions align="right">
<q-btn v-close-popup class="border-primary-highlight" label="Cancel" rounded text-color="dark-mode-text" />
<q-btn v-close-popup color="primary" label="Confirm" rounded @click="deleteChat(deleteChatId!)" />
</q-card-actions>
</q-card>
</q-dialog>
<ltai-dialog v-model="deleteChatConfirmAction" title="Delete chat" @save="deleteChat(deleteChatId!)">
<q-card-section class="row">
<span>Are you sure you want to delete the current chat conversation?</span>
</q-card-section>
</ltai-dialog>
<chat-settings-dialog v-model="showChatSettings" :chat="settingsChat" @save-chat="saveChatSettings" />
</q-list>
</template>
Expand All @@ -79,6 +71,7 @@ import { nextTick, ref } from 'vue';
import ChatSettingsDialog from 'components/dialog/ChatSettingsDialog.vue';
import { Chat } from 'src/types/chats';
import LtaiIcon from 'components/libertai/LtaiIcon.vue';
import LtaiDialog from 'components/libertai/LtaiDialog.vue';
const chatsStore = useChatsStore();
const route = useRoute();
Expand Down
4 changes: 1 addition & 3 deletions src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<q-btn aria-label="Menu" color="primary" dense flat icon="menu" round @click="toggleLeftDrawer" />

<q-btn class="tw-p-1" flat @click="showUserSettingsDialog = true">
<q-icon size="xs">
<img :src="`icons/svg/settings${$q.dark.mode ? '_lighten' : ''}.svg`" alt="settings" />
</q-icon>
<ltai-icon name="svguse:icons.svg#settings" size="xs" />
</q-btn>
<user-settings-dialog v-model="showUserSettingsDialog" />

Expand Down
Loading

0 comments on commit 56da0ba

Please sign in to comment.