mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-20 21:23:37 +03:00
fix(core): sync indicator style (#15863)
#### PR Dependency Tree * **PR #15863** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * The notification menu item no longer displays an active state solely because the notification list is open; opening and closing the list works as before. * **Style** * Refined the layout of the workspace sync-status button while preserving its existing label and appearance details. The status content now has more consistent spacing and alignment within the workspace card. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
d863bfcd67
commit
0d594345a3
4 files changed
+19
-8
No files matched your search
@@ -55,10 +55,16 @@ jobs:
|
||||
const fs = require('node:fs');
|
||||
const releases = await github.paginate(github.rest.repos.listReleases, {...context.repo, per_page: 100});
|
||||
for (const release of releases) {
|
||||
const asset = release.assets.find(asset => asset.name === 'affine-release-completed.json');
|
||||
if (!asset) continue;
|
||||
const response = await github.rest.repos.getReleaseAsset({...context.repo, asset_id: asset.id, headers: {accept:'application/octet-stream'}});
|
||||
const previous = JSON.parse(Buffer.from(response.data).toString('utf8'));
|
||||
const embedded = release.body?.match(/<!-- affine-release-completed\n([^]*?)\n-->/);
|
||||
let previous;
|
||||
if (embedded) {
|
||||
previous = JSON.parse(embedded[1]);
|
||||
} else {
|
||||
const asset = release.assets.find(asset => asset.name === 'affine-release-completed.json');
|
||||
if (!asset) continue;
|
||||
const response = await github.rest.repos.getReleaseAsset({...context.repo, asset_id: asset.id, headers: {accept:'application/octet-stream'}});
|
||||
previous = JSON.parse(Buffer.from(response.data).toString('utf8'));
|
||||
}
|
||||
if (previous.request.channel !== 'canary') continue;
|
||||
fs.writeFileSync('release-previous.json', JSON.stringify(previous));
|
||||
break;
|
||||
|
||||
@@ -56,7 +56,6 @@ export const NotificationButton = () => {
|
||||
<MenuItem
|
||||
icon={<NotificationIcon />}
|
||||
postfix={<Badge count={notificationCount} />}
|
||||
active={notificationListOpen}
|
||||
postfixDisplay="always"
|
||||
>
|
||||
<span data-testid="notification-button">
|
||||
|
||||
@@ -337,8 +337,10 @@ const WorkspaceSyncInfo = ({
|
||||
>
|
||||
<Button
|
||||
variant="plain"
|
||||
size="custom"
|
||||
aria-label="Sync status"
|
||||
className={styles.workspaceActiveStatus}
|
||||
contentClassName={styles.workspaceActiveStatusContent}
|
||||
onClick={event => event.stopPropagation()}
|
||||
>
|
||||
{syncStatus.icon}
|
||||
|
||||
+7
-3
@@ -120,13 +120,17 @@ globalStyle(`.${workspaceStatus} svg`, {
|
||||
});
|
||||
|
||||
export const workspaceActiveStatus = style({
|
||||
display: 'flex',
|
||||
gap: 2,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
padding: 0,
|
||||
fontSize: cssVar('fontSm'),
|
||||
lineHeight: '22px',
|
||||
color: cssVar('textSecondaryColor'),
|
||||
});
|
||||
export const workspaceActiveStatusContent = style({
|
||||
display: 'flex',
|
||||
gap: 2,
|
||||
alignItems: 'center',
|
||||
});
|
||||
globalStyle(`.${workspaceActiveStatus} svg`, {
|
||||
width: 16,
|
||||
height: 16,
|
||||
|
||||
Reference in new issue
Block a user