瀏覽代碼

refac: styling

Timothy J. Baek 8 月之前
父節點
當前提交
c9505531fd

+ 1 - 0
src/lib/components/chat/Messages.svelte

@@ -363,6 +363,7 @@
 								{#key message.parentId}
 									<MultiResponseMessages
 										bind:history
+										isLastMessage={messageIdx + 1 === messages.length}
 										{messages}
 										{readOnly}
 										{chatId}

+ 3 - 2
src/lib/components/chat/Messages/MultiResponseMessages.svelte

@@ -15,6 +15,7 @@
 	export let messageIdx;
 
 	export let parentMessage;
+	export let isLastMessage;
 
 	export let readOnly = false;
 
@@ -181,9 +182,9 @@
 		{/key}
 	</div>
 
-	{#if !readOnly}
+	{#if !readOnly && isLastMessage}
 		{#if !parentMessage?.childrenIds.map((id) => history.messages[id]).find((m) => !m.done)}
-			<div class=" flex justify-end overflow-x-auto buttons text-gray-500 dark:text-gray-400 mt-1">
+			<div class=" flex justify-end overflow-x-auto buttons text-gray-600 dark:text-gray-500 mt-1">
 				<Tooltip content={$i18n.t('Merge Responses')} placement="bottom">
 					<button
 						type="button"

+ 1 - 1
src/lib/components/chat/Messages/ResponseMessage.svelte

@@ -301,7 +301,7 @@
 
 				{#if message.timestamp}
 					<span
-						class=" self-center invisible group-hover:visible text-gray-400 text-xs font-medium uppercase"
+						class=" self-center invisible group-hover:visible text-gray-400 text-xs font-medium uppercase ml-0.5 -mt-0.5"
 					>
 						{dayjs(message.timestamp * 1000).format($i18n.t('h:mm a'))}
 					</span>

+ 1 - 1
src/lib/components/chat/Messages/UserMessage.svelte

@@ -84,7 +84,7 @@
 
 					{#if message.timestamp}
 						<span
-							class=" invisible group-hover:visible text-gray-400 text-xs font-medium uppercase"
+							class=" invisible group-hover:visible text-gray-400 text-xs font-medium uppercase ml-0.5 -mt-0.5"
 						>
 							{dayjs(message.timestamp * 1000).format($i18n.t('h:mm a'))}
 						</span>