|
84 | 84 | </div> |
85 | 85 | </div> |
86 | 86 |
|
| 87 | + <div class="field"> |
| 88 | + <label class="label" for="random_bg">Backgrounds</label> |
| 89 | + <div class="control"> |
| 90 | + <input id="random_bg" type="checkbox" class="switch is-success" v-model="bg_enable"> |
| 91 | + <label for="random_bg">Enable</label> |
| 92 | + <p class="help">Use random background image from your media backends.</p> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + |
| 96 | + <div class="field"> |
| 97 | + <label class="label" for="random_bg_opacity"> |
| 98 | + Background Visibility: (<code>{{ bg_opacity }}</code>) |
| 99 | + </label> |
| 100 | + <div class="control"> |
| 101 | + <input id="random_bg_opacity" style="width: 100%" type="range" v-model="bg_opacity" min="0.60" |
| 102 | + max="1.00" step="0.05"> |
| 103 | + <p class="help">How visible the background image should be.</p> |
| 104 | + </div> |
| 105 | + </div> |
| 106 | + |
87 | 107 | <div class="field has-text-right"> |
88 | 108 | <div class="control"> |
89 | 109 | <button type="submit" class="button is-primary" :disabled="!api_url || !api_token"> |
@@ -148,13 +168,16 @@ const real_api_url = useStorage('api_url', window.location.origin) |
148 | 168 | const real_api_path = useStorage('api_path', '/v1/api') |
149 | 169 | const real_api_token = useStorage('api_token', '') |
150 | 170 |
|
| 171 | +
|
151 | 172 | const api_url = ref(toRaw(real_api_url.value)) |
152 | 173 | const api_path = ref(toRaw(real_api_path.value)) |
153 | 174 | const api_user = ref(toRaw(real_api_user.value)) |
154 | 175 | const api_token = ref(toRaw(real_api_token.value)) |
155 | | -
|
156 | 176 | const exposeToken = ref(false) |
157 | 177 |
|
| 178 | +const bg_enable = useStorage('bg_enable', true) |
| 179 | +const bg_opacity = useStorage('bg_opacity', 0.95) |
| 180 | +
|
158 | 181 | const testApi = async () => { |
159 | 182 | try { |
160 | 183 | const response = await fetch(`${api_url.value}${api_path.value}/system/version`, { |
|
0 commit comments