diff --git a/src/components/settings/SettingsTimelapseTab.vue b/src/components/settings/SettingsTimelapseTab.vue index a92b1fb06..b01dccf3e 100644 --- a/src/components/settings/SettingsTimelapseTab.vue +++ b/src/components/settings/SettingsTimelapseTab.vue @@ -4,8 +4,8 @@

{{ $t('Settings.TimelapseTab.General') }}

+ :title="$t('Settings.TimelapseTab.Camera')" + :sub-title="$t('Settings.TimelapseTab.CameraDescription')"> + :title="$t('Settings.TimelapseTab.Mode')" + :sub-title="$t('Settings.TimelapseTab.ModeDescription')"> + :title="$t('Settings.TimelapseTab.HyperlapseCycle')" + :sub-title="$t('Settings.TimelapseTab.HyperlapseCycleDescription')"> + :title="$t('Settings.TimelapseTab.StreamDelayCompensation')" + :sub-title="$t('Settings.TimelapseTab.StreamDelayCompensationDescription')">

{{ $t('Settings.TimelapseTab.Parkhead') }}

+ :title="$t('Settings.TimelapseTab.Parkpos')" + :sub-title="$t('Settings.TimelapseTab.ParkposDescription')"> + :title="$t('Settings.TimelapseTab.PosX')" + :sub-title="$t('Settings.TimelapseTab.PosXDescription')"> + :title="$t('Settings.TimelapseTab.PosY')" + :sub-title="$t('Settings.TimelapseTab.PosYDescription')"> + :title="$t('Settings.TimelapseTab.PosDZ')" + :sub-title="$t('Settings.TimelapseTab.PosDZDescription')"> + :title="$t('Settings.TimelapseTab.TravelSpeed')" + :sub-title="$t('Settings.TimelapseTab.TravelSpeedDescription')"> + :title="$t('Settings.TimelapseTab.RetractSpeed')" + :sub-title="$t('Settings.TimelapseTab.RetractSpeedDescription')"> + :title="$t('Settings.TimelapseTab.RetractDistance')" + :sub-title="$t('Settings.TimelapseTab.RetractDistanceDescription')"> + hide-spin-buttons /> + :title="$t('Settings.TimelapseTab.UnretractSpeed')" + :sub-title="$t('Settings.TimelapseTab.UnretractSpeedDescription')"> + :title="$t('Settings.TimelapseTab.UnretractDistance')" + :sub-title="$t('Settings.TimelapseTab.UnretractDistanceDescription')"> + :title="$t('Settings.TimelapseTab.ParkTime')" + :sub-title="$t('Settings.TimelapseTab.ParkTimeDescription')">

{{ $t('Settings.TimelapseTab.RenderingOptions') }}

+ :title="$t('Settings.TimelapseTab.Targetlength')" + :sub-title="$t('Settings.TimelapseTab.TargetlengthDescription')"> + hide-spin-buttons /> + :title="$t('Settings.TimelapseTab.VariableFpsMin')" + :sub-title="$t('Settings.TimelapseTab.VariableFpsMinDescription')"> + :title="$t('Settings.TimelapseTab.VariableFpsMax')" + :sub-title="$t('Settings.TimelapseTab.VariableFpsMaxDescription')"> + :title="$t('Settings.TimelapseTab.OutputFramerate')" + :sub-title="$t('Settings.TimelapseTab.OutputFramerateDescription')"> + :title="$t('Settings.TimelapseTab.duplicatelastframe')" + :sub-title="$t('Settings.TimelapseTab.duplicatelastframeDescription')"> + :title="$t('Settings.TimelapseTab.ConstantRateFactor')" + :sub-title="$t('Settings.TimelapseTab.ConstantRateFactorDescription')"> + :title="$t('Settings.TimelapseTab.Pixelformat')" + :sub-title="$t('Settings.TimelapseTab.PixelformatDescription')"> + :title="$t('Settings.TimelapseTab.TimeFormatCode')" + :sub-title="$t('Settings.TimelapseTab.TimeFormatCodeDescription')"> + :title="$t('Settings.TimelapseTab.Extraoutputparams')" + :sub-title="$t('Settings.TimelapseTab.ExtraoutputparamsDescription')"> webcam.urlSnapshot !== '') + .filter((webcam: GuiWebcamStateWebcam) => webcam.snapshot_url !== '') .forEach((webcam: GuiWebcamStateWebcam) => { output.push({ text: webcam.name, - value: webcam.id, + value: webcam.name, }) }) diff --git a/src/store/gui/webcams/actions.ts b/src/store/gui/webcams/actions.ts index 62d1abe07..16833c8c6 100644 --- a/src/store/gui/webcams/actions.ts +++ b/src/store/gui/webcams/actions.ts @@ -23,9 +23,18 @@ export const actions: ActionTree = { Vue.$socket.emit('server.webcams.post_item', payload) }, - update({ dispatch }, payload: { webcam: GuiWebcamStateWebcam; oldWebcamName: string }) { + update({ dispatch, rootState }, payload: { webcam: GuiWebcamStateWebcam; oldWebcamName: string }) { Vue.$socket.emit('server.webcams.post_item', payload.webcam) if (payload.webcam.name !== payload.oldWebcamName) dispatch('delete', payload.oldWebcamName) + + // check if timelapse plugin is active, if not stop here + if (!rootState.server?.components.includes('timelapse')) return + + dispatch( + 'server/timelapse/updateCamSettings', + { newName: payload.webcam.name, oldName: payload.oldWebcamName }, + { root: true } + ) }, delete(_, payload: string) { diff --git a/src/store/server/timelapse/actions.ts b/src/store/server/timelapse/actions.ts index 99452eb8f..595036af1 100644 --- a/src/store/server/timelapse/actions.ts +++ b/src/store/server/timelapse/actions.ts @@ -52,6 +52,14 @@ export const actions: ActionTree = { Vue.$socket.emit('machine.timelapse.post_settings', payload, { action: 'server/timelapse/initSettings' }) }, + updateCamSettings({ dispatch, state }, payload) { + // check if the changed webcam is the timelapse webcam, if not stop here + if (state.settings.camera !== payload.oldName) return + + // send the new webcam name; if it is the same name, it will only update the settings + dispatch('saveSetting', { camera: payload.newName }) + }, + resetSnackbar({ commit }) { commit('resetSnackbar') },