mirror of
https://github.com/xiaoshi930/xiaoshi-pad-card.git
synced 2025-11-29 00:59:42 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3c7d4a165 | ||
|
|
35a1a2e6a8 |
@@ -342,6 +342,10 @@ export class XiaoshiUpdateCard extends LitElement {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.current-version.outdated {
|
||||||
|
color: rgb(255,20,0);
|
||||||
|
}
|
||||||
|
|
||||||
.latest-version {
|
.latest-version {
|
||||||
color: var(--fg-color, #000);
|
color: var(--fg-color, #000);
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
@@ -690,9 +694,10 @@ export class XiaoshiUpdateCard extends LitElement {
|
|||||||
if (osEntity) {
|
if (osEntity) {
|
||||||
const current = osEntity.attributes.installed_version || '未知';
|
const current = osEntity.attributes.installed_version || '未知';
|
||||||
const latest = osEntity.attributes.latest_version || '未知';
|
const latest = osEntity.attributes.latest_version || '未知';
|
||||||
|
const osCurrentVersionClass = (current !== '未知' && latest !== '未知' && current !== latest) ? 'outdated' : '';
|
||||||
versionElements.push(html`
|
versionElements.push(html`
|
||||||
<div class="version-label">OS</div>
|
<div class="version-label">OS</div>
|
||||||
<div class="current-version">当前版本:${current}</div>
|
<div class="current-version ${osCurrentVersionClass}">当前版本:${current}</div>
|
||||||
<div class="latest-version">最新版本:${latest}</div>
|
<div class="latest-version">最新版本:${latest}</div>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
@@ -702,9 +707,10 @@ export class XiaoshiUpdateCard extends LitElement {
|
|||||||
if (coreEntity) {
|
if (coreEntity) {
|
||||||
const current = coreEntity.attributes.installed_version || '未知';
|
const current = coreEntity.attributes.installed_version || '未知';
|
||||||
const latest = coreEntity.attributes.latest_version || '未知';
|
const latest = coreEntity.attributes.latest_version || '未知';
|
||||||
|
const coreCurrentVersionClass = (current !== '未知' && latest !== '未知' && current !== latest) ? 'outdated' : '';
|
||||||
versionElements.push(html`
|
versionElements.push(html`
|
||||||
<div class="version-label">Core</div>
|
<div class="version-label">Core</div>
|
||||||
<div class="current-version">当前版本:${current}</div>
|
<div class="current-version ${coreCurrentVersionClass}">当前版本:${current}</div>
|
||||||
<div class="latest-version">最新版本:${latest}</div>
|
<div class="latest-version">最新版本:${latest}</div>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
@@ -714,9 +720,10 @@ export class XiaoshiUpdateCard extends LitElement {
|
|||||||
if (supervisorEntity) {
|
if (supervisorEntity) {
|
||||||
const current = supervisorEntity.attributes.installed_version || '未知';
|
const current = supervisorEntity.attributes.installed_version || '未知';
|
||||||
const latest = supervisorEntity.attributes.latest_version || '未知';
|
const latest = supervisorEntity.attributes.latest_version || '未知';
|
||||||
|
const supervisorCurrentVersionClass = (current !== '未知' && latest !== '未知' && current !== latest) ? 'outdated' : '';
|
||||||
versionElements.push(html`
|
versionElements.push(html`
|
||||||
<div class="version-label">Supervisor</div>
|
<div class="version-label">Supervisor</div>
|
||||||
<div class="current-version">当前版本:${current}</div>
|
<div class="current-version ${supervisorCurrentVersionClass}">当前版本:${current}</div>
|
||||||
<div class="latest-version">最新版本:${latest}</div>
|
<div class="latest-version">最新版本:${latest}</div>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
console.info("%c 消逝卡-平板端 \n%c v 0.0.1 ", "color: red; font-weight: bold; background: black", "color: white; font-weight: bold; background: black");
|
console.info("%c 消逝卡-平板端 \n%c v 0.0.2 ", "color: red; font-weight: bold; background: black", "color: white; font-weight: bold; background: black");
|
||||||
|
|
||||||
const loadCards = async () => {
|
const loadCards = async () => {
|
||||||
await import('./xiaoshi-pad-grid-card.js');
|
await import('./xiaoshi-pad-grid-card.js');
|
||||||
|
|||||||
Reference in New Issue
Block a user