diff --git a/frontend/src/api/share.js b/frontend/src/api/share.js index e14c4e81..6f8a2a17 100644 --- a/frontend/src/api/share.js +++ b/frontend/src/api/share.js @@ -1,5 +1,9 @@ import { fetchURL, fetchJSON, removePrefix } from './utils' +export async function list() { + return fetchJSON('/api/shares') +} + export async function getHash(hash) { return fetchJSON(`/api/public/share/${hash}`) } diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index e4e9cae8..aaa2381f 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -157,6 +157,9 @@ "permissions": "Permissions", "permissionsHelp": "You can set the user to be an administrator or choose the permissions individually. If you select \"Administrator\", all of the other options will be automatically checked. The management of users remains a privilege of an administrator.\n", "profileSettings": "Profile Settings", + "shareManagement": "Share Management", + "path": "Path", + "shareDuration": "Share Duration", "ruleExample1": "prevents the access to any dot file (such as .git, .gitignore) in every folder.\n", "ruleExample2": "blocks the access to the file named Caddyfile on the root of the scope.", "rules": "Rules", diff --git a/frontend/src/i18n/zh-cn.json b/frontend/src/i18n/zh-cn.json index 67564253..cb62494d 100644 --- a/frontend/src/i18n/zh-cn.json +++ b/frontend/src/i18n/zh-cn.json @@ -156,6 +156,9 @@ "permissions": "权限", "permissionsHelp": "您可以将该用户设置为管理员,也可以单独选择各项权限。如果选择了“管理员”,则其他的选项会被自动勾上,同时该用户可以管理其他用户。", "profileSettings": "个人设置", + "shareManagement": "分享管理", + "path": "路径", + "shareDuration": "分享期限", "ruleExample1": "阻止用户访问所有文件夹下任何以 . 开头的文件(隐藏文件, 例如: .git, .gitignore)。", "ruleExample2": "阻止用户访问其目录范围的根目录下名为 Caddyfile 的文件。", "rules": "规则", diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 63a26b1a..07b9b124 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -9,6 +9,7 @@ import User from '@/views/settings/User' import Settings from '@/views/Settings' import GlobalSettings from '@/views/settings/Global' import ProfileSettings from '@/views/settings/Profile' +import Shares from '@/views/settings/Shares' import Error403 from '@/views/errors/403' import Error404 from '@/views/errors/404' import Error500 from '@/views/errors/500' @@ -67,6 +68,11 @@ const router = new Router({ name: 'Profile Settings', component: ProfileSettings }, + { + path: '/settings/shares', + name: 'Shares', + component: Shares + }, { path: '/settings/global', name: 'Global Settings', diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue index 5b010243..6c563fc7 100644 --- a/frontend/src/views/Settings.vue +++ b/frontend/src/views/Settings.vue @@ -1,9 +1,10 @@