Skip to content

Commit f6cbec5

Browse files
committed
fix:issue vastsa#103
1 parent 206c37f commit f6cbec5

6 files changed

Lines changed: 101 additions & 93 deletions

File tree

apps/admin/depends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
async def admin_required(authorization: Union[str, None] = Header(default=None), request: Request = None):
13-
is_admin = authorization == settings.admin_token
13+
is_admin = authorization == str(settings.admin_token)
1414
if request.url.path.startswith('/share/'):
1515
if not settings.openUpload and not is_admin:
1616
raise HTTPException(status_code=403, detail='本站未开启游客上传,如需上传请先登录后台')

fcb-fronted/components.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ declare module 'vue' {
1010
CardTools: typeof import('./src/components/CardTools.vue')['default']
1111
ElButton: typeof import('element-plus/es')['ElButton']
1212
ElCard: typeof import('element-plus/es')['ElCard']
13+
ElCarousel: typeof import('element-plus/es')['ElCarousel']
14+
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
1315
ElCol: typeof import('element-plus/es')['ElCol']
1416
ElContainer: typeof import('element-plus/es')['ElContainer']
1517
ElDialog: typeof import('element-plus/es')['ElDialog']

fcb-fronted/src/assets/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
.card {
1111
max-width: 400px;
12+
min-width: 398px;
1213
height: 100%;
1314
background-color: #F8FBFE;
1415
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);

fcb-fronted/src/locals/en.ts

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
export default {
22
send: {
3-
'mzsm':'Disclaimers',
4-
'alert':'According to the relevant provisions of the Cybersecurity Law of the People\'s Republic of China, the Criminal Law of the People\'s Republic of China, the Law on Public Security Administration Punishments of the People\'s Republic of China, and other relevant regulations, the dissemination or storage of illegal or irregular content may be subject to corresponding penalties, and those who commit serious offenses will bear criminal responsibility. Please refrain from uploading illegal files. This website firmly cooperates with relevant departments to ensure the security and harmony of online content, and to create a green cyber environment.',
5-
'prompt1': 'Drag and drop text or files here, or ',
6-
'prompt2': 'Days <7 or limited times (deleted after 24h)',
7-
'prompt3': 'Please enter the text you want to send',
8-
'share': 'Share',
9-
'textShare': 'Text Share',
10-
'clickUpload': 'Click to upload',
11-
'pleaseInputExpireValue': 'Please enter expiration value',
12-
'expireStyle': 'Expiration style',
13-
'expireData': {
14-
'day': 'Days',
15-
'hour': 'Hours',
16-
'forever': 'Forever',
17-
'minute': 'Minutes',
18-
'count': 'Times'
3+
mzsm:'Disclaimers',
4+
alert:'According to the relevant provisions of the Cybersecurity Law of the People\'s Republic of China, the Criminal Law of the People\'s Republic of China, the Law on Public Security Administration Punishments of the People\'s Republic of China, and other relevant regulations, the dissemination or storage of illegal or irregular content may be subject to corresponding penalties, and those who commit serious offenses will bear criminal responsibility. Please refrain from uploading illegal files. This website firmly cooperates with relevant departments to ensure the security and harmony of online content, and to create a green cyber environment.',
5+
prompt1: 'Drag and drop text or files here, or ',
6+
prompt2: 'Days <7 or limited times (deleted after 24h)',
7+
prompt3: 'Please enter the text you want to send',
8+
share: 'Share',
9+
textShare: 'Text Share',
10+
clickUpload: 'Click to upload',
11+
pleaseInputExpireValue: 'Please enter expiration value',
12+
expireStyle: 'Expiration style',
13+
expireData: {
14+
day: 'Days',
15+
hour: 'Hours',
16+
forever: 'Forever',
17+
minute: 'Minutes',
18+
count: 'Times'
1919
},
20-
'expireValue': {
21-
'day': 'Days',
22-
'hour': 'Hours',
23-
'minute': 'Minutes',
24-
'count': 'Times'
20+
expireValue: {
21+
day: 'Days',
22+
hour: 'Hours',
23+
minute: 'Minutes',
24+
count: 'Times'
2525
},
26-
'fileType': {
27-
'file': 'File',
28-
'text': 'Text'
26+
fileType: {
27+
file: 'File',
28+
text: 'Text'
2929
}
3030
},
3131
fileBox: {
@@ -42,8 +42,8 @@ export default {
4242
},
4343
admin:{
4444
about:{
45-
'source1':'This project is open source on Github: ',
46-
'source2':'FileCodeBox'
45+
source1:'This project is open source on Github: ',
46+
source2:'FileCodeBox'
4747
},
4848
settings: {
4949
name: 'Website Name',
@@ -54,16 +54,16 @@ export default {
5454
uploadSize: 'File Size',
5555
uploadSizeNote: 'Maximum file size, unit: (bit), 1mb = 1 * 1024 * 1024',
5656
openUpload: {
57-
'title': 'Enable Upload',
58-
'open': 'Enable Guest Upload',
59-
'close': 'Disable Guest Upload',
60-
'note': 'After disabling, login to the backend is required for uploading.',
57+
title: 'Enable Upload',
58+
open: 'Enable Guest Upload',
59+
close: 'Disable Guest Upload',
60+
note: 'After disabling, login to the backend is required for uploading.',
6161
},
6262
file_storage: {
63-
'title': 'Storage Engine',
64-
'local': 'Local Storage',
65-
's3': 'S3 Storage',
66-
'note': 'FileCodeBox needs to be restarted after updating.',
63+
title: 'Storage Engine',
64+
local: 'Local Storage',
65+
s3: 'S3 Storage',
66+
note: 'FileCodeBox needs to be restarted after updating.',
6767
},
6868
mei: 'Every',
6969
minute: 'Minutes',
@@ -88,18 +88,18 @@ export default {
8888
delete: 'Delete',
8989
},
9090
menu: {
91-
'fileManage': 'File Management',
92-
'systemSetting': 'System Settings',
93-
'about': 'About Us',
94-
'color': 'Color Mode',
95-
'signout': 'Sign Out',
91+
fileManage: 'File Management',
92+
systemSetting: 'System Settings',
93+
about: 'About Us',
94+
color: 'Color Mode',
95+
signout: 'Sign Out',
9696
},
9797
login: {
98-
'managePassword': 'Admin Password',
99-
'passwordNotEmpty': 'Password cannot be empty',
100-
'login': 'Login',
101-
'loginSuccess': 'Login successful',
102-
'loginError': 'Login failed',
98+
managePassword: 'Admin Password',
99+
passwordNotEmpty: 'Password cannot be empty',
100+
login: 'Login',
101+
loginSuccess: 'Login successful',
102+
loginError: 'Login failed',
103103
}
104104
}
105105
}

fcb-fronted/src/locals/zh.ts

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
export default {
22
send: {
3-
'mzsm':'免责声明',
4-
'alert': '根据《中华人民共和国网络安全法》、《中华人民共和国刑法》、《中华人民共和国治安管理处罚法》等相关规定。 传播或存储违法、违规内容,会受到相关处罚,严重者将承担刑事责任。请勿上传非法文件,本站坚决配合相关部门,确保网络内容的安全,和谐,打造绿色网络环境。',
5-
'prompt1': '将文字、文件拖、粘贴到此处,或 ',
6-
'prompt2': '天数<7或限制次数(24h后删除)',
7-
'prompt3': '请输入您要寄出的文本',
8-
'share': '分享',
9-
'textShare': '文本分享',
10-
'clickUpload': '点击上传',
11-
'pleaseInputExpireValue': '请输入有效期',
12-
'expireStyle': '过期方式',
13-
'expireData': {
14-
'day': '天数',
15-
'hour': '小时',
16-
'forever': '永久',
17-
'minute': '分钟',
18-
'count': '次数'
3+
mzsm:'免责声明',
4+
alert: '根据《中华人民共和国网络安全法》、《中华人民共和国刑法》、《中华人民共和国治安管理处罚法》等相关规定。 传播或存储违法、违规内容,会受到相关处罚,严重者将承担刑事责任。请勿上传非法文件,本站坚决配合相关部门,确保网络内容的安全,和谐,打造绿色网络环境。',
5+
prompt1: '将文字、文件拖、粘贴到此处,或 ',
6+
prompt2: '天数<7或限制次数(24h后删除)',
7+
prompt3: '请输入您要寄出的文本,支持MarkDown格式',
8+
share: '分享',
9+
textShare: '文本分享',
10+
clickUpload: '点击上传',
11+
pleaseInputExpireValue: '请输入有效期',
12+
expireStyle: '过期方式',
13+
expireData: {
14+
day: '天数',
15+
hour: '小时',
16+
forever: '永久',
17+
minute: '分钟',
18+
count: '次数'
1919
},
20-
'expireValue': {
21-
'day': '天',
22-
'hour': '时',
23-
'minute': '分',
24-
'count': '次'
20+
expireValue: {
21+
day: '天',
22+
hour: '时',
23+
minute: '分',
24+
count: '次'
2525
},
26-
'fileType': {
27-
'file': '文件',
28-
'text': '文本'
26+
fileType: {
27+
file: '文件',
28+
text: '文本'
2929
}
3030
},
3131
fileBox: {
@@ -42,8 +42,8 @@ export default {
4242
},
4343
admin: {
4444
about: {
45-
'source1': '本项目开源于Github:',
46-
'source2': 'FileCodeBox'
45+
source1: '本项目开源于Github:',
46+
source2: 'FileCodeBox'
4747
},
4848
settings: {
4949
name: '网站名称',
@@ -54,16 +54,16 @@ export default {
5454
uploadSize: '文件大小',
5555
uploadSizeNote: '最大文件大小,单位:(Bytes),1mb=1 * 1024 * 1024',
5656
openUpload: {
57-
'title': '开启上传',
58-
'open': '开启游客上传',
59-
'close': '关闭游客上传',
60-
'note': '关闭之后需要登录后台方可上传',
57+
title: '开启上传',
58+
open: '开启游客上传',
59+
close: '关闭游客上传',
60+
note: '关闭之后需要登录后台方可上传',
6161
},
6262
file_storage: {
63-
'title': '存储引擎',
64-
'local': '本地存储',
65-
's3': 'S3存储',
66-
'note': '更新后需要重启FileCodeBox',
63+
title: '存储引擎',
64+
local: '本地存储',
65+
s3: 'S3存储',
66+
note: '更新后需要重启FileCodeBox',
6767
},
6868
mei: '每',
6969
minute: '分钟',
@@ -88,18 +88,18 @@ export default {
8888
delete: '删除',
8989
},
9090
menu: {
91-
'fileManage': '文件管理',
92-
'systemSetting': '系统设置',
93-
'about': '关于我们',
94-
'color': '颜色模式',
95-
'signout': '退出登录',
91+
fileManage: '文件管理',
92+
systemSetting: '系统设置',
93+
about: '关于我们',
94+
color: '颜色模式',
95+
signout: '退出登录',
9696
},
9797
login: {
98-
'managePassword': '管理密码',
99-
'passwordNotEmpty': '密码不能为空',
100-
'login': '登 录',
101-
'loginSuccess': '登录成功',
102-
'loginError': '登录失败',
98+
managePassword: '管理密码',
99+
passwordNotEmpty: '密码不能为空',
100+
login: '登 录',
101+
loginSuccess: '登录成功',
102+
loginError: '登录失败',
103103
}
104104
}
105105
};

fcb-fronted/src/views/Share/SendView.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ const shareData = ref({
1616

1717
<template>
1818
<main>
19-
<el-card class="card" style="padding: 1rem;position: relative" :body-style="{ padding: '0px 0px 20px 0px' }">
20-
<card-tools/>
21-
<div style="display: flex;margin-top: 1rem">
19+
<el-card class="card" style="position: relative" :body-style="{ padding: '0' }">
20+
<card-tools style="padding: 1rem"/>
21+
<div style="display: flex;margin: 1rem">
2222
<div>
2323
<el-input
2424
v-model="shareData.expireValue"
@@ -52,10 +52,15 @@ const shareData = ref({
5252
</el-radio>
5353
</el-radio-group>
5454
</div>
55-
<div style="margin-top: 1rem">
55+
<div style="margin: 1rem">
5656
<upload-file :shareData="shareData" v-if="shareData.targetType=='file'"/>
5757
<upload-text :shareData="shareData" v-else-if="shareData.targetType=='text'"/>
5858
</div>
59+
<el-carousel height="319px">
60+
<el-carousel-item v-for="item in 4" :key="item">
61+
<div style="height: 100%;width: 100%;background: #0a0a0a"></div>
62+
</el-carousel-item>
63+
</el-carousel>
5964
</el-card>
6065
</main>
6166
</template>

0 commit comments

Comments
 (0)