Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function formatTime(seconds: number) {
}
}
export function formatCurrentTime(d: Date) {
return d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })
return d.toLocaleTimeString(['de-DE'], { hour: '2-digit', minute: '2-digit' })
}

export function formatDate(d: Date, mode: string = 'day') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const props = defineProps<{

//state
const keys = computed(() => {
if (globalConfig.showInverters) {
if (!globalConfig.showInverters) {
return [
['house', 'charging', 'devices', 'batIn'],
['charging', 'devices', 'batIn', 'house'],
Expand Down
3 changes: 3 additions & 0 deletions packages/modules/web_themes/colors/source/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import nodePolyfills from "rollup-plugin-polyfill-node";

// https://vitejs.dev/config/
export default defineConfig({
server: {
allowedHosts: true,
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Abgesehen davon, dass die Einrückung nicht passt: warum ist diese Einstellung erforderlich? Ich sehe keine Grund.
Laut Doku wird dringend davon abgeraten. https://vite.dev/config/server-options#server-allowedhosts

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohne das bekomme ich mit der aktuellen Vita-Version diese Fehlermeldung im Browser, wenn das Theme lokal starte:

Blocked request. This host ("openwb-dev") is not allowed.
To allow this host, add "openwb-dev" to `server.allowedHosts` in vite.config.js.

Es hilft aber nicht, wenn ich meinen internen Hostnamen auf Github poste, ausserdem kann der ja auch mal ändern. Die Config sollte ja auch nur dann greifen, wenn das Colors-Theme lokal mit "npm run dev" gestartet wird. Es sollte daher für den normalen Betrieb keinen Sicherheitsabstand-Impact geben.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Der Zugriff per IP reicht Dir nicht?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Danke für den Tipp. IP-Adresse funktioniert. Ich habe die server.allowedHosts-Config wieder rausgenommen.

plugins: [vue({
template: {
compilerOptions: {
Expand Down

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/modules/web_themes/colors/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="apple-touch-icon" sizes="60x60" href="/openWB/web/img/favicons/apple-touch-icon-60x60.png">
<link rel="manifest" href="/openWB/web/manifest.json">
<title>openWB</title>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-CIr-OUyK.js"></script>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-CaUGgs4L.js"></script>
<link rel="modulepreload" crossorigin href="/openWB/web/themes/colors/assets/vendor-CmSLe-Fc.js">
<link rel="stylesheet" crossorigin href="/openWB/web/themes/colors/assets/index-BM5jgL8d.css">
</head>
Expand Down