mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-28 16:17:02 +00:00
Change metadata tag language setting style (#7636)
* change metadata lang setting * change tip text
This commit is contained in:
@@ -63,7 +63,7 @@ const MetadataFaceRecognitionDialog = ({ value: oldValue, repoID, toggleDialog:
|
||||
{!showTurnOffConfirmDialog && (
|
||||
<>
|
||||
<ModalBody className="metadata-face-recognition-dialog">
|
||||
{!enableMetadata && <p className="tip">{gettext('Please enable the extended properties setting first')}</p>}
|
||||
{!enableMetadata && <p className="tip">{gettext('Please turn on extended properties setting first')}</p>}
|
||||
<Switch
|
||||
checked={value}
|
||||
disabled={submitting || !enableMetadata}
|
||||
|
@@ -62,7 +62,7 @@ const MetadataOCRStatusManagementDialog = ({ value: oldValue, repoID, toggleDial
|
||||
{!showTurnOffConfirmDialog && (
|
||||
<>
|
||||
<ModalBody className="metadata-status-management-dialog">
|
||||
{!enableMetadata && <p className="tip">{gettext('Please enable the extended properties setting first')}</p>}
|
||||
{!enableMetadata && <p className="tip">{gettext('Please turn on extended properties setting first')}</p>}
|
||||
<Switch
|
||||
checked={value}
|
||||
disabled={submitting || !enableMetadata}
|
||||
|
@@ -1,10 +0,0 @@
|
||||
.tags-language-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tags-language-container .tags-language-selector {
|
||||
width: 200px;
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useCallback } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ModalBody, ModalFooter, Button } from 'reactstrap';
|
||||
import { ModalBody, ModalFooter, Button, FormGroup, Label } from 'reactstrap';
|
||||
import classnames from 'classnames';
|
||||
import Switch from '../../../../components/switch';
|
||||
import { gettext } from '../../../../utils/constants';
|
||||
@@ -10,8 +10,6 @@ import { Utils } from '../../../../utils/utils';
|
||||
import TurnOffConfirmDialog from '../turn-off-confirm-dialog';
|
||||
import { SeahubSelect } from '../../../../components/common/select';
|
||||
|
||||
import './index.css';
|
||||
|
||||
const langOptions = [
|
||||
{
|
||||
value: 'zh-cn',
|
||||
@@ -81,7 +79,7 @@ const MetadataTagsStatusDialog = ({ value: oldValue, lang: oldLang, repoID, togg
|
||||
{!showTurnOffConfirmDialog && (
|
||||
<>
|
||||
<ModalBody className="metadata-face-recognition-dialog">
|
||||
{!enableMetadata && <p className="tip">{gettext('Please enable the extended properties setting first')}</p>}
|
||||
{!enableMetadata && <p className="tip">{gettext('Please turn on extended properties setting first')}</p>}
|
||||
<Switch
|
||||
checked={value}
|
||||
disabled={submitting || !enableMetadata}
|
||||
@@ -91,21 +89,21 @@ const MetadataTagsStatusDialog = ({ value: oldValue, lang: oldLang, repoID, togg
|
||||
onChange={onValueChange}
|
||||
placeholder={gettext('Tags')}
|
||||
/>
|
||||
<p className="tip m-0">
|
||||
<p className="tip">
|
||||
{gettext('Enable tags to add tags to files and search files by tags.')}
|
||||
</p>
|
||||
{value && (
|
||||
<div className="tags-language-container">
|
||||
<span>{gettext('Tags language:')}</span>
|
||||
{value &&
|
||||
<FormGroup className="mt-6">
|
||||
<Label>{gettext('Language for tags generated by AI')}</Label>
|
||||
<SeahubSelect
|
||||
className='tags-language-selector'
|
||||
className='tags-language-selector w-75'
|
||||
value={langOptions.find(o => o.value === lang) || langOptions[1]}
|
||||
options={langOptions}
|
||||
onChange={onSelectChange}
|
||||
isClearable={false}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</FormGroup>
|
||||
}
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button color="secondary" onClick={onToggle}>{gettext('Cancel')}</Button>
|
||||
|
Reference in New Issue
Block a user