mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
fix clipboard button
This commit is contained in:
parent
10c90b462c
commit
6ee21d2460
2 changed files with 17 additions and 9 deletions
|
@ -37,6 +37,9 @@
|
|||
.item.hover:before {
|
||||
content: ''; position: absolute; z-index: 0; width: 100%; height: 100%; left: 0px; top: 0px; background: var(--color-shape-highlight-light);
|
||||
}
|
||||
|
||||
.item.clipboard { opacity: 0.5; }
|
||||
.item.clipboard.active { opacity: 1; }
|
||||
}
|
||||
|
||||
.menu.menuQuickCapture.isExpanded {
|
||||
|
|
|
@ -96,6 +96,10 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
cn.push('isDefault');
|
||||
};
|
||||
|
||||
if (item.className) {
|
||||
cn.push(item.className);
|
||||
};
|
||||
|
||||
if ([ SystemIds.Search, SystemIds.Add, SystemIds.Clipboard ].includes(item.itemId)) {
|
||||
icon = <Icon className={item.itemId} />;
|
||||
} else {
|
||||
|
@ -251,6 +255,8 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
const { isExpanded } = this.state;
|
||||
const { space, type } = commonStore;
|
||||
const pinnedIds = Storage.getPinnedTypes();
|
||||
const hasClipboard = this.clipboardItems && this.clipboardItems.length;
|
||||
const cmd = keyboard.cmdSymbol();
|
||||
|
||||
let sections: any[] = [];
|
||||
let items: any[] = [];
|
||||
|
@ -315,15 +321,14 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
caption: '0',
|
||||
});
|
||||
|
||||
if (this.clipboardItems && this.clipboardItems.length) {
|
||||
items.push({
|
||||
id: SystemIds.Clipboard,
|
||||
icon: 'clipboard',
|
||||
name: '',
|
||||
tooltip: translate('menuQuickCaptureTooltipClipboard'),
|
||||
caption: '0',
|
||||
});
|
||||
};
|
||||
items.push({
|
||||
id: SystemIds.Clipboard,
|
||||
icon: 'clipboard',
|
||||
name: '',
|
||||
tooltip: translate('menuQuickCaptureTooltipClipboard'),
|
||||
caption: `${cmd} + V`,
|
||||
className: [ 'clipboard', (hasClipboard ? 'active' : '') ].join(' '),
|
||||
});
|
||||
|
||||
sections.push({ id: 'collapsed', children: items });
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue