Skip to content

Commit

Permalink
append .jar
Browse files Browse the repository at this point in the history
  • Loading branch information
saboooor committed Dec 27, 2023
1 parent 3df38ec commit 68f8221
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/routes/flags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,12 @@ export default component$(() => {
<CardHeader>
{t('flags.fileName.label@@File Name')}
</CardHeader>
<TextInput id="input" value={store.parsed.fileName} placeholder="server.jar" onInput$={(event: any) => { store.parsed.fileName = event.target!.value; setCookie(JSON.stringify(store)); }}>
<TextInput id="input" value={store.parsed.fileName} placeholder="server.jar" onChange$={(event: any) => {
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.')}
</TextInput>
</div>
Expand Down

0 comments on commit 68f8221

Please sign in to comment.