Compare commits

..

6 Commits

Author SHA1 Message Date
xiaoshi
6abbc0e917 Update xiaoshi-pad-card.js 2025-12-06 21:55:16 +08:00
xiaoshi
a0d123a998 Add files via upload 2025-12-06 21:54:51 +08:00
xiaoshi
8014a664b4 Delete xiaoshi-device-todo-button.js 2025-12-06 21:54:35 +08:00
xiaoshi
ed3c9b5896 Delete xiaoshi-device-ha-info-button.js 2025-12-06 21:54:27 +08:00
xiaoshi
b2eccc66cf Delete xiaoshi-device-consumables-button.js 2025-12-06 21:54:19 +08:00
xiaoshi
08242a4758 Delete xiaoshi-device-balance-button.js 2025-12-06 21:54:11 +08:00
5 changed files with 33 additions and 33 deletions

View File

@@ -207,7 +207,7 @@ class XiaoshiBalanceButtonEditor extends LitElement {
}
.remove-btn:hover {
color: #f44336;
color: rgb(255, 0, 0);
}
`;
}
@@ -294,13 +294,13 @@ class XiaoshiBalanceButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮宽度:默认70px, 支持像素(px)和百分比(%)</label>
<label>按钮宽度:默认65px, 支持像素(px)和百分比(%)</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_width !== undefined ? this.config.button_width : '70px'}
.value=${this.config.button_width !== undefined ? this.config.button_width : '65px'}
name="button_width"
placeholder="默认70px"
placeholder="默认65px"
/>
</div>
@@ -425,16 +425,16 @@ class XiaoshiBalanceButtonEditor extends LitElement {
<input
type="color"
@change=${this._entityChanged}
.value=${this.config.warning_color || '#f44336'}
.value=${this.config.warning_color || 'rgb(255, 0, 0)'}
name="warning_color"
style="width: 50px; height: 34px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer;"
/>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.warning_color || '#f44336'}
.value=${this.config.warning_color || 'rgb(255, 0, 0)'}
name="warning_color"
placeholder="默认:#f44336"
placeholder="默认:rgb(255, 0, 0)"
style="flex: 1;"
/>
</div>
@@ -934,7 +934,7 @@ class XiaoshiBalanceButton extends LitElement {
/*button新元素 开始*/
.balance-status {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
padding: 0;
margin: 0;
@@ -1143,7 +1143,7 @@ class XiaoshiBalanceButton extends LitElement {
}
.device-value.warning {
color: var(--warning-color, #F44336);
color: var(--warning-color, rgb(255, 0, 0));
}
.device-unit {
@@ -1154,7 +1154,7 @@ class XiaoshiBalanceButton extends LitElement {
}
.device-unit.warning {
color: var(--warning-color, #F44336);
color: var(--warning-color, rgb(255, 0, 0));
}
.no-devices {
@@ -1705,7 +1705,7 @@ class XiaoshiBalanceButton extends LitElement {
const displayText = formattedDisplayValue !== null && displayUnit ? `${formattedDisplayValue}${displayUnit}` : formattedDisplayValue;
// 获取预警颜色
const warningColor = this.config.warning_color || '#f44336';
const warningColor = this.config.warning_color || 'rgb(255, 0, 0)';
// 根据预警状态设置数字颜色
const numberColor = isWarning ? warningColor : fgColor;
@@ -1726,7 +1726,7 @@ class XiaoshiBalanceButton extends LitElement {
<label>👇👇👇下面是弹出卡片内容👇👇👇</label>
</div>
<ha-card style="--fg-color: ${fgColor}; --bg-color: ${bgColor}; --warning-color: ${this.config.warning_color || '#f44336'};">
<ha-card style="--fg-color: ${fgColor}; --bg-color: ${bgColor}; --warning-color: ${this.config.warning_color || 'rgb(255, 0, 0)'};">
<div class="card-header">
<div class="card-title">
<span class="offline-indicator" style="background: rgb(0,222,220); animation: pulse 2s infinite"></span>
@@ -1786,7 +1786,7 @@ class XiaoshiBalanceButton extends LitElement {
if (config.button_width) {
this.style.setProperty('--button-width', config.button_width);
} else {
this.style.setProperty('--button-width', '70px');
this.style.setProperty('--button-width', '65px');
}
// 设置按钮高度(只控制 balance-status
@@ -1823,7 +1823,7 @@ class XiaoshiBalanceButton extends LitElement {
if (config.warning_color) {
this.style.setProperty('--warning-color', config.warning_color);
} else {
this.style.setProperty('--warning-color', '#f44336');
this.style.setProperty('--warning-color', 'rgb(255, 0, 0)');
}
if (config.theme) {

View File

@@ -342,13 +342,13 @@ class XiaoshiConsumablesButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮宽度:默认70px, 支持像素(px)和百分比(%)</label>
<label>按钮宽度:默认65px, 支持像素(px)和百分比(%)</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_width !== undefined ? this.config.button_width : '70px'}
.value=${this.config.button_width !== undefined ? this.config.button_width : '65px'}
name="button_width"
placeholder="默认70px"
placeholder="默认65px"
/>
</div>
@@ -919,7 +919,7 @@ class XiaoshiConsumablesButton extends LitElement {
/*button新元素 开始*/
.consumables-status {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
padding: 0;
margin: 0;
@@ -947,7 +947,7 @@ class XiaoshiConsumablesButton extends LitElement {
/* 角标模式样式 */
.consumables-status.badge-mode {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
border-radius: 10px;
padding: 0;
@@ -1993,7 +1993,7 @@ class XiaoshiConsumablesButton extends LitElement {
if (config.button_width) {
this.style.setProperty('--button-width', config.button_width);
} else {
this.style.setProperty('--button-width', '70px');
this.style.setProperty('--button-width', '65px');
}
// 设置按钮高度(只控制 consumables-status

View File

@@ -173,13 +173,13 @@ class XiaoshiHaInfoButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮宽度:默认70px, 支持像素(px)和百分比(%)</label>
<label>按钮宽度:默认65px, 支持像素(px)和百分比(%)</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_width !== undefined ? this.config.button_width : '70px'}
.value=${this.config.button_width !== undefined ? this.config.button_width : '65px'}
name="button_width"
placeholder="默认70px"
placeholder="默认65px"
/>
</div>
@@ -417,7 +417,7 @@ export class XiaoshiHaInfoButton extends LitElement {
/*button新元素 开始*/
.ha-info-status {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
padding: 0;
margin: 0;
@@ -445,7 +445,7 @@ export class XiaoshiHaInfoButton extends LitElement {
/* 角标模式样式 */
.ha-info-status.badge-mode {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
border-radius: 10px;
padding: 0;
@@ -2053,7 +2053,7 @@ export class XiaoshiHaInfoButton extends LitElement {
if (config.button_width) {
this.style.setProperty('--button-width', config.button_width);
} else {
this.style.setProperty('--button-width', '70px');
this.style.setProperty('--button-width', '65px');
}
// 设置按钮高度(只控制 ha-info-status

View File

@@ -293,13 +293,13 @@ class XiaoshiTodoButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮宽度:默认70px, 支持像素(px)和百分比(%)</label>
<label>按钮宽度:默认65px, 支持像素(px)和百分比(%)</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_width !== undefined ? this.config.button_width : '70px'}
.value=${this.config.button_width !== undefined ? this.config.button_width : '65px'}
name="button_width"
placeholder="默认70px"
placeholder="默认65px"
/>
</div>
@@ -633,7 +633,7 @@ class XiaoshiTodoButton extends LitElement {
/*button新元素 开始*/
.todo-status {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
padding: 0;
margin: 0;
@@ -661,7 +661,7 @@ class XiaoshiTodoButton extends LitElement {
/* 角标模式样式 */
.todo-status.badge-mode {
width: var(--button-width, 70px);
width: var(--button-width, 65px);
height: var(--button-height, 24px);
border-radius: 10px;
padding: 0;
@@ -1976,7 +1976,7 @@ class XiaoshiTodoButton extends LitElement {
if (config.button_width) {
this.style.setProperty('--button-width', config.button_width);
} else {
this.style.setProperty('--button-width', '70px');
this.style.setProperty('--button-width', '65px');
}
// 设置按钮高度(只控制 todo-status

View File

@@ -1,4 +1,4 @@
console.info("%c 消逝卡-平板端 \n%c v 0.1.9 ", "color: red; font-weight: bold; background: black", "color: white; font-weight: bold; background: black");
console.info("%c 消逝卡-平板端 \n%c v 0.2.0 ", "color: red; font-weight: bold; background: black", "color: white; font-weight: bold; background: black");
const loadCards = async () => {
await import('./xiaoshi-pad-grid-card.js');