mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 00:02:23 +00:00
fix: x overflow scroll + add clear history btn (#2641)
This commit is contained in:
@@ -81,3 +81,17 @@
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
@layer utilities {
|
||||
@variants responsive {
|
||||
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide scrollbar for IE, Edge and Firefox */
|
||||
.no-scrollbar {
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,11 @@
|
||||
}
|
||||
localStorage.setItem('prompts-' + lang, JSON.stringify(promptHistory))
|
||||
}
|
||||
|
||||
function clearPromptHistory() {
|
||||
promptHistory = []
|
||||
localStorage.setItem('prompts-' + lang, JSON.stringify(promptHistory))
|
||||
}
|
||||
$: lang && getPromptHistory()
|
||||
|
||||
$: $generatedCode && updateScroll()
|
||||
@@ -342,13 +347,17 @@
|
||||
<Button
|
||||
size="xs2"
|
||||
color="light"
|
||||
btnClasses="justify-start"
|
||||
startIcon={{ icon: HistoryIcon }}
|
||||
btnClasses="justify-start overflow-x-scroll no-scrollbar"
|
||||
startIcon={{ icon: HistoryIcon, classes: 'shrink-0' }}
|
||||
on:click={() => {
|
||||
funcDesc = p
|
||||
}}>{p}</Button
|
||||
>
|
||||
{/each}
|
||||
<button
|
||||
class="underline text-xs text-start px-2 text-secondary font-normal"
|
||||
on:click={clearPromptHistory}>clear history</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -304,6 +304,9 @@ const ALL_INITIAL_CODE = [
|
||||
PYTHON_INIT_CODE_CLEAR,
|
||||
DENO_INIT_CODE_APPROVAL,
|
||||
DENO_FAILURE_MODULE_CODE,
|
||||
BUN_INIT_CODE,
|
||||
BUN_INIT_CODE_CLEAR,
|
||||
BUN_INIT_CODE_APPROVAL,
|
||||
BASH_INIT_CODE,
|
||||
POWERSHELL_INIT_CODE
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user