Files
windmill/frontend/src/lib/components/raw_apps/FileEditorIcon.svelte
T
Guilhem c210853033 fix(frontend): update raw app editor to brand guidelines (#7545)
* nit

* Update sidebar to brand guidelines

* use dropdown for file delete and rename

* update runnable script styling

* fix icon sizes

* Polish app creation form

* Add missing languages icons

* Allow  to delete runnable from the left pannel

* update top bar to brand guidelines

* improve svelte template

* fix runnables binding

* nit

* Deselect frontend file when selecting background runnable

* fix renaming wip

* fix add ing files, update only after adding

* Change filename when already existing

* update deployment page to brand guidelines

* fix folder open error

* expand folder if adding file inside

* nit

* fix bad link

* use alert for ai not configured message
2026-01-13 16:33:32 +00:00

39 lines
1.2 KiB
Svelte

<script lang="ts" module>
export const SUPPORTED_EXTENSIONS = ['tsx', 'json', 'ts', 'js', 'vue', 'css', 'svelte']
</script>
<script lang="ts">
import TypeScript from '../common/languageIcons/TypeScript.svelte'
import JavaScriptIcon from '../icons/JavaScriptIcon.svelte'
import JsonIcon from '../icons/JsonIcon.svelte'
import ReactIcon from '../icons/ReactIcon.svelte'
import SvelteIcon from '../icons/SvelteIcon.svelte'
import VueIcon from '../icons/VueIcon.svelte'
interface Props {
file: string
size?: number
}
let { file, size = 16 }: Props = $props()
const width = $derived(size.toString() + 'px')
const height = $derived(size.toString() + 'px')
</script>
{#if file.endsWith('.tsx')}
<ReactIcon {width} {height} />
{:else if file.endsWith('.json')}
<JsonIcon {width} {height} />
{:else if file.endsWith('.ts')}
<TypeScript width={size} height={size} />
{:else if file.endsWith('.js')}
<JavaScriptIcon {width} {height} />
{:else if file.endsWith('.vue')}
<VueIcon {width} {height} />
{:else if file.endsWith('.css')}
<span class="text-blue-600 ml-0.5" style="font-size: 16px;">#</span>
{:else if file.endsWith('.svelte')}
<SvelteIcon {width} {height} />
{/if}