mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
refac: styling
This commit is contained in:
parent
248fd10406
commit
40a715be89
2 changed files with 22 additions and 13 deletions
|
|
@ -220,12 +220,12 @@
|
|||
{/each}
|
||||
</ol>
|
||||
{:else}
|
||||
<ul dir="auto">
|
||||
<ul dir="auto" class="">
|
||||
{#each token.items as item, itemIdx}
|
||||
<li class="text-start">
|
||||
<li class="text-start {item?.task ? 'flex -translate-x-7 gap-3.5 ' : ''}">
|
||||
{#if item?.task}
|
||||
<input
|
||||
class=" translate-y-[1px] -translate-x-1"
|
||||
class=""
|
||||
type="checkbox"
|
||||
checked={item.checked}
|
||||
on:change={(e) => {
|
||||
|
|
@ -239,15 +239,25 @@
|
|||
});
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<svelte:self
|
||||
id={`${id}-${tokenIdx}-${itemIdx}`}
|
||||
tokens={item.tokens}
|
||||
top={token.loose}
|
||||
{onTaskClick}
|
||||
{onSourceClick}
|
||||
/>
|
||||
<div>
|
||||
<svelte:self
|
||||
id={`${id}-${tokenIdx}-${itemIdx}`}
|
||||
tokens={item.tokens}
|
||||
top={token.loose}
|
||||
{onTaskClick}
|
||||
{onSourceClick}
|
||||
/>
|
||||
</div>
|
||||
{:else}
|
||||
<svelte:self
|
||||
id={`${id}-${tokenIdx}-${itemIdx}`}
|
||||
tokens={item.tokens}
|
||||
top={token.loose}
|
||||
{onTaskClick}
|
||||
{onSourceClick}
|
||||
/>
|
||||
{/if}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -484,7 +484,6 @@
|
|||
const htmlValue = editor.getHTML();
|
||||
const jsonValue = editor.getJSON();
|
||||
|
||||
console.log(htmlValue, jsonValue);
|
||||
let mdValue = turndownService
|
||||
.turndown(
|
||||
htmlValue
|
||||
|
|
@ -578,7 +577,7 @@
|
|||
}
|
||||
|
||||
const isInCodeBlock = isInside(['codeBlock']);
|
||||
const isInList = isInside(['listItem', 'bulletList', 'orderedList']);
|
||||
const isInList = isInside(['listItem', 'bulletList', 'orderedList', 'taskList']);
|
||||
const isInHeading = isInside(['heading']);
|
||||
|
||||
if (isInCodeBlock || isInList || isInHeading) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue