Skip to content

Commit

Permalink
fix auto tagging extension compile (#4330)
Browse files Browse the repository at this point in the history
* fix auto tagging extension compile

* fix labels

* fix labels
  • Loading branch information
petrjasek authored Sep 22, 2023
1 parent 0839596 commit 528eeb1
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class UploadAttachmentsModal extends React.PureComponent<IProps, IState>
<div className="other-info">
<div className="form__row">
<Switch
label={{text: gettext('Internal'), hidden: true}}
label={{content: gettext('Internal'), hidden: true}}
value={item.meta.internal}
onChange={(value) => {
this.updateItemMeta(index, 'internal', value);
Expand Down
4 changes: 2 additions & 2 deletions scripts/apps/master-desk/components/HeaderComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class HeaderComponent extends React.Component<IProps, IState> {
<label>{gettext('Show all')}</label>
<div className="pull-right">
<Switch
label={{text: gettext('Show all'), hidden: true}}
label={{content: gettext('Show all'), hidden: true}}
value={this.state.showAllDesks}
onChange={() => this.toggleShowAll()}
/>
Expand All @@ -240,7 +240,7 @@ export class HeaderComponent extends React.Component<IProps, IState> {
<label>{item.name}</label>
<div className="pull-right">
<Switch
label={{text: item.name, hidden: true}}
label={{content: item.name, hidden: true}}
value={this.isDeskActive(item)}
onChange={() => this.toggleDesk(item)}
/>
Expand Down
4 changes: 2 additions & 2 deletions scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export function getAutoTaggingComponent(superdesk: ISuperdesk, label: string) {
this.runAnalysis();
}
}}
label={{text: gettext('Run automatically')}}
label={{content: gettext('Run automatically')}}
/>
<Switch
value={showImagesPreference}
Expand All @@ -490,7 +490,7 @@ export function getAutoTaggingComponent(superdesk: ISuperdesk, label: string) {
this.setState({showImagesPreference: newValue});
superdesk.preferences.set(SHOW_IMAGES_PREFERENCE, newValue);
}}
label={{text: gettext('Show image suggestions')}}
label={{content: gettext('Show image suggestions')}}
/>
</ButtonGroup>
</div>
Expand Down
2 changes: 1 addition & 1 deletion scripts/extensions/datetimeField/src/getDateTimeField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getDateTimeField(superdesk: ISuperdesk) {
render() {
const checkbox = this.props.hideToggle !== true ? (
<Switch
label={{text: ''}}
label={{content: ''}}
value={this.props.value != null}
onChange={(value) => {
if (value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getToggleDateTimeField(superdesk: ISuperdesk) {
const initialConfig = this.props?.config?.initial_offset_minutes;
const checkbox = (
<Switch
label={{text: ''}}
label={{content: ''}}
value={this.props.value != null}
onChange={(value) => {
if (value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export class SetEditorPanelComponent extends React.Component<IProps, IState> {
<FormGroup>
<FormRow>
<Switch
label={{text: gettext('Enabled'), side: 'left'}}
label={{content: gettext('Enabled'), side: 'left'}}
value={updates.state === SET_STATE.USABLE}
onChange={this.onChange.state}
/>
Expand Down
Loading

0 comments on commit 528eeb1

Please sign in to comment.