chore: community page fixes.
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
question?: CommunityQuestionSuccess['data'] | null;
|
question?: CommunityQuestionSuccess['data'] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { question, backHref }: Props = $props();
|
let { slug, question, backHref }: Props = $props();
|
||||||
|
|
||||||
let commentEditor: TiptapEditor | undefined = $state();
|
let commentEditor: TiptapEditor | undefined = $state();
|
||||||
let isValidAnswer = false; // V2 allow admin mark an answer as accepted
|
let isValidAnswer = false; // V2 allow admin mark an answer as accepted
|
||||||
@@ -54,6 +54,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let isQuestionFetched = $state(false);
|
||||||
|
$effect(() => {
|
||||||
|
if (question || !slug || isQuestionFetched) return;
|
||||||
|
|
||||||
|
communityApi.fetchCommunityQuestion({ slug });
|
||||||
|
isQuestionFetched = true;
|
||||||
|
});
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (!$profile.id || !$currentOrg.id) return;
|
if (!$profile.id || !$currentOrg.id) return;
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let isQuestionsFetched = $state(false);
|
||||||
|
$effect(() => {
|
||||||
|
if (questions || !$currentOrg.id || isQuestionsFetched) return;
|
||||||
|
|
||||||
|
communityApi.fetchCommunityQuestions({ orgId: $currentOrg.id });
|
||||||
|
isQuestionsFetched = true;
|
||||||
|
});
|
||||||
|
|
||||||
let isCoursesFetched = $state(false);
|
let isCoursesFetched = $state(false);
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (!$profile.id || !$currentOrg.id || isCoursesFetched) return;
|
if (!$profile.id || !$currentOrg.id || isCoursesFetched) return;
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Netværksfejl. Tjek venligst din forbindelse og prøv igen.",
|
"error_network": "Netværksfejl. Tjek venligst din forbindelse og prøv igen.",
|
||||||
"context_usage_tooltip": "{used} / {max} tokens brugt",
|
"context_usage_tooltip": "{used} / {max} tokens brugt",
|
||||||
"context_full_title": "Kontekstvinduet er fuldt",
|
"context_full_title": "Kontekstvinduet er fuldt",
|
||||||
"context_full_description": "Denne samtale har nået sin hukommelsesgrænse. Komprimer den for at fortsætte i denne chat, eller start en ny.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Kompakt samtale",
|
"context_full_compact": "Kompakt samtale",
|
||||||
"context_full_compacting": "Komprimerer...",
|
"context_full_compacting": "Komprimerer...",
|
||||||
"context_full_new_chat": "Start ny chat med resumé",
|
"context_full_new_chat": "Start ny chat med resumé",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
|
"error_network": "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
|
||||||
"context_usage_tooltip": "{used} / {max} Token verwendet",
|
"context_usage_tooltip": "{used} / {max} Token verwendet",
|
||||||
"context_full_title": "Das Kontextfenster ist voll",
|
"context_full_title": "Das Kontextfenster ist voll",
|
||||||
"context_full_description": "Diese Konversation hat ihr Speicherlimit erreicht. Komprimieren Sie es, um in diesem Chat fortzufahren, oder starten Sie einen neuen.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Kompaktes Gespräch",
|
"context_full_compact": "Kompaktes Gespräch",
|
||||||
"context_full_compacting": "Verdichten...",
|
"context_full_compacting": "Verdichten...",
|
||||||
"context_full_new_chat": "Neuen Chat mit Zusammenfassung starten",
|
"context_full_new_chat": "Neuen Chat mit Zusammenfassung starten",
|
||||||
|
|||||||
@@ -4366,7 +4366,7 @@
|
|||||||
"error_network": "Network error. Please check your connection and try again.",
|
"error_network": "Network error. Please check your connection and try again.",
|
||||||
"context_usage_tooltip": "{used} / {max} tokens used",
|
"context_usage_tooltip": "{used} / {max} tokens used",
|
||||||
"context_full_title": "Context window is full",
|
"context_full_title": "Context window is full",
|
||||||
"context_full_description": "This conversation has reached its memory limit. Compact it to keep going in this chat, or start a new one.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Compact conversation",
|
"context_full_compact": "Compact conversation",
|
||||||
"context_full_compacting": "Compacting...",
|
"context_full_compacting": "Compacting...",
|
||||||
"context_full_new_chat": "Start new chat with summary",
|
"context_full_new_chat": "Start new chat with summary",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Error de red. Por favor verifique su conexión e inténtelo nuevamente.",
|
"error_network": "Error de red. Por favor verifique su conexión e inténtelo nuevamente.",
|
||||||
"context_usage_tooltip": "{usados} / {max} tokens usados",
|
"context_usage_tooltip": "{usados} / {max} tokens usados",
|
||||||
"context_full_title": "La ventana de contexto está llena",
|
"context_full_title": "La ventana de contexto está llena",
|
||||||
"context_full_description": "Esta conversación ha alcanzado su límite de memoria. Compactarlo para continuar en este chat o iniciar uno nuevo.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Conversación compacta",
|
"context_full_compact": "Conversación compacta",
|
||||||
"context_full_compacting": "Compactando...",
|
"context_full_compacting": "Compactando...",
|
||||||
"context_full_new_chat": "Iniciar nuevo chat con resumen",
|
"context_full_new_chat": "Iniciar nuevo chat con resumen",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Erreur réseau. Veuillez vérifier votre connexion et réessayer.",
|
"error_network": "Erreur réseau. Veuillez vérifier votre connexion et réessayer.",
|
||||||
"context_usage_tooltip": "{utilisé} / {max} jetons utilisés",
|
"context_usage_tooltip": "{utilisé} / {max} jetons utilisés",
|
||||||
"context_full_title": "La fenêtre contextuelle est pleine",
|
"context_full_title": "La fenêtre contextuelle est pleine",
|
||||||
"context_full_description": "Cette conversation a atteint sa limite de mémoire. Compactez-le pour continuer dans cette discussion ou démarrez-en une nouvelle.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Conversation compacte",
|
"context_full_compact": "Conversation compacte",
|
||||||
"context_full_compacting": "Compactage...",
|
"context_full_compacting": "Compactage...",
|
||||||
"context_full_new_chat": "Démarrer une nouvelle discussion avec résumé",
|
"context_full_new_chat": "Démarrer une nouvelle discussion avec résumé",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "नेटवर्क त्रुटि। अपने कनेक्शन की जांच करें और पुन: प्रयास करें।",
|
"error_network": "नेटवर्क त्रुटि। अपने कनेक्शन की जांच करें और पुन: प्रयास करें।",
|
||||||
"context_usage_tooltip": "{प्रयुक्त} / {अधिकतम} टोकन का उपयोग किया गया",
|
"context_usage_tooltip": "{प्रयुक्त} / {अधिकतम} टोकन का उपयोग किया गया",
|
||||||
"context_full_title": "प्रसंग विंडो भरी हुई है",
|
"context_full_title": "प्रसंग विंडो भरी हुई है",
|
||||||
"context_full_description": "यह बातचीत अपनी स्मृति सीमा तक पहुंच गई है. इस चैट को जारी रखने के लिए, या एक नई शुरुआत करने के लिए इसे संक्षिप्त करें।",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "संक्षिप्त बातचीत",
|
"context_full_compact": "संक्षिप्त बातचीत",
|
||||||
"context_full_compacting": "संघनन...",
|
"context_full_compacting": "संघनन...",
|
||||||
"context_full_new_chat": "सारांश के साथ नई चैट प्रारंभ करें",
|
"context_full_new_chat": "सारांश के साथ नई चैट प्रारंभ करें",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Błąd sieci. Sprawdź połączenie i spróbuj ponownie.",
|
"error_network": "Błąd sieci. Sprawdź połączenie i spróbuj ponownie.",
|
||||||
"context_usage_tooltip": "Wykorzystano {used} / {max} tokenów",
|
"context_usage_tooltip": "Wykorzystano {used} / {max} tokenów",
|
||||||
"context_full_title": "Okno kontekstowe jest pełne",
|
"context_full_title": "Okno kontekstowe jest pełne",
|
||||||
"context_full_description": "W tej rozmowie osiągnięto limit pamięci. Kompaktuj go, aby kontynuować udział w tym czacie, lub rozpocznij nowy.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Kompaktowa rozmowa",
|
"context_full_compact": "Kompaktowa rozmowa",
|
||||||
"context_full_compacting": "Zagęszczanie...",
|
"context_full_compacting": "Zagęszczanie...",
|
||||||
"context_full_new_chat": "Rozpocznij nowy czat z podsumowaniem",
|
"context_full_new_chat": "Rozpocznij nowy czat z podsumowaniem",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Erro de rede. Verifique sua conexão e tente novamente.",
|
"error_network": "Erro de rede. Verifique sua conexão e tente novamente.",
|
||||||
"context_usage_tooltip": "{usados} / {max} tokens usados",
|
"context_usage_tooltip": "{usados} / {max} tokens usados",
|
||||||
"context_full_title": "A janela de contexto está cheia",
|
"context_full_title": "A janela de contexto está cheia",
|
||||||
"context_full_description": "Esta conversa atingiu o limite de memória. Compacte-o para continuar neste bate-papo ou iniciar um novo.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Conversa compacta",
|
"context_full_compact": "Conversa compacta",
|
||||||
"context_full_compacting": "Compactando...",
|
"context_full_compacting": "Compactando...",
|
||||||
"context_full_new_chat": "Iniciar novo bate-papo com resumo",
|
"context_full_new_chat": "Iniciar novo bate-papo com resumo",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Ошибка сети. Пожалуйста, проверьте подключение и повторите попытку.",
|
"error_network": "Ошибка сети. Пожалуйста, проверьте подключение и повторите попытку.",
|
||||||
"context_usage_tooltip": "{used} / {max} использовано токенов",
|
"context_usage_tooltip": "{used} / {max} использовано токенов",
|
||||||
"context_full_title": "Контекстное окно заполнено",
|
"context_full_title": "Контекстное окно заполнено",
|
||||||
"context_full_description": "Этот разговор достиг предела памяти. Сожмите его, чтобы продолжить общение в этом чате, или начните новый.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Компактный разговор",
|
"context_full_compact": "Компактный разговор",
|
||||||
"context_full_compacting": "Уплотнение...",
|
"context_full_compacting": "Уплотнение...",
|
||||||
"context_full_new_chat": "Начать новый чат с кратким описанием",
|
"context_full_new_chat": "Начать новый чат с кратким описанием",
|
||||||
|
|||||||
@@ -3941,7 +3941,7 @@
|
|||||||
"error_network": "Lỗi mạng. Vui lòng kiểm tra kết nối của bạn và thử lại.",
|
"error_network": "Lỗi mạng. Vui lòng kiểm tra kết nối của bạn và thử lại.",
|
||||||
"context_usage_tooltip": "Đã sử dụng mã thông báo {used} / {max}",
|
"context_usage_tooltip": "Đã sử dụng mã thông báo {used} / {max}",
|
||||||
"context_full_title": "Cửa sổ ngữ cảnh đã đầy",
|
"context_full_title": "Cửa sổ ngữ cảnh đã đầy",
|
||||||
"context_full_description": "Cuộc trò chuyện này đã đạt đến giới hạn bộ nhớ. Hãy thu gọn nó để tiếp tục tham gia cuộc trò chuyện này hoặc bắt đầu một cuộc trò chuyện mới.",
|
"context_full_description": "The assistant will summarize older messages automatically so you can keep working in this chat.",
|
||||||
"context_full_compact": "Cuộc trò chuyện nhỏ gọn",
|
"context_full_compact": "Cuộc trò chuyện nhỏ gọn",
|
||||||
"context_full_compacting": "Đang nén...",
|
"context_full_compacting": "Đang nén...",
|
||||||
"context_full_new_chat": "Bắt đầu cuộc trò chuyện mới với bản tóm tắt",
|
"context_full_new_chat": "Bắt đầu cuộc trò chuyện mới với bản tóm tắt",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
data-slot="select-trigger"
|
data-slot="select-trigger"
|
||||||
data-size={size}
|
data-size={size}
|
||||||
class={cn(
|
class={cn(
|
||||||
"ui:border-input ui:data-placeholder:text-muted-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:dark:bg-input/30 ui:dark:hover:bg-input/50 ui:shadow-xs ui:flex ui:w-fit ui:select-none ui:items-center ui:justify-between ui:gap-2 ui:whitespace-nowrap ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-2 ui:text-sm ui:outline-none ui:transition-[color,box-shadow] ui:focus-visible:ring-[3px] ui:data-disabled:cursor-not-allowed ui:data-disabled:opacity-50 ui:data-[size=default]:h-9 ui:data-[size=sm]:h-8 ui:**:data-[slot=select-value]:line-clamp-1 ui:**:data-[slot=select-value]:flex ui:**:data-[slot=select-value]:items-center ui:**:data-[slot=select-value]:gap-2 ui:[&_svg:not([class*='size-'])]:size-4 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",
|
"ui:border-input ui:data-placeholder:text-muted-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:focus-visible:border-ring ui:focus-visible:ring-ring/50 ui:aria-invalid:ring-destructive/20 ui:dark:aria-invalid:ring-destructive/40 ui:aria-invalid:border-destructive ui:dark:bg-input/30 ui:dark:hover:bg-input/50 ui:shadow-xs ui:flex ui:w-fit ui:max-w-full ui:min-w-0 ui:select-none ui:items-center ui:justify-between ui:gap-2 ui:whitespace-nowrap ui:rounded-md ui:border ui:bg-transparent ui:px-3 ui:py-2 ui:text-sm ui:outline-none ui:transition-[color,box-shadow] ui:focus-visible:ring-[3px] ui:data-disabled:cursor-not-allowed ui:data-disabled:opacity-50 ui:data-[size=default]:h-9 ui:data-[size=sm]:h-8 ui:**:data-[slot=select-value]:line-clamp-1 ui:**:data-[slot=select-value]:flex ui:**:data-[slot=select-value]:items-center ui:**:data-[slot=select-value]:gap-2 ui:[&_svg:not([class*='size-'])]:size-4 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...restProps}
|
{...restProps}
|
||||||
|
|||||||
Reference in New Issue
Block a user