Skip to content

Commit

Permalink
refactor: only allow changing settings if they are from the database
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <meteyou@gmail.com>
  • Loading branch information
meteyou committed Jun 25, 2023
1 parent 4ece006 commit c5087fd
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/components/settings/Webcams/WebcamListEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
<div>
<v-divider v-if="boolBorderTop" class="my-2" />
<settings-row :title="webcam.name" :icon="icon" :sub-title="subtitle">
<v-btn
class="minwidth-0 px-2"
small
outlined
:color="webcam.enabled ? '' : 'secondary'"
@click="toogleStatus">
<v-icon small>{{ mdiLightbulbOutline }}</v-icon>
</v-btn>
<v-btn class="ml-3" small outlined @click="edit">
<v-icon small left>{{ mdiPencil }}</v-icon>
{{ $t('Settings.Edit') }}
</v-btn>
<v-btn small outlined class="ml-3 minwidth-0 px-2" color="error" @click="deleteWebcam">
<v-icon small>{{ mdiDelete }}</v-icon>
</v-btn>
<template v-if="webcam.source === 'database'">
<v-btn
class="minwidth-0 px-2"
small
outlined
:color="webcam.enabled ? '' : 'secondary'"
@click="toogleStatus">
<v-icon small>{{ mdiLightbulbOutline }}</v-icon>
</v-btn>
<v-btn class="ml-3" small outlined @click="edit">
<v-icon small left>{{ mdiPencil }}</v-icon>
{{ $t('Settings.Edit') }}
</v-btn>
<v-btn small outlined class="ml-3 minwidth-0 px-2" color="error" @click="deleteWebcam">
<v-icon small>{{ mdiDelete }}</v-icon>
</v-btn>
</template>
</settings-row>
</div>
</template>
Expand Down

0 comments on commit c5087fd

Please sign in to comment.