Compare commits

...

10 Commits

Author SHA1 Message Date
xiaoshi
513a906231 Update xiaoshi-pad-card.js 2025-12-06 20:31:27 +08:00
xiaoshi
bcc4585278 Add files via upload 2025-12-06 20:31:12 +08:00
xiaoshi
b5598387a1 Delete xiaoshi-device-todo-button.js 2025-12-06 20:30:55 +08:00
xiaoshi
fbdece70f9 Delete xiaoshi-device-ha-info-button.js 2025-12-06 20:30:47 +08:00
xiaoshi
85c7123854 Delete xiaoshi-device-consumables-button.js 2025-12-06 20:30:39 +08:00
xiaoshi
daae901d1b Delete xiaoshi-device-balance-button.js 2025-12-06 20:30:31 +08:00
xiaoshi
b221bacb78 Update xiaoshi-pad-card.js 2025-12-06 20:16:56 +08:00
xiaoshi
7b7f0c632d Update xiaoshi-device-todo-button.js 2025-12-06 20:16:06 +08:00
xiaoshi
1523dc76d3 Update xiaoshi-device-ha-info-button.js 2025-12-06 20:15:52 +08:00
xiaoshi
20eae200c1 Update xiaoshi-device-consumables-button.js 2025-12-06 20:15:39 +08:00
5 changed files with 35 additions and 31 deletions

View File

@@ -327,13 +327,13 @@ class XiaoshiBalanceButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮图标大小:支持像素(px)默认15px</label>
<label>按钮图标大小:支持像素(px)默认13px</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '15px'}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '13px'}
name="button_icon_size"
placeholder="默认15px"
placeholder="默认13px"
/>
</div>
@@ -624,7 +624,7 @@ class XiaoshiBalanceButtonEditor extends LitElement {
} else if (name === 'button_font_size') {
finalValue = value || '11px';
} else if (name === 'button_icon_size') {
finalValue = value || '15px';
finalValue = value || '13px';
} else if (name === 'width') {
finalValue = value || '100%';
} else if (name === 'display_mode') {
@@ -955,8 +955,9 @@ class XiaoshiBalanceButton extends LitElement {
}
.status-icon {
--mdc-icon-size: var(--button-icon-size, 15px);
--mdc-icon-size: var(--button-icon-size, 13px);
color: var(--fg-color, #000);
margin-right: 3px;
}
/*button新元素 结束*/
@@ -1806,7 +1807,7 @@ class XiaoshiBalanceButton extends LitElement {
if (config.button_icon_size) {
this.style.setProperty('--button-icon-size', config.button_icon_size);
} else {
this.style.setProperty('--button-icon-size', '15px');
this.style.setProperty('--button-icon-size', '13px');
}
// 设置卡片宽度(控制原来的 UI

View File

@@ -375,13 +375,13 @@ class XiaoshiConsumablesButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮图标大小:支持像素(px)默认15px</label>
<label>按钮图标大小:支持像素(px)默认13px</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '15px'}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '13px'}
name="button_icon_size"
placeholder="默认15px"
placeholder="默认13px"
/>
</div>
@@ -691,7 +691,7 @@ class XiaoshiConsumablesButtonEditor extends LitElement {
} else if (name === 'button_font_size') {
finalValue = value || '11px';
} else if (name === 'button_icon_size') {
finalValue = value || '15px';
finalValue = value || '13px';
} else if (name === 'width') {
finalValue = value || '100%';
} else if (name === 'tap_action') {
@@ -940,8 +940,9 @@ class XiaoshiConsumablesButton extends LitElement {
}
.status-icon {
--mdc-icon-size: var(--button-icon-size, 15px);
--mdc-icon-size: var(--button-icon-size, 13px);
color: var(--fg-color, #000);
margin-right: 3px;
}
/* 角标模式样式 */
@@ -1896,7 +1897,7 @@ class XiaoshiConsumablesButton extends LitElement {
buttonHtml = html`
<div class="consumables-status" style="--fg-color: ${fgColor}; --bg-color: ${buttonBgColor};" @click=${this._handleButtonClick}>
${!hideIcon ? html`<ha-icon class="status-icon" icon="${buttonIcon}"></ha-icon>` : ''}
${!hideIcon ? html`<ha-icon class="status-icon" style="color: ${fgColor};" icon="${buttonIcon}"></ha-icon>` : ''}
${displayText}
</div>
`;
@@ -1936,7 +1937,7 @@ class XiaoshiConsumablesButton extends LitElement {
buttonHtml = html`
<div class="consumables-status" style="--fg-color: ${textColor}; --bg-color: ${buttonBgColor};" @click=${this._handleButtonClick}>
${!hideIcon ? html`<ha-icon class="status-icon" icon="${buttonIcon}"></ha-icon>` : ''}
${!hideIcon ? html`<ha-icon class="status-icon" style="color: ${fgColor};" icon="${buttonIcon}"></ha-icon>` : ''}
${displayText}
</div>
`;
@@ -2013,7 +2014,7 @@ class XiaoshiConsumablesButton extends LitElement {
if (config.button_icon_size) {
this.style.setProperty('--button-icon-size', config.button_icon_size);
} else {
this.style.setProperty('--button-icon-size', '15px');
this.style.setProperty('--button-icon-size', '13px');
}
// 设置卡片宽度(控制原来的 UI

View File

@@ -206,13 +206,13 @@ class XiaoshiHaInfoButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮图标大小:支持像素(px)默认15px</label>
<label>按钮图标大小:支持像素(px)默认13px</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '15px'}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '13px'}
name="button_icon_size"
placeholder="默认15px"
placeholder="默认13px"
/>
</div>
@@ -354,7 +354,7 @@ template: 测试模板(最好引用模板,否则大概率会报错)'>
} else if (name === 'button_font_size') {
finalValue = value || '11px';
} else if (name === 'button_icon_size') {
finalValue = value || '15px';
finalValue = value || '13px';
} else if (name === 'width') {
finalValue = value || '100%';
} else if (name === 'exclude_entities') {
@@ -438,8 +438,9 @@ export class XiaoshiHaInfoButton extends LitElement {
}
.status-icon {
--mdc-icon-size: var(--button-icon-size, 15px);
--mdc-icon-size: var(--button-icon-size, 13px);
color: var(--fg-color, #000);
margin-right: 3px;
}
/* 角标模式样式 */
@@ -1826,7 +1827,7 @@ export class XiaoshiHaInfoButton extends LitElement {
buttonHtml = html`
<div class="ha-info-status" style="--fg-color: ${fgColor}; --bg-color: ${buttonBgColor};" @click=${this._handleButtonClick}>
${!hideIcon ? html`<ha-icon class="status-icon" icon="${buttonIcon}"></ha-icon>` : ''}
${!hideIcon ? html`<ha-icon class="status-icon" style="color: ${fgColor};" icon="${buttonIcon}"></ha-icon>` : ''}
${displayText}
</div>
`;
@@ -1866,7 +1867,7 @@ export class XiaoshiHaInfoButton extends LitElement {
buttonHtml = html`
<div class="ha-info-status" style="--fg-color: ${textColor}; --bg-color: ${buttonBgColor};" @click=${this._handleButtonClick}>
${!hideIcon ? html`<ha-icon class="status-icon" icon="${buttonIcon}"></ha-icon>` : ''}
${!hideIcon ? html`<ha-icon class="status-icon" style="color: ${fgColor};" icon="${buttonIcon}"></ha-icon>` : ''}
${displayText}
</div>
`;
@@ -2073,7 +2074,7 @@ export class XiaoshiHaInfoButton extends LitElement {
if (config.button_icon_size) {
this.style.setProperty('--button-icon-size', config.button_icon_size);
} else {
this.style.setProperty('--button-icon-size', '15px');
this.style.setProperty('--button-icon-size', '13px');
}
// 设置卡片宽度(控制原来的 UI

View File

@@ -326,13 +326,13 @@ class XiaoshiTodoButtonEditor extends LitElement {
</div>
<div class="form-group">
<label>按钮图标大小:支持像素(px)默认15px</label>
<label>按钮图标大小:支持像素(px)默认13px</label>
<input
type="text"
@change=${this._entityChanged}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '15px'}
.value=${this.config.button_icon_size !== undefined ? this.config.button_icon_size : '13px'}
name="button_icon_size"
placeholder="默认15px"
placeholder="默认13px"
/>
</div>
@@ -491,7 +491,7 @@ class XiaoshiTodoButtonEditor extends LitElement {
} else if (name === 'button_font_size') {
finalValue = value || '11px';
} else if (name === 'button_icon_size') {
finalValue = value || '15px';
finalValue = value || '13px';
} else if (name === 'width') {
finalValue = value || '100%';
} else if (name === 'tap_action') {
@@ -654,8 +654,9 @@ class XiaoshiTodoButton extends LitElement {
}
.status-icon {
--mdc-icon-size: var(--button-icon-size, 15px);
--mdc-icon-size: var(--button-icon-size, 13px);
color: var(--fg-color, #000);
margin-right: 3px;
}
/* 角标模式样式 */
@@ -1663,7 +1664,7 @@ class XiaoshiTodoButton extends LitElement {
buttonHtml = html`
<div class="todo-status" style="--fg-color: ${fgColor}; --bg-color: ${buttonBgColor};" @click=${this._handleButtonClick}>
${!hideIcon ? html`<ha-icon class="status-icon" icon="${buttonIcon}"></ha-icon>` : ''}
${!hideIcon ? html`<ha-icon class="status-icon" style="color: ${fgColor};" icon="${buttonIcon}"></ha-icon>` : ''}
${displayText}
</div>
`;
@@ -1703,7 +1704,7 @@ class XiaoshiTodoButton extends LitElement {
buttonHtml = html`
<div class="todo-status" style="--fg-color: ${textColor}; --bg-color: ${buttonBgColor};" @click=${this._handleButtonClick}>
${!hideIcon ? html`<ha-icon class="status-icon" icon="${buttonIcon}"></ha-icon>` : ''}
${!hideIcon ? html`<ha-icon class="status-icon" style="color: ${fgColor};" icon="${buttonIcon}"></ha-icon>` : ''}
${displayText}
</div>
`;
@@ -1996,7 +1997,7 @@ class XiaoshiTodoButton extends LitElement {
if (config.button_icon_size) {
this.style.setProperty('--button-icon-size', config.button_icon_size);
} else {
this.style.setProperty('--button-icon-size', '15px');
this.style.setProperty('--button-icon-size', '13px');
}
// 设置卡片宽度(控制原来的 UI

View File

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