rht
This commit is contained in:
parent
ca079e0096
commit
111288b07d
|
@ -4,6 +4,7 @@ backup
|
|||
**/node_modules/
|
||||
volumes
|
||||
web-dist
|
||||
web-dist.zip
|
||||
/.pnp
|
||||
.pnp.js
|
||||
*.tar
|
||||
|
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 737 B |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 737 B |
|
@ -41,7 +41,7 @@ export default function DeptSettingPage() {
|
|||
(<Spin spinning={isGetingFileId} fullscreen />) :
|
||||
(<div style={{ maxWidth: '1000px', margin: '0 auto', padding: '20px' }}>
|
||||
<div className="flex items-center">
|
||||
<img src="/logo.svg" className="h-20 w-20 rounded-xl" />
|
||||
<img src="/logo.svg" className="h-16 w-16 rounded-xl" />
|
||||
<span className="text-4xl py-4 mx-4">烽火快传</span>
|
||||
</div>
|
||||
<Tabs defaultActiveKey="upload">
|
||||
|
|
|
@ -54,7 +54,7 @@ export const ShareCodeGenerator: React.FC<ShareCodeGeneratorProps> = ({
|
|||
try {
|
||||
const data: ShareCodeResponse = await generateShareCode.mutateAsync({
|
||||
fileId,
|
||||
expiresAt: form.getFieldsValue()?.expiresAt ? form.getFieldsValue().expiresAt.toDate() : dayjs().add(1, 'day').tz('Asia/Shanghai').toDate(),
|
||||
expiresAt: form.getFieldsValue()?.expiresAt ? form.getFieldsValue().expiresAt.tz('Asia/Shanghai').toDate() : dayjs().add(1, 'day').tz('Asia/Shanghai').toDate(),
|
||||
canUseTimes: form.getFieldsValue()?.canUseTimes ? form.getFieldsValue().canUseTimes : 10,
|
||||
});
|
||||
console.log('data', data)
|
||||
|
@ -97,7 +97,7 @@ export const ShareCodeGenerator: React.FC<ShareCodeGeneratorProps> = ({
|
|||
});
|
||||
}, [form]);
|
||||
|
||||
useEffect(()=>{
|
||||
useEffect(() => {
|
||||
if (fileId) {
|
||||
generateCode()
|
||||
}
|
||||
|
@ -117,6 +117,21 @@ export const ShareCodeGenerator: React.FC<ShareCodeGeneratorProps> = ({
|
|||
<Form.Item name="expiresAt" className='mt-5'>
|
||||
<DatePicker
|
||||
showTime
|
||||
disabledDate={(current) => current && current < dayjs().startOf('day')}
|
||||
disabledTime={(current) => {
|
||||
if (current && current.isSame(dayjs(), 'day')) {
|
||||
return {
|
||||
disabledHours: () => [...Array(dayjs().hour() + 1).keys()],
|
||||
disabledMinutes: (selectedHour) => {
|
||||
if (selectedHour === dayjs().hour()) {
|
||||
return [...Array(dayjs().minute() + 1).keys()];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<small style={{ color: '#666' }}>
|
||||
|
|
Loading…
Reference in New Issue