mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-25 17:24:48 +10:00
Co-authored-by: Robert Clabough <robert@clabough.tech>
This commit is contained in:
@@ -292,6 +292,18 @@ const launchFilteredVersionGuesses = computed(() =>
|
|||||||
|
|
||||||
function updateLaunchCommand(command: string) {
|
function updateLaunchCommand(command: string) {
|
||||||
launchConfiguration.value.launch = command;
|
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) {
|
if (launchConfiguration.value.platform === undefined) {
|
||||||
const autosetGuess = props.versionGuesses?.find(
|
const autosetGuess = props.versionGuesses?.find(
|
||||||
(v) => v.filename == command,
|
(v) => v.filename == command,
|
||||||
|
|||||||
Reference in New Issue
Block a user