Selaa lähdekoodia

feat: edit response message

Timothy J. Baek 1 vuosi sitten
vanhempi
commit
64b84c71c3
1 muutettua tiedostoa jossa 23 lisäystä ja 0 poistoa
  1. 23 0
      src/lib/components/chat/Messages.svelte

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

@@ -649,6 +649,29 @@
 														</button>
 													</div>
 												{/if}
+
+												<button
+													class="invisible group-hover:visible p-1 rounded dark:hover:bg-gray-800 transition"
+													on:click={() => {
+														editMessageHandler(message.id);
+													}}
+												>
+													<svg
+														xmlns="http://www.w3.org/2000/svg"
+														fill="none"
+														viewBox="0 0 24 24"
+														stroke-width="1.5"
+														stroke="currentColor"
+														class="w-4 h-4"
+													>
+														<path
+															stroke-linecap="round"
+															stroke-linejoin="round"
+															d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125"
+														/>
+													</svg>
+												</button>
+
 												<button
 													class="{messageIdx + 1 === messages.length
 														? 'visible'