@@ -47,8 +47,12 @@ export default {
},
props: ['name', 'isDir', 'url', 'type', 'size', 'modified', 'index'],
computed: {
- ...mapState(['user', 'selected', 'req', 'user', 'jwt']),
- ...mapGetters(['selectedCount']),
+ ...mapState(['user', 'selected', 'req', 'jwt']),
+ ...mapGetters(['selectedCount', 'isSharing']),
+ singleClick () {
+ if (this.isSharing) return false
+ return this.user.singleClick
+ },
isSelected () {
return (this.selected.indexOf(this.index) !== -1)
},
@@ -60,10 +64,10 @@ export default {
return 'insert_drive_file'
},
isDraggable () {
- return this.user.perm.rename
+ return !this.isSharing && this.user.perm.rename
},
canDrop () {
- if (!this.isDir) return false
+ if (!this.isDir || this.isSharing) return false
for (let i of this.selected) {
if (this.req.items[i].url === this.url) {
@@ -171,11 +175,11 @@ export default {
action(overwrite, rename)
},
itemClick: function(event) {
- if (this.user.singleClick && !this.$store.state.multiple) this.open()
+ if (this.singleClick && !this.$store.state.multiple) this.open()
else this.click(event)
},
click: function (event) {
- if (!this.user.singleClick && this.selectedCount !== 0) event.preventDefault()
+ if (!this.singleClick && this.selectedCount !== 0) event.preventDefault()
if (this.$store.state.selected.indexOf(this.index) !== -1) {
this.removeSelected(this.index)
return
@@ -202,11 +206,11 @@ export default {
return
}
- if (!this.user.singleClick && !event.ctrlKey && !event.metaKey && !this.$store.state.multiple) this.resetSelected()
+ if (!this.singleClick && !event.ctrlKey && !event.metaKey && !this.$store.state.multiple) this.resetSelected()
this.addSelected(this.index)
},
dblclick: function () {
- if (!this.user.singleClick) this.open()
+ if (!this.singleClick) this.open()
},
touchstart () {
setTimeout(() => {
diff --git a/frontend/src/css/_share.css b/frontend/src/css/_share.css
index 9e1b3528..967d91d5 100644
--- a/frontend/src/css/_share.css
+++ b/frontend/src/css/_share.css
@@ -49,7 +49,7 @@
}
.share__box__items #listing.list .item {
- cursor: auto;
+ cursor: pointer;
border-left: 0;
border-right: 0;
border-bottom: 0;
@@ -57,5 +57,9 @@
}
.share__box__items #listing.list .item .name {
- width: auto;
+ width: 50%;
+}
+
+.share__box__items #listing.list .item .modified {
+ width: 25%;
}
\ No newline at end of file
diff --git a/frontend/src/i18n/ar.json b/frontend/src/i18n/ar.json
index 5a0e552d..be7a6459 100644
--- a/frontend/src/i18n/ar.json
+++ b/frontend/src/i18n/ar.json
@@ -124,7 +124,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Admin",
"administrator": "Administrator",
"allowCommands": "تنفيذ الأوامر",
@@ -233,4 +233,4 @@
"downloadFile": "Download File",
"downloadFolder": "Download Folder"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json
index a925c0c4..f4670092 100644
--- a/frontend/src/i18n/en.json
+++ b/frontend/src/i18n/en.json
@@ -132,7 +132,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Admin",
"administrator": "Administrator",
"allowCommands": "Execute commands",
@@ -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",
@@ -245,6 +248,7 @@
},
"download": {
"downloadFile": "Download File",
- "downloadFolder": "Download Folder"
+ "downloadFolder": "Download Folder",
+ "downloadSelected": "Download Selected"
}
}
diff --git a/frontend/src/i18n/fr.json b/frontend/src/i18n/fr.json
index d6cd9c28..bbea4d29 100644
--- a/frontend/src/i18n/fr.json
+++ b/frontend/src/i18n/fr.json
@@ -124,7 +124,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Admin",
"administrator": "Administrateur",
"allowCommands": "Exécuter des commandes",
@@ -233,4 +233,4 @@
"downloadFile": "Download File",
"downloadFolder": "Download Folder"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json
index bf171048..d3e2088b 100644
--- a/frontend/src/i18n/it.json
+++ b/frontend/src/i18n/it.json
@@ -124,7 +124,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Admin",
"administrator": "Amministratore",
"allowCommands": "Esegui comandi",
@@ -233,4 +233,4 @@
"downloadFile": "Download File",
"downloadFolder": "Download Folder"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/ja.json b/frontend/src/i18n/ja.json
index 263a262f..e0265176 100644
--- a/frontend/src/i18n/ja.json
+++ b/frontend/src/i18n/ja.json
@@ -124,7 +124,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "管理者",
"administrator": "管理者",
"allowCommands": "コマンドの実行",
@@ -233,4 +233,4 @@
"downloadFile": "Download File",
"downloadFolder": "Download Folder"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/pl.json b/frontend/src/i18n/pl.json
index 3efbbd52..b1d0064f 100644
--- a/frontend/src/i18n/pl.json
+++ b/frontend/src/i18n/pl.json
@@ -124,7 +124,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Admin",
"administrator": "Administrator",
"allowCommands": "Wykonaj polecenie",
@@ -233,4 +233,4 @@
"downloadFile": "Download File",
"downloadFolder": "Download Folder"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/pt-br.json b/frontend/src/i18n/pt-br.json
index f8f8576a..f7e569f3 100644
--- a/frontend/src/i18n/pt-br.json
+++ b/frontend/src/i18n/pt-br.json
@@ -124,7 +124,7 @@
"documentation": "documentação",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Admin",
"administrator": "Administrador",
"allowCommands": "Executar comandos",
@@ -233,4 +233,4 @@
"downloadFile": "Baixar arquivo",
"downloadFolder": "Baixar pasta"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/ru.json b/frontend/src/i18n/ru.json
index c544bcea..c86d9e78 100644
--- a/frontend/src/i18n/ru.json
+++ b/frontend/src/i18n/ru.json
@@ -124,7 +124,7 @@
"documentation": "documentation",
"branding": "Branding",
"disableExternalLinks": "Disable external links (except documentation)",
- "brandingHelp": "You can costumize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
+ "brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"admin": "Админ",
"administrator": "Администратор",
"allowCommands": "Запуск команд",
@@ -233,4 +233,4 @@
"downloadFile": "Download File",
"downloadFolder": "Download Folder"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/i18n/zh-cn.json b/frontend/src/i18n/zh-cn.json
index 67564253..fe5d4125 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": "规则",
@@ -242,6 +245,7 @@
},
"download": {
"downloadFile": "下载文件",
- "downloadFolder": "下载文件夹"
+ "downloadFolder": "下载文件夹",
+ "downloadSelected": "下载已选"
}
}
\ No newline at end of file
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/store/getters.js b/frontend/src/store/getters.js
index 11ad60ab..70c9cd0e 100644
--- a/frontend/src/store/getters.js
+++ b/frontend/src/store/getters.js
@@ -4,6 +4,7 @@ const getters = {
isListing: (state, getters) => getters.isFiles && state.req.isDir,
isEditor: (state, getters) => getters.isFiles && (state.req.type === 'text' || state.req.type === 'textImmutable'),
isPreview: state => state.previewMode,
+ isSharing: state => !state.loading && state.route.name === 'Share',
selectedCount: state => state.selected.length,
progress : state => {
if (state.upload.progress.length == 0) {
diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js
index 40b56df4..199d09ca 100644
--- a/frontend/src/store/index.js
+++ b/frontend/src/store/index.js
@@ -24,7 +24,8 @@ const state = {
showShell: false,
showMessage: null,
showConfirm: null,
- previewMode: false
+ previewMode: false,
+ hash: ''
}
export default new Vuex.Store({
diff --git a/frontend/src/store/mutations.js b/frontend/src/store/mutations.js
index 46aad6e6..923ee503 100644
--- a/frontend/src/store/mutations.js
+++ b/frontend/src/store/mutations.js
@@ -86,7 +86,8 @@ const mutations = {
},
setPreviewMode(state, value) {
state.previewMode = value
- }
+ },
+ setHash: (state, value) => (state.hash = value),
}
export default mutations
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 @@