From c2a2b8c119c44b167310485cede0920f313cd40a Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Tue, 11 Jun 2024 01:56:17 -0400
Subject: rowmenu info icons

---
 .../views/collections/collectionSchema/SchemaRowBox.tsx     | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')

diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index a0d3144ce..98a16deea 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -7,7 +7,7 @@ import { CgClose, CgLock, CgLockUnlock, CgMenu } from 'react-icons/cg';
 import { FaExternalLinkAlt } from 'react-icons/fa';
 import { returnFalse, setupMoveUpEvents } from '../../../../ClientUtils';
 import { emptyFunction } from '../../../../Utils';
-import { Doc, DocListCast } from '../../../../fields/Doc';
+import { Doc, DocListCast, FieldResult } from '../../../../fields/Doc';
 import { BoolCast } from '../../../../fields/Types';
 import { Transform } from '../../../util/Transform';
 import { undoable } from '../../../util/UndoManager';
@@ -21,6 +21,7 @@ import { SchemaTableCell } from './SchemaTableCell';
 import { ContextMenu } from '../../ContextMenu';
 import { CollectionFreeFormView } from '../collectionFreeForm';
 import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { IconProp } from '@fortawesome/fontawesome-svg-core';
 
 interface SchemaRowBoxProps extends FieldViewProps {
     rowIndex: number;
@@ -94,6 +95,13 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
         return ''
     }
 
+    get menuInfos() {
+        const infos: Array<IconProp> = [];
+        if (this.Document._lockedSchemaEditing) infos.push('lock');
+        if (this.Document._childrenSharedWithSchema) infos.push('star');
+        return infos;
+    }
+
     cleanupField = (field: string) => this.schemaView.cleanupComputedField(field)
     setCursorIndex = (mouseY: number) => this.schemaView?.setRelCursorIndex(mouseY);
     selectedCol = () => this.schemaView._selectedCol;
@@ -113,6 +121,9 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
                     row && this.schemaView?.addRowRef?.(this.Document, row);
                     this._ref = row;
                 }}>
+                <div className="row-menu-infos">
+                    {this.menuInfos.map(icn => <FontAwesomeIcon className="row-infos-icon" icon={icn} size='2xs' />)}
+                </div>
                 <div
                     className="row-menu"
                     style={{
-- 
cgit v1.2.3-70-g09d2

