better new profile name handling - fixes #4325

This commit is contained in:
Eugene Pankov
2021-08-02 20:52:39 +02:00
parent c1a1f53707
commit ab8061ab39
6 changed files with 32 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ import { SerialProfileSettingsComponent } from './components/serialProfileSettin
import { SerialTabComponent } from './components/serialTab.component'
import { SerialService } from './services/serial.service'
import { BAUD_RATES, SerialProfile } from './api'
import { profileEnd } from 'console'
@Injectable({ providedIn: 'root' })
export class SerialProfilesService extends ProfileProvider<SerialProfile> {
@@ -92,6 +93,10 @@ export class SerialProfilesService extends ProfileProvider<SerialProfile> {
}
}
getSuggestedName (profile: SerialProfile): string {
return this.getDescription(profile)
}
getDescription (profile: SerialProfile): string {
return profile.options.port
}