bug fixes, and performance improvements, and drawer
This commit is contained in:
@@ -127,10 +127,12 @@ const autoRenameTopic = async (topicId: string) => {
|
||||
}
|
||||
|
||||
const cancelAutoRename = async (topicId: string) => {
|
||||
// TODO: make this more optimistic
|
||||
await $fetch(`/api/topic/${topicId}/auto-rename/cancel`, {
|
||||
method: 'POST',
|
||||
const result = await $fetch(`/api/topic/${topicId}/auto-rename/cancel`, {
|
||||
method: "POST",
|
||||
});
|
||||
if (result.ok) {
|
||||
patchTopicLocally(topicId, { renaming: false });
|
||||
}
|
||||
}
|
||||
|
||||
const renameTopicId = ref<string | null>(null);
|
||||
@@ -256,12 +258,13 @@ onMounted(() => {
|
||||
v-model="newTopicName" @keydown.enter="saveRename" @keydown.escape="cancelRename"
|
||||
@blur="saveRename"
|
||||
class="flex-1 bg-transparent border-none outline-none md:text-sm font-medium text-[var(--text-primary)] px-0 min-w-0" />
|
||||
<div v-else-if="topic.renaming" class="flex w-full">
|
||||
<span class="i-svg-spinners-3-dots-fade text-7 md:text-6"></span>
|
||||
<div v-else class="flex items-center gap-2 min-w-0">
|
||||
<span class="md:text-sm font-medium overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{{ topic.name }}
|
||||
</span>
|
||||
<span v-if="topic.renaming" aria-label="Renaming"
|
||||
class="i-svg-spinners-3-dots-fade shrink-0 text-4"></span>
|
||||
</div>
|
||||
<span v-else class="md:text-sm font-medium overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{{ topic.name }}
|
||||
</span>
|
||||
|
||||
<div data-action="toggle-dropdown"
|
||||
class="text-[var(--text-secondary)] shrink-0 w-0 max-w-0 opacity-0 overflow-hidden p-1 max-md:w-auto max-md:max-w-none max-md:opacity-100 flex items-center justify-center rounded-md @hover:bg-[var(--color-hover)] focus-visible:bg-[var(--color-hover)]"
|
||||
|
||||
Reference in New Issue
Block a user