Skip to content

Commit

Permalink
fix badge font color (openWB#1728)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshagen authored Jul 5, 2024
1 parent c0bf390 commit 79e75d9
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ body>.container-fluid {
--font-medium: 1.2rem;
--font-small: 1rem;
--font-verysmall: 0.7rem;
--font-extralarge: 1.6rem;
--font-extralarge: 1.7rem;
--font-settings: 16px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Hagen */
<span class="battery-title">{{ bat.name }}</span>
</template>
<template #buttons>
<WbBadge :bgcolor="statusbg" color="black">{{ batteryState }}</WbBadge>
<WbBadge :bgcolor="statusbg">{{ batteryState }}</WbBadge>
</template>
<div class="subgrid pt-1">
<InfoItem heading="Geliefert:" :small="true" class="grid-left grid-col-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Hagen */
<span>Speicher</span>
</template>
<template #buttons>
<WbBadge :bgcolor="statusbg" color="black">
<WbBadge :bgcolor="statusbg">
{{ batteryState }}
</WbBadge>
<WbBadge bgcolor="var(--color-battery)" color="black">
<WbBadge bgcolor="var(--color-battery)">
<BatterySymbol
color="black"
color="var(--color-bg)"
:soc="globalData.batterySoc"
></BatterySymbol>
</WbBadge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { computed, onMounted } from 'vue'
import { chargePoints } from './model'
import { globalConfig, widescreen } from '@/assets/js/themeConfig'
import CPChargePoint from './CPChargePoint.vue'
// import CPSimpleList from './cpSimpleList/CPSimpleList.vue'
import Swiper from 'swiper'
import 'swiper/css'
import 'swiper/css/pagination'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
<template #title>
<div class="d-flex align-items-center">
<span class="cpname">{{ chargepoint.name }} </span>
<span
class="WbBadge rounded-pill statusWbBadge mx-2"
:style="statusColor"
>
<span class="badge rounded-pill statusbadge mx-2" :style="statusColor">
<i :class="statusIcon" class="me-1" />
{{ statusString }}</span
>
Expand All @@ -15,7 +12,7 @@
<template #buttons>
<div class="d-flex float-right justify-content-end align-items-center">
<span
class="WbBadge rounded-pill modeWbBadge mx-2"
class="badge rounded-pill modebadge mx-2"
type="button"
:style="modeStyle"
data-bs-toggle="modal"
Expand Down Expand Up @@ -68,7 +65,7 @@
<span>{{ chargePowerString }}</span>

<span class="d-flex align-items-center">
<span class="WbBadge phasesInUse rounded-pill">
<span class="badge phasesInUse rounded-pill">
{{ chargePhasesString }}</span
>
<span>
Expand Down Expand Up @@ -304,7 +301,7 @@ const statusString = computed(() => {
color: var(--color-fg);
}
.statusWbBadge {
.statusbadge {
background-color: var(--color-bg);
font-weight: bold;
font-size: var(--font-verysmall);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const props = defineProps<{
const WbBadgestyle = computed(() => {
let result = {
'background-color': props.bgcolor ?? 'var(--color-menu)',
color: props.color ?? 'black',
color: props.color ?? 'var(--color-bg)',
}
return result
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
v-if="props.device.canSwitch"
:class="switchIcon"
:style="switchStyle"
class="fa statusbutton mr-2 ms-4"
class="fa-solid statusbutton mr-2 ms-2"
@click="statusButtonClicked"
/>
<span
<WbBadge
v-if="props.device.canSwitch"
class="WbBadge rounded-pill modebutton mx-2"
type="button"
@click="modeButtonClicked"
>{{ deviceMode }}</span
>
{{ deviceMode }}
</WbBadge>
</template>
<div class="subgrid">
<InfoItem heading="Leistung:" class="grid-col-4 grid-left">
Expand Down Expand Up @@ -55,10 +56,10 @@ const props = defineProps<{
const switchIcon = computed(() => {
return props.device.status == 'on'
? 'fa-toggle-on'
? 'fa-toggle-on fa-xl'
: props.device.status == 'waiting'
? 'fa-spinner fa-spin'
: 'fa-toggle-off'
: 'fa-toggle-off fa-xl'
})
const switchStyle = computed(() => {
let swColor = 'var(--color-switchRed)'
Expand Down Expand Up @@ -110,22 +111,6 @@ const deviceMode = computed(() => {

<style scoped>
.statusbutton {
font-size: var(--font-large);
}
.modebutton {
background-color: var(--color-menu);
font-size: var(--font-verysmall);
font-weight: normal;
}
.tempWbBadge {
background-color: var(--color-battery);
color: var(--color-bg);
font-size: var(--font-verysmall);
font-weight: normal;
}
.infolist {
justify-content: center;
font-size: var(--font-extralarge);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const shortListOptions: [string, string][] = [
</script>
<style scoped>
.fa-circle-check {
font-size: var(--font-extralarge);
font-size: var(--font-large);
background-color: var(--color-bg);
color: var(--color-menu);
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/modules/web_themes/colors/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<link rel="apple-touch-icon" sizes="57x57" href="/openWB/web/img/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/openWB/web/img/favicons/apple-touch-icon-60x60.png">
<title>openWB</title>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-BfezLEEg.js"></script>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-DNPzLOl7.js"></script>
<link rel="modulepreload" crossorigin href="/openWB/web/themes/colors/assets/vendor-DXWWyQ_6.js">
<link rel="stylesheet" crossorigin href="/openWB/web/themes/colors/assets/index-I4G-eoQw.css">
<link rel="stylesheet" crossorigin href="/openWB/web/themes/colors/assets/index-CMDnrXDa.css">
</head>

<body>
Expand Down

0 comments on commit 79e75d9

Please sign in to comment.