diff --git a/src/renderer/src/components/profile/ProfileButton.vue b/src/renderer/src/components/profile/ProfileButton.vue index c975485..8f2f0e6 100644 --- a/src/renderer/src/components/profile/ProfileButton.vue +++ b/src/renderer/src/components/profile/ProfileButton.vue @@ -82,6 +82,17 @@ > + + + + $emit('rename', profile.name, name.toUpperCase())" + @update:description=" + (description) => $emit('description', profile.name, description.toUpperCase()) + " + /> + + + (open = v)"> + + + Profile properties + + + Title: + $emit('update:name', name)" + /> + + + Description: + $emit('update:description', description)" + /> + + + + diff --git a/src/renderer/src/deviceStore.ts b/src/renderer/src/deviceStore.ts index 8b9572e..1317571 100644 --- a/src/renderer/src/deviceStore.ts +++ b/src/renderer/src/deviceStore.ts @@ -293,6 +293,23 @@ export const useDeviceStore = defineStore('device', { this.setDirtyState(true) } }, + updateProfileDescription( + profileName: string, + description: string, + updateDevice: boolean = true + ) { + const profile = this.profiles.find((p) => p.name === profileName) + if (profile) { + profile.desc = description + if (updateDevice) { + nanoIpc.send( + this.currentDeviceId!, + JSON.stringify({ profile: profileName, updates: { desc: description } }) + ) + this.setDirtyState(true) + } + } + }, detachDevice(deviceId: string) { const index = this.attachedDeviceIds.indexOf(deviceId) if (index !== -1) {