| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <% layout("/en/layout", { title: `settings` }) %>
- <%~ include("/en/partials/topbar") %>
- <% const settingsIcon = `
- <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
- <path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
- <circle cx="12" cy="12" r="3" />
- </g>
- </svg>
- ` %>
- <% const ipIcon = `
- <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
- <rect width="6" height="6" x="16" y="16" rx="1" />
- <rect width="6" height="6" x="2" y="16" rx="1" />
- <rect width="6" height="6" x="9" y="2" rx="1" />
- <path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3m-7-4V8" />
- </g>
- </svg>
- ` %>
- <h2><%~ settingsIcon %> settings</h2>
- <% const errorValue = it.error?.split('.').reduce((a, b) => a[b], it.lang.settings?.errors)?.(it?.errorDetails) %>
- <% if (typeof errorValue === "string") { %>
- <div class="message error">
- <p><%= errorValue %></p>
- </div>
- <% } %>
- <p><%~ ipIcon %> <%= it.wifiIPv4 %></p>
- <form action="/en/settings" method="post">
- <div class="container-row">
- <label for="postDataEnabled">post data</label>
- <input type="checkbox" id="postDataEnabled" name="postDataEnabled" <%= it.postDataEnabled !== "false" ? `checked` : `` %> value="true">
- </div>
- <div>
- <label for="cloudURL">cloud url</label>
- <input type="text" id="cloudURL" name="cloudURL" placeholder="wss://meteostanica.com" value="<%= it.cloudURL ?? `wss://meteostanica.com` %>">
- </div>
- <button type="submit">save</button>
- </form>
|