feat: 添加更新卡片提醒样式和测试
This commit is contained in:
@@ -523,6 +523,18 @@ header {
|
|||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.update-card-reminder {
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px 10px;
|
||||||
|
border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--border));
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
background: color-mix(in srgb, var(--orange-soft) 70%, var(--bg-base));
|
||||||
|
color: var(--orange);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
.update-release-list {
|
.update-release-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -100,6 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<button id="btn-open-release" class="btn btn-primary btn-sm" type="button">前往更新</button>
|
<button id="btn-open-release" class="btn btn-primary btn-sm" type="button">前往更新</button>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="update-card-reminder">请更新前导出配置</p>
|
||||||
<div id="update-release-list" class="update-release-list"></div>
|
<div id="update-release-list" class="update-release-list"></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -816,4 +817,4 @@
|
|||||||
<script src="sidepanel.js"></script>
|
<script src="sidepanel.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -19,6 +19,16 @@ test('sidepanel source binds the icloud fetch mode control before using it', ()
|
|||||||
assert.match(source, /selectIcloudFetchMode\?\.addEventListener\('change'/);
|
assert.match(source, /selectIcloudFetchMode\?\.addEventListener\('change'/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('update card highlights exporting config before upgrade', () => {
|
||||||
|
const html = fs.readFileSync('sidepanel/sidepanel.html', 'utf8');
|
||||||
|
const css = fs.readFileSync('sidepanel/sidepanel.css', 'utf8');
|
||||||
|
|
||||||
|
assert.match(html, /<p class="update-card-reminder">请更新前导出配置<\/p>/);
|
||||||
|
assert.match(css, /\.update-card-reminder\s*\{/);
|
||||||
|
assert.match(css, /font-weight:\s*700;/);
|
||||||
|
assert.match(css, /color:\s*var\(--orange\);/);
|
||||||
|
});
|
||||||
|
|
||||||
test('icloud manager exposes a factory and renders empty state', () => {
|
test('icloud manager exposes a factory and renders empty state', () => {
|
||||||
const source = fs.readFileSync('sidepanel/icloud-manager.js', 'utf8');
|
const source = fs.readFileSync('sidepanel/icloud-manager.js', 'utf8');
|
||||||
const windowObject = {};
|
const windowObject = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user