|
1 | 1 | <template> |
2 | | - <div class="columns is-multiline"> |
3 | | - <div class="column is-12 mt-2"> |
| 2 | + <div class="columns is-multiline mb-2"> |
| 3 | + |
| 4 | + <div class="column is-6-tablet"> |
4 | 5 | <div class="card"> |
5 | 6 | <header class="card-header"> |
6 | 7 | <p class="card-header-title"> |
|
11 | 12 | </span> |
12 | 13 | </header> |
13 | 14 | <div class="card-content"> |
14 | | - <form @submit.prevent="testApi"> |
| 15 | + <form id="api_connection" @submit.prevent="testApi"> |
15 | 16 | <div class="field"> |
16 | 17 | <label class="label" for="api_token"> |
17 | 18 | <span class="icon-text"> |
|
37 | 38 | <p class="help"> |
38 | 39 | You can obtain the <code>API TOKEN</code> by using the <code>system:apikey</code> command or by |
39 | 40 | viewing the <code>/config/.env</code> inside <code>WS_DATA_PATH</code> variable and looking for |
40 | | - the |
41 | | - <code>WS_API_KEY=</code> key. |
| 41 | + the <code>WS_API_KEY=</code> key. |
42 | 42 | </p> |
43 | 43 | </div> |
44 | 44 | </div> |
|
83 | 83 | </div> |
84 | 84 | </div> |
85 | 85 | </div> |
| 86 | + </form> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + </div> |
86 | 90 |
|
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> |
| 91 | + <div class="column is-6-tablet"> |
| 92 | + <div class="card"> |
| 93 | + <header class="card-header"> |
| 94 | + <p class="card-header-title"> |
| 95 | + WebUI Look & Feel |
| 96 | + </p> |
| 97 | + <span class="card-header-icon"> |
| 98 | + <span class="icon"><i class="fas fa-paint-brush"/></span> |
| 99 | + </span> |
| 100 | + </header> |
| 101 | + <div class="card-content"> |
| 102 | + <div class="field"> |
| 103 | + <label class="label" for="random_bg">Color scheme</label> |
| 104 | + <div class="control"> |
| 105 | + <label for="auto" class="radio"> |
| 106 | + <input id="auto" type="radio" v-model="webui_theme" value="auto"> System Default |
| 107 | + </label> |
| 108 | + <label for="light" class="radio"> |
| 109 | + <input id="light" type="radio" v-model="webui_theme" value="light"> Light |
| 110 | + </label> |
| 111 | + <label for="dark" class="radio"> |
| 112 | + <input id="dark" type="radio" v-model="webui_theme" value="dark"> Dark |
| 113 | + </label> |
94 | 114 | </div> |
| 115 | + <p class="help"> |
| 116 | + <span class="icon"><i class="fa-solid fa-info"/></span> |
| 117 | + <span>Select the color scheme for the WebUI.</span> |
| 118 | + </p> |
| 119 | + </div> |
95 | 120 |
|
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> |
| 121 | + <div class="field"> |
| 122 | + <label class="label" for="random_bg">Backgrounds</label> |
| 123 | + <div class="control"> |
| 124 | + <input id="random_bg" type="checkbox" class="switch is-success" v-model="bg_enable"> |
| 125 | + <label for="random_bg">Enable</label> |
| 126 | + <p class="help">Use random background image from your media backends.</p> |
105 | 127 | </div> |
| 128 | + </div> |
106 | 129 |
|
107 | | - <div class="field has-text-right"> |
108 | | - <div class="control"> |
109 | | - <button type="submit" class="button is-primary" :disabled="!api_url || !api_token"> |
110 | | - <span class="icon-text"> |
111 | | - <span class="icon"><i class="fas fa-save"/></span> |
112 | | - <span>Save</span> |
113 | | - </span> |
114 | | - </button> |
115 | | - </div> |
116 | | - <p class="help has-text-left"> |
117 | | - <span class="icon-text"> |
118 | | - <span class="icon has-text-danger"><i class="fas fa-info"/></span> |
119 | | - <span>These settings are stored locally in your browser. You need to re-add them if you access |
120 | | - the |
121 | | - <code>WebUI</code> from different browser.</span> |
122 | | - </span> |
123 | | - </p> |
| 130 | + <div class="field"> |
| 131 | + <label class="label" for="random_bg_opacity"> |
| 132 | + Background Visibility: (<code>{{ bg_opacity }}</code>) |
| 133 | + </label> |
| 134 | + <div class="control"> |
| 135 | + <input id="random_bg_opacity" style="width: 100%" type="range" v-model="bg_opacity" min="0.60" |
| 136 | + max="1.00" step="0.05"> |
| 137 | + <p class="help">How visible the background image should be.</p> |
124 | 138 | </div> |
125 | | - </form> |
| 139 | + </div> |
126 | 140 | </div> |
127 | 141 | </div> |
128 | 142 | </div> |
129 | 143 |
|
| 144 | + <div class="column is-12"> |
| 145 | + <div class="control"> |
| 146 | + <button form="api_connection" type="submit" class="button is-primary is-fullwidth" |
| 147 | + :disabled="!api_url || !api_token"> |
| 148 | + <span class="icon-text"> |
| 149 | + <span class="icon"><i class="fas fa-save"/></span> |
| 150 | + <span>Save</span> |
| 151 | + </span> |
| 152 | + </button> |
| 153 | + </div> |
| 154 | + <p class="has-text-left"> |
| 155 | + <span class="icon has-text-danger"><i class="fas fa-info"/></span> |
| 156 | + <span>These settings are stored locally in your browser. You need to re-add them if you access the |
| 157 | + <code>WebUI</code> from different browser. |
| 158 | + </span> |
| 159 | + </p> |
| 160 | + </div> |
| 161 | + |
130 | 162 | <div class="column is-12 mt-2"> |
131 | 163 | <Message title="Information" message_class="has-background-info-90 has-text-dark" icon="fas fa-info-circle"> |
132 | 164 | <p> |
@@ -168,6 +200,8 @@ const real_api_url = useStorage('api_url', window.location.origin) |
168 | 200 | const real_api_path = useStorage('api_path', '/v1/api') |
169 | 201 | const real_api_token = useStorage('api_token', '') |
170 | 202 |
|
| 203 | +const webui_theme = useStorage('theme', 'auto') |
| 204 | +
|
171 | 205 |
|
172 | 206 | const api_url = ref(toRaw(real_api_url.value)) |
173 | 207 | const api_path = ref(toRaw(real_api_path.value)) |
|
0 commit comments