This commit is contained in:
Rao 2025-04-08 10:24:14 +08:00
parent ca079e0096
commit 111288b07d
5 changed files with 22 additions and 24 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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">

View File

@ -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)
@ -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' }}>