mirror of
https://github.com/Drop-OSS/drop
synced 2026-08-27 14:23:05 -04:00
Co-authored-by: Robert Clabough <robert@clabough.tech>
This commit is contained in:
parent
d0c3b2fdb6
commit
8e75a0bf56
1 changed files with 12 additions and 0 deletions
|
|
@ -292,6 +292,18 @@ const launchFilteredVersionGuesses = computed(() =>
|
|||
|
||||
function updateLaunchCommand(command: string) {
|
||||
launchConfiguration.value.launch = command;
|
||||
|
||||
// Auto-fill name from filename if user hasn't set one (#373)
|
||||
if (!launchConfiguration.value.name) {
|
||||
const guess = props.versionGuesses?.find((v) => v.filename === command);
|
||||
if (guess?.type === "emulator") {
|
||||
launchConfiguration.value.name = guess.launchName;
|
||||
} else {
|
||||
const basename = command.split("/").pop() ?? command;
|
||||
launchConfiguration.value.name = basename.replace(/\.[^.]+$/, "");
|
||||
}
|
||||
}
|
||||
|
||||
if (launchConfiguration.value.platform === undefined) {
|
||||
const autosetGuess = props.versionGuesses?.find(
|
||||
(v) => v.filename == command,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue