Skip to content

Commit 18746b2

Browse files
authored
Merge pull request #293 from cgiesche/feature/254_Improve_display_image_rendering
Fixed accidential removed feature :D
2 parents 23327bf + f12c4e5 commit 18746b2

File tree

1 file changed

+46
-39
lines changed

1 file changed

+46
-39
lines changed

src/components/PiComponent.vue

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
<div class="mb-3">
3030
<label class="form-label" for="displayConfig">Display configuration ("Theme")</label>
3131
<div class="input-group">
32-
<select :disabled="displayConfigurationUrlOverride.length > 0" id="displayConfig" v-model="displayConfiguration" class="form-select form-select-sm">
32+
<select :disabled="displayConfigurationUrlOverride.length > 0" id="displayConfig"
33+
v-model="displayConfiguration" class="form-select form-select-sm">
3334
<option v-for="availableConfiguration in manifest['display-configs']" :key="availableConfiguration"
3435
:value="availableConfiguration">
3536
{{ availableConfiguration.title }}
@@ -39,8 +40,12 @@
3940

4041
<div class="mt-3">
4142
<label for="formFileSm" class="form-label">Custom display configuration URL</label>
42-
<input v-model="displayConfigurationUrlOverride" class="form-control form-control-sm" type="url" placeholder="file://c:/custom.yml">
43-
<div class="form-text">Specify path or URL to customized display configuration. Unsupported! <a target="_blank" href="https://raw.githubusercontent.com/cgiesche/streamdeck-homeassistant/master/public/config/default-display-config.yml">Example</a>.</div>
43+
<input v-model="displayConfigurationUrlOverride" class="form-control form-control-sm" type="url"
44+
placeholder="file://c:/custom.yml">
45+
<div class="form-text">Specify path or URL to customized display configuration. Unsupported! <a
46+
target="_blank"
47+
href="https://raw.githubusercontent.com/cgiesche/streamdeck-homeassistant/master/public/config/default-display-config.yml">Example</a>.
48+
</div>
4449
</div>
4550
</div>
4651

@@ -87,51 +92,53 @@
8792
</div>
8893

8994

90-
<div class="form-check form-switch">
91-
<input id="chkCustomLabels" v-model="useCustomButtonLabels" class="form-check-input" type="checkbox">
92-
<label class="form-check-label" for="chkCustomLabels">Custom labels</label>
93-
</div>
95+
<div class="form-check form-switch">
96+
<input id="chkCustomLabels" v-model="useCustomButtonLabels" class="form-check-input" type="checkbox">
97+
<label class="form-check-label" for="chkCustomLabels">Custom labels</label>
98+
</div>
9499

95-
<div v-if="useCustomButtonLabels">
96-
<div class="mb-3">
100+
<div v-if="useCustomButtonLabels">
101+
<div class="mb-3">
97102
<textarea id="buttonLabels" v-model="buttonLabels" class="form-control font-monospace"
98103
placeholder="Line 1 (may overlap with icon)"
99104
rows="4"></textarea>
100-
<details>
101-
<summary>Available variables</summary>
102-
<div v-for="attr in entityAttributes" v-bind:key="attr" class="form-text font-monospace">{{ attr }}</div>
103-
</details>
104-
</div>
105+
<details>
106+
<summary>Available variables</summary>
107+
<div v-for="attr in entityAttributes" v-bind:key="attr" class="form-text font-monospace">{{ attr }}</div>
108+
</details>
105109
</div>
110+
</div>
106111

107-
<template v-if="!controllerType === 'Encoder'">
108-
<div class="form-check form-switch mb-3">
109-
<input id="chkEnableServiceIndicator" v-model="enableServiceIndicator" class="form-check-input" type="checkbox">
112+
<template v-if="controllerType !== 'Encoder'">
113+
<div class="form-check form-switch">
114+
<input id="chkEnableServiceIndicator" v-model="enableServiceIndicator" class="form-check-input"
115+
type="checkbox">
110116
<label class="form-check-label" for="chkEnableServiceIndicator">Show visual service indicators</label>
111117
</div>
118+
</template>
112119

113-
<div class="mb-3">
114-
<div class="form-check">
115-
<input class="form-check-input" type="radio" id="radioPlugin" value="PREFER_PLUGIN" v-model="iconSettings">
116-
<label class="form-check-label" for="radioPlugin">
117-
Prefer icon from plugin (recommended)
118-
</label>
119-
</div>
120-
<div class="form-check">
121-
<input class="form-check-input" type="radio" id="radioHomeAssistant" value="PREFER_HA"
122-
v-model="iconSettings">
123-
<label class="form-check-label" for="radioHomeAssistant">
124-
Prefer icon from HA
125-
</label>
126-
</div>
127-
<div class="form-check">
128-
<input class="form-check-input" type="radio" id="radioHide" value="HIDE" v-model="iconSettings">
129-
<label class="form-check-label" for="radioHide">
130-
Hide icon
131-
</label>
132-
</div>
120+
<div class="mt-3 mb-3">
121+
<div class="form-check">
122+
<input class="form-check-input" type="radio" id="radioPlugin" value="PREFER_PLUGIN" v-model="iconSettings">
123+
<label class="form-check-label" for="radioPlugin">
124+
Prefer icon from plugin (recommended)
125+
</label>
133126
</div>
134-
</template>
127+
<div class="form-check">
128+
<input class="form-check-input" type="radio" id="radioHomeAssistant" value="PREFER_HA"
129+
v-model="iconSettings">
130+
<label class="form-check-label" for="radioHomeAssistant">
131+
Prefer icon from HA
132+
</label>
133+
</div>
134+
<div class="form-check">
135+
<input class="form-check-input" type="radio" id="radioHide" value="HIDE" v-model="iconSettings">
136+
<label class="form-check-label" for="radioHide">
137+
Hide icon
138+
</label>
139+
</div>
140+
</div>
141+
135142

136143
<h1>{{ controllerType }} actions</h1>
137144

@@ -317,7 +324,7 @@ onMounted(() => {
317324
})
318325
319326
function updateManifest() {
320-
console.log("Updating manifest.")
327+
console.log('Updating manifest.')
321328
axios.get('https://cdn.jsdelivr.net/gh/cgiesche/streamdeck-homeassistant@master/public/config/manifest.yml')
322329
.then(response => this.manifest = yaml.load(response.data))
323330
.catch(error => console.log(`Failed to download updated manifest.yml: ${error}`))

0 commit comments

Comments
 (0)