aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentButtonBar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r--src/client/views/DocumentButtonBar.tsx55
1 files changed, 53 insertions, 2 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx
index 58b7f207c..f1820cdd1 100644
--- a/src/client/views/DocumentButtonBar.tsx
+++ b/src/client/views/DocumentButtonBar.tsx
@@ -282,12 +282,63 @@ export class DocumentButtonBar extends ObservableReactComponent<{ views: () => (
@computed
get keywordButton() {
- return !DocumentView.Selected().length ? null : (
+ const targetDoc = this.view0?.Document;
+
+ const metaBtn = (name: string, icon: IconProp) => {
+ const tooltip = `Toggle ${name}`;
+ return (
+ <Tooltip title={<div className="dash-tooltip">{tooltip}</div>}>
+ <div className="documentButtonBar-pinIcon">
+ <FontAwesomeIcon
+ className="documentdecorations-icon"
+ style={{ width: 20 }}
+ key={icon.toString()}
+ size="sm"
+ icon={icon}
+ onClick={e => {
+ // console.log('wtfff')
+ // name === 'tags' ??
+ if (name === 'tags'){
+ (targetDoc && (targetDoc[DocData].showIconTags = !targetDoc[DocData].showIconTags))
+ } else {
+ (targetDoc && (targetDoc[DocData].showLabels = !targetDoc[DocData].showLabels))
+ }
+
+
+
+
+ }}
+ />
+ </div>
+ </Tooltip>
+ );
+ };
+
+
+
+
+ return !targetDoc ? null : (
+ <div className='documentButtonBar-icon'>
+ <div className="documentButtonBar-pinTypes" style = {{width: '40px'}}>
+ {metaBtn('tags', 'star')}
+ {metaBtn("keywords", 'id-card')}
+ </div>
+
<Tooltip title={<div className="dash-keyword-button">Open keyword menu</div>}>
- <div className="documentButtonBar-icon" style={{ color: 'white' }} onClick={() => DocumentView.Selected().map(dv => (dv.dataDoc.showTags = !dv.dataDoc.showTags))}>
+ <div
+ className="documentButtonBar-icon"
+ style={{ color: 'white' }}
+ onClick={() => {
+ // targetDoc[DocData].showIconTags = !targetDoc[DocData].showIconTags;
+ }}
+ >
+
+
<FontAwesomeIcon className="documentdecorations-icon" icon="tag" />
</div>
</Tooltip>
+ </div>
+
);
}