Skip to content

Commit

Permalink
chore: only show add to sheet if logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekaplan123 committed Oct 14, 2024
1 parent 5cd5a23 commit ef5752b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion static/js/ConnectionsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ const ToolsList = ({ setConnectionsMode, toggleSignUpModal, openComparePanel, co
// A list of Resources in addition to connection
return (
<div className="toolButtonsList">
<ToolsButton en="Add to Sheet" he="הוספה לדף מקורות" image="sheetsplus.svg" onClick={() => !Sefaria._uid ? toggleSignUpModal(SignUpModalKind.AddToSheet) : setConnectionsMode("Add To Sheet", { "addSource": "mainPanel" })} />
{Sefaria._uid && <ToolsButton en="Add to Sheet" he="הוספה לדף מקורות" image="sheetsplus.svg" onClick={() => setConnectionsMode("Add To Sheet", { "addSource": "mainPanel" })} />}
<ToolsButton en="Dictionaries" he="מילונים" image="dictionaries.svg" urlConnectionsMode="Lexicon" onClick={() => setConnectionsMode("Lexicon")} />
{openComparePanel ? <ToolsButton en="Compare Text" he="טקסט להשוואה" image="compare-panel.svg" onClick={openComparePanel} /> : null}
<ToolsButton en="Notes" he="הערות" image="notes.svg" alwaysShow={true} count={counts["notes"]} urlConnectionsMode="Notes" onClick={() => !Sefaria._uid ? toggleSignUpModal(SignUpModalKind.Notes) : setConnectionsMode("Notes")} />
Expand Down
2 changes: 1 addition & 1 deletion static/js/TextList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class TextList extends Component {
/>
<ConnectionButtons>
<OpenConnectionTabButton srefs={[link.sourceRef]} openInTabCallback={this.props.onTextClick}/>
<AddConnectionToSheetButton srefs={[link.sourceRef]} addToSheetCallback={this.props.setConnectionsMode}/>
{Sefaria._uid && <AddConnectionToSheetButton srefs={[link.sourceRef]} addToSheetCallback={this.props.setConnectionsMode}/>}
{Sefaria.is_moderator ?
<DeleteConnectionButton delUrl={"/api/links/" + link._id} connectionDeleteCallback={this.onDataChange}/> : null
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/TranslationsBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class VersionsTextList extends Component {
/>
<ConnectionButtons>
<OpenConnectionTabButton srefs={this.props.srefs} openInTabCallback={onRangeClick}/>
<AddConnectionToSheetButton srefs={this.props.srefs} versions={{[language]: vTitle}} addToSheetCallback={this.props.setConnectionsMode}/>
{Sefaria._uid && <AddConnectionToSheetButton srefs={this.props.srefs} versions={{[language]: vTitle}} addToSheetCallback={this.props.setConnectionsMode}/>}
</ConnectionButtons>
</div>);
}
Expand Down

0 comments on commit ef5752b

Please sign in to comment.