feat: add cut-after button in HypaV3 summary header

This commit is contained in:
Bo26fhmC5M
2025-01-19 12:23:09 +09:00
parent 17b9e28041
commit 9c052f9a1d

View File

@@ -6,6 +6,7 @@
LanguagesIcon, LanguagesIcon,
StarIcon, StarIcon,
RefreshCw, RefreshCw,
ScissorsLineDashed,
CheckIcon, CheckIcon,
} from "lucide-svelte"; } from "lucide-svelte";
import { tick } from "svelte"; import { tick } from "svelte";
@@ -523,6 +524,25 @@
> >
<RefreshCw size={16} /> <RefreshCw size={16} />
</button> </button>
<!-- Delete After Button -->
<button
class="p-2 text-zinc-400 hover:text-zinc-200 hover:text-rose-300 transition-colors"
onclick={async () => {
if (
await alertConfirmTwice(
"Delete all summaries after this one?",
"This action cannot be undone. Are you really sure?"
)
) {
hypaV3DataState.summaries.splice(i + 1);
}
showHypaV3Alert();
}}
>
<ScissorsLineDashed size={16} />
</button>
</div> </div>
</div> </div>
@@ -710,6 +730,10 @@
{nextMessage.data} {nextMessage.data}
</div> </div>
</div> </div>
{:else if !getFirstMessage()}
<div class="text-sm text-red-500">
WARN: Selected first message is null
</div>
{/if} {/if}
{/if} {/if}
</div> </div>