From 68f8221836df88d7c8023549d0f44ce333a1da98 Mon Sep 17 00:00:00 2001 From: saboooor Date: Tue, 26 Dec 2023 21:06:27 -0700 Subject: [PATCH] append .jar --- src/routes/flags/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/flags/index.tsx b/src/routes/flags/index.tsx index 7d48be68..64c30141 100644 --- a/src/routes/flags/index.tsx +++ b/src/routes/flags/index.tsx @@ -366,7 +366,12 @@ export default component$(() => { {t('flags.fileName.label@@File Name')} - { store.parsed.fileName = event.target!.value; setCookie(JSON.stringify(store)); }}> + { + if (event.target!.value.replace(/ /g, '') == '') return; + if (!event.target!.value.endsWith('.jar')) { event.target!.value += '.jar'; } + store.parsed.fileName = event.target!.value; + setCookie(JSON.stringify(store)); + }}> {t('flags.fileName.description@@The name of the file that will be used to start your server.')}