feat: add unarchive overwrite checkbox (#19)

pull/3756/head
Laurynas Gadliauskas 2021-07-30 11:17:43 +03:00 committed by GitHub
parent 04e3be48a4
commit 1052e94139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 343 additions and 252 deletions

View File

@ -41,9 +41,10 @@
<p
v-else-if="isDir && diskUsage"
class="size"
:data-order="humanDiskUsage()"
:data-order="humanDiskUsageSize()"
>
{{ humanDiskUsage() }}
{{ humanDiskUsageSize() }}
{{ $t("prompts.inodeCount", { count: diskUsage.inodes }) }}
</p>
<p v-else class="size" :data-order="humanSize()">{{ humanSize() }}</p>
@ -181,8 +182,8 @@ export default {
s += (this.mode & 1) != 0 ? "x" : "-";
return s;
},
humanDiskUsage: function () {
return filesize(this.diskUsage);
humanDiskUsageSize: function () {
return filesize(this.diskUsage.size);
},
humanSize: function () {
return filesize(this.size);

View File

@ -13,6 +13,10 @@
@keyup.enter="submit"
v-model.trim="name"
/>
<p v-if="overwriteAvailable">
<input type="checkbox" v-model="overwriteExisting" />
{{ $t("prompts.unarchiveOverwriteExisting") }}
</p>
</div>
<div class="card-action">
@ -46,12 +50,26 @@ export default {
name: "rename",
data: function () {
return {
overwriteExisting: false,
name: "",
};
},
computed: {
...mapState(["req", "selected", "selectedCount"]),
...mapGetters(["isListing", "isFiles"]),
overwriteAvailable() {
let item = this.req.items[this.selected[0]];
return [
".zip",
".rar",
".tar",
".bz2",
".gz",
".xz",
".lz4",
".sz",
].includes(item.extension);
},
},
methods: {
cancel: function () {
@ -66,7 +84,7 @@ export default {
try {
buttons.loading("unarchive");
this.$store.commit("closeHovers");
await api.unarchive(item.url, dst, false);
await api.unarchive(item.url, dst, this.overwriteExisting);
this.$store.commit("setReload", true);
} catch (e) {
this.$showError(e);

View File

@ -159,11 +159,11 @@
}
#listing.list .item .name {
width: 50%;
width: 45%;
}
#listing.list .item .size {
width: 15%;
width: 20%;
}
#listing.list .item .modified {

View File

@ -8,8 +8,8 @@
"copyToClipboard": "Copy to clipboard",
"create": "Create",
"delete": "Delete",
"download": "Download",
"directorySizes": "Calculate directory sizes",
"download": "Download",
"hideDotfiles": "Hide dotfiles",
"info": "Info",
"more": "More",
@ -168,11 +168,12 @@
"skipTrashMessage": "Skip trash bin and delete immediately",
"unarchive": "Unarchive",
"unarchiveMessage": "Choose the destination folder name:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Changes that you made may not be saved. Leave page?",
"upload": "Upload",
"uploadMessage": "Select an option to upload.",
"uploadFile": "File",
"uploadFolder": "Folder",
"uploadMessage": "Select an option to upload.",
"write": "Write"
},
"search": {

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Copiar al portapapeles",
"create": "Crear",
"delete": "Borrar",
"directorySizes": "Calcular los tamaños del directorio",
"download": "Descargar",
"hideDotfiles": "",
"info": "Info",
@ -167,9 +168,12 @@
"skipTrashMessage": "Omitir papelera y eliminar inmediatamente",
"unarchive": "Desarchiva",
"unarchiveMessage": "Elige el nombre de la carpeta de destino:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Los cambios que realizaste podrían no guardarse. ¿Abandonar página?",
"upload": "",
"uploadMessage": "",
"upload": "Cargar",
"uploadFile": "Archivo",
"uploadFolder": "Carpeta",
"uploadMessage": "Seleccione una opción para cargar.",
"write": "Escribe"
},
"search": {

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Copiar al portapapeles",
"create": "Crear",
"delete": "Borrar",
"directorySizes": "Calcular los tamaños del directorio",
"download": "Descargar",
"hideDotfiles": "",
"info": "Info",
@ -167,9 +168,12 @@
"skipTrashMessage": "Omitir papelera y eliminar inmediatamente",
"unarchive": "Desarchiva",
"unarchiveMessage": "Elige el nombre de la carpeta de destino:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Los cambios que realizaste podrían no guardarse. ¿Abandonar página?",
"upload": "",
"uploadMessage": "",
"upload": "Cargar",
"uploadFile": "Archivo",
"uploadFolder": "Carpeta",
"uploadMessage": "Seleccione una opción para cargar.",
"write": "Escribe"
},
"search": {

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Copiar al portapapeles",
"create": "Crear",
"delete": "Borrar",
"directorySizes": "Calcular los tamaños del directorio",
"download": "Descargar",
"hideDotfiles": "Ocultar dotfiles",
"info": "Info",
@ -167,8 +168,11 @@
"skipTrashMessage": "Omitir papelera y eliminar inmediatamente",
"unarchive": "Desarchiva",
"unarchiveMessage": "Elige el nombre de la carpeta de destino:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Los cambios que realizaste podrían no guardarse. ¿Abandonar página?",
"upload": "Cargar",
"uploadFile": "Archivo",
"uploadFolder": "Carpeta",
"uploadMessage": "Seleccione una opción para cargar.",
"write": "Escribe"
},

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Copiar al portapapeles",
"create": "Crear",
"delete": "Borrar",
"directorySizes": "Calcular los tamaños del directorio",
"download": "Descargar",
"hideDotfiles": "",
"info": "Info",
@ -167,9 +168,12 @@
"skipTrashMessage": "Omitir papelera y eliminar inmediatamente",
"unarchive": "Desarchiva",
"unarchiveMessage": "Elige el nombre de la carpeta de destino:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Los cambios que realizaste podrían no guardarse. ¿Abandonar página?",
"upload": "",
"uploadMessage": "",
"upload": "Cargar",
"uploadFile": "Archivo",
"uploadFolder": "Carpeta",
"uploadMessage": "Seleccione una opción para cargar.",
"write": "Escribe"
},
"search": {

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Kopijuoti į iškarpinę",
"create": "Sukurti",
"delete": "Ištrinti",
"directorySizes": "Skaičiuoti katalogų dydžius",
"download": "Atsisiųsti",
"hideDotfiles": "Paslėpti konfigūracijos failus",
"info": "Informacija",
@ -167,8 +168,11 @@
"skipTrashMessage": "Ištrinti visam laikui",
"unarchive": "Išarchyvuoti",
"unarchiveMessage": "Pasirinkite aplanko pavadinimą:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Atlikti pakeitimai gali būti neišsaugoti. Norite išeiti iš puslapio?",
"upload": "Įkelti",
"uploadFile": "Failas",
"uploadFolder": "Aplankas",
"uploadMessage": "Pasirinkite, ką norite įkelti.",
"write": "Rašyti"
},

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Copiar",
"create": "Criar",
"delete": "Deletar",
"directorySizes": "Calcular tamanho dos diretórios",
"download": "Baixar",
"hideDotfiles": "Ocultar dotfiles",
"info": "Informações",
@ -167,8 +168,11 @@
"skipTrashMessage": "Pular lixeira e deletar imediatamente",
"unarchive": "Desarquivar",
"unarchiveMessage": "Escolha o nome da pasta de destino:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "As alterações que você fez podem não ser salvas. Sair da página?",
"upload": "Enviar",
"uploadFile": "Arquivo",
"uploadFolder": "Pasta",
"uploadMessage": "Selecionar uma opção para enviar.",
"write": "Escrever"
},

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Copiar para o clipboard",
"create": "Criar",
"delete": "Eliminar",
"directorySizes": "Calculate directory sizes",
"download": "Descarregar",
"hideDotfiles": "Esconder dotfiles",
"info": "Info",
@ -167,9 +168,12 @@
"skipTrashMessage": "Saltar o caixote do lixo e apagar imediatamente",
"unarchive": "Desarquivar",
"unarchiveMessage": "Escolha o nome da pasta de destino:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "As alterações que fez poderão não ser guardadas. Deixar a página?",
"upload": "Upload",
"uploadMessage": "",
"uploadFile": "File",
"uploadFolder": "Folder",
"uploadMessage": "Selecionar uma opção para enviar.",
"write": "Escrever"
},
"search": {

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Скопировать в буфер",
"create": "Создать",
"delete": "Удалить",
"directorySizes": "Посчитать размеры каталогов",
"download": "Скачать",
"hideDotfiles": "Скрыть дотфайлы",
"info": "Инфо",
@ -167,8 +168,11 @@
"skipTrashMessage": "Удалить, не сохраняя в корзину",
"unarchive": "Разархивирование",
"unarchiveMessage": "Выберите имя папки назначения:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Невозможно сохранить внесённые изменения. Покинуть страницу?",
"upload": "Загрузка",
"uploadFile": "Файл",
"uploadFolder": "Папка",
"uploadMessage": "Выберите вариант для загрузки.",
"write": "Запись"
},

View File

@ -1,92 +1,93 @@
{
"buttons": {
"archive": "Archive",
"cancel": "Cancel",
"close": "Close",
"copy": "Copy",
"copyFile": "Copy file",
"copyToClipboard": "Copy to clipboard",
"create": "Create",
"delete": "Delete",
"download": "Download",
"hideDotfiles": "Hide dotfiles",
"info": "Info",
"more": "More",
"move": "Move",
"moveFile": "Move file",
"new": "New",
"next": "Next",
"ok": "OK",
"openFile": "Open file",
"permalink": "Get Permanent Link",
"permissions": "Permissions",
"previous": "Previous",
"publish": "Publish",
"rename": "Rename",
"replace": "Replace",
"reportIssue": "Report Issue",
"save": "Save",
"schedule": "Schedule",
"search": "Search",
"select": "Select",
"selectMultiple": "Select multiple",
"share": "Share",
"shell": "Toggle shell",
"submit": "Submit",
"switchView": "Switch view",
"toggleSidebar": "Toggle sidebar",
"unarchive": "Unarchive",
"update": "Update",
"upload": "Upload"
"archive": "Arşivle",
"cancel": "İptal et",
"close": "Kapat",
"copy": "Kopyala",
"copyFile": "Dosyayı kopyala",
"copyToClipboard": "Panoya kopyala",
"create": "Yarat",
"delete": "Sil",
"directorySizes": "Calculate directory sizes",
"download": "İndir",
"hideDotfiles": "Nokta dosyalarını gizle",
"info": "Bilgi",
"more": "Devamı",
"move": "Taşı",
"moveFile": "Dosyayı taşı",
"new": "Yeni",
"next": "Sonraki",
"ok": "Tamam",
"openFile": "Dosyayı aç",
"permalink": "Kalıcı Bağlantı Al",
"permissions": "İzinler",
"previous": "Önceki",
"publish": "Yayınla",
"rename": "Adı değiştir",
"replace": "Değiştir",
"reportIssue": "Sorun Bildir",
"save": "Kaydet",
"schedule": "Planla",
"search": "Ara",
"select": "Seç",
"selectMultiple": "Çoklu seç",
"share": "Paylaş",
"shell": "Kabuğu aç/kapat",
"submit": "Gönder",
"switchView": "Görünümü değiştir",
"toggleSidebar": "Yan menüyü aç/kapat",
"unarchive": "Arşivden çıkar",
"update": "Güncelle",
"upload": "Yükle"
},
"download": {
"downloadFile": "Download File",
"downloadFolder": "Download Folder",
"downloadSelected": "Download Selected"
"downloadFile": "Dosyayı İndir",
"downloadFolder": "Klasörü İndir",
"downloadSelected": "Seçilenleri İndir"
},
"errors": {
"connection": "The server can't be reached.",
"forbidden": "You don't have permissions to access this.",
"internal": "Something really went wrong.",
"notFound": "This location can't be reached.",
"connection": "Sunucuya ulaşılamıyor.",
"forbidden": "Buna erişim izniniz bulunmuyor:",
"internal": "Bir hata ile karşılaştık.",
"notFound": "Bu konuma ulaşılamıyor.",
"resource": {
"alreadyExists": "Resource with such name already exists"
"alreadyExists": "Aynı adlı kaynak zaten var"
},
"validation": {
"emptyName": "Resource name can't be empty"
"emptyName": "Kaynak adı boş olamaz"
}
},
"files": {
"body": "Body",
"clear": "Clear",
"closePreview": "Close preview",
"files": "Files",
"folders": "Folders",
"home": "Home",
"lastModified": "Last modified",
"loading": "Loading...",
"lonely": "It feels lonely here...",
"metadata": "Metadata",
"multipleSelectionEnabled": "Multiple selection enabled",
"name": "Name",
"size": "Size",
"sortByLastModified": "Sort by last modified",
"sortByName": "Sort by name",
"sortBySize": "Sort by size"
"body": "Gövde",
"clear": "Temizle",
"closePreview": "Önizlemeyi kapat",
"files": "Dosyalar",
"folders": "Klasörler",
"home": "Anasayfa",
"lastModified": "Son değişiklik",
"loading": "Yükleniyor...",
"lonely": "Burası çok ıssız...",
"metadata": "Meta veri",
"multipleSelectionEnabled": "Çoklu seçim etkin",
"name": "Ad",
"size": "Boyut",
"sortByLastModified": "Son değişime göre sırala",
"sortByName": "Ada göre sırala",
"sortBySize": "Boyuta göre sırala"
},
"help": {
"click": "select file or directory",
"click": "dosya veya dizin seç",
"ctrl": {
"click": "select multiple files or directories",
"f": "opens search",
"s": "save a file or download the directory where you are"
"click": "Çoklu dosya veya dizin seç",
"f": "aramayı açar",
"s": "dosyayı kaydeder veya bulunduğunuz dizini indirir"
},
"del": "delete selected items",
"doubleClick": "open a file or directory",
"esc": "clear selection and/or close the prompt",
"del": "seçili kalemleri sil",
"doubleClick": "dosya veya dizini açar",
"esc": "seçimi temizler ve/veya istemi kapatır",
"f1": "this information",
"f2": "rename file",
"help": "Help"
"f2": "adı değiştir",
"help": "Yardım"
},
"languages": {
"arAR": "العربية",
@ -101,189 +102,192 @@
"ptBR": "Português (Brasil)",
"ptPT": "Português",
"ruRU": "Русский",
"trTR": "Türk",
"trTR": "Türkçe",
"ukUA": "Український",
"zhCN": "中文 (简体)"
},
"login": {
"createAnAccount": "Create an account",
"loginInstead": "Already have an account",
"password": "Password",
"passwordConfirm": "Password Confirmation",
"passwordsDontMatch": "Passwords don't match",
"signup": "Signup",
"submit": "Login",
"username": "Username",
"usernameTaken": "Username already taken",
"wrongCredentials": "Wrong credentials"
"createAnAccount": "Bir hesap oluştur",
"loginInstead": "Zaten bir hesabınız var",
"password": "Şifre",
"passwordConfirm": "Şifre Onayı",
"passwordsDontMatch": "Şifreler eşleşmiyor",
"signup": "Kayıt Ol",
"submit": "Giriş",
"username": "Kullanıcı Adı",
"usernameTaken": "Adı alınmış",
"wrongCredentials": "Yanlış bilgi"
},
"permanent": "Permanent",
"permanent": "Kalıcı",
"prompts": {
"archive": "Archive",
"archiveMessage": "Choose archive name and format:",
"copy": "Copy",
"copyMessage": "Choose the place to copy your files:",
"currentlyNavigating": "Currently navigating on:",
"deleteMessageMultiple": "Are you sure you want to delete {count} file(s)?",
"deleteMessageShare": "Are you sure you want to delete this share({path})?",
"deleteMessageSingle": "Are you sure you want to delete this file/folder?",
"deleteTitle": "Delete files",
"directories": "Directories",
"directoriesAndFiles": "Directories and files",
"displayName": "Display Name:",
"download": "Download files",
"downloadMessage": "Choose the format you want to download.",
"error": "Something went wrong",
"execute": "Execute",
"fileInfo": "File information",
"files": "Files",
"filesSelected": "{count} files selected.",
"group": "Group",
"inodeCount": "({count} inodes)",
"lastModified": "Last Modified",
"move": "Move",
"moveMessage": "Choose new house for your file(s)/folder(s):",
"newArchetype": "Create a new post based on an archetype. Your file will be created on content folder.",
"newDir": "New directory",
"newDirMessage": "Write the name of the new directory.",
"newFile": "New file",
"newFileMessage": "Write the name of the new file.",
"numberDirs": "Number of directories",
"numberFiles": "Number of files",
"optionalPassword": "Optional password",
"others": "Others",
"owner": "Owner",
"permissions": "Permissions",
"read": "Read",
"recursive": "Recursive",
"rename": "Rename",
"renameMessage": "Insert a new name for",
"replace": "Replace",
"replaceMessage": "One of the files you're trying to upload is conflicting because of its name. Do you wish to replace the existing one?\n",
"schedule": "Schedule",
"scheduleMessage": "Pick a date and time to schedule the publication of this post.",
"show": "Show",
"size": "Size",
"skipTrashMessage": "Skip trash bin and delete immediately",
"unarchive": "Unarchive",
"unarchiveMessage": "Choose the destination folder name:",
"unsavedChanges": "Changes that you made may not be saved. Leave page?",
"upload": "Upload",
"uploadMessage": "Select an option to upload.",
"write": "Write"
"archive": "Arşiv",
"archiveMessage": "Arşiv adı ve biçimi seçin:",
"copy": "Kopyala",
"copyMessage": "Dosyalarınızı kopyalayacağınız yeri seçin:",
"currentlyNavigating": "Şu anda buradasınız:",
"deleteMessageMultiple": "{count} dosyayı silmek istediğinizden emin misiniz?",
"deleteMessageShare": "Bu paylaşımı({path}) silmek istediğinizden emin misiniz?",
"deleteMessageSingle": "Bu dosyayı/klasörü silmek istediğinizden emin misiniz?",
"deleteTitle": "Dosyaları sil",
"directories": "Dizinler",
"directoriesAndFiles": "Dizinler ve dosyalar",
"displayName": "Görünecek Ad:",
"download": "Dosyaları indir",
"downloadMessage": "İndirmek istediğiniz formatı seçin.",
"error": "Bir hata ile karşılaştık",
"execute": "Uygula",
"fileInfo": "Dosya ayrıntıları",
"files": "Dosyalar",
"filesSelected": "{count} dosya seçildi.",
"group": "Grup",
"inodeCount": "({count} inode)",
"lastModified": "Son değişiklik",
"move": "Taşı",
"moveMessage": "Dosya/klasör(ler) için yeni konum seçin:",
"newArchetype": "Bir örneğe dayalı yeni bir gönderi oluşturun. Dosyanız içerik klasöründe oluşturulacaktır.",
"newDir": "Yeni dizin",
"newDirMessage": "Yeni dizinin adını yazın.",
"newFile": "Yeni dosya",
"newFileMessage": "Yeni dosyanın adını yazın.",
"numberDirs": "Dizin sayısı",
"numberFiles": "Dosya sayısı",
"optionalPassword": "İsteğe bağlı şifre",
"others": "Diğerleri",
"owner": "Sahibi",
"permissions": "İzinler",
"read": "Oku",
"recursive": "Tekrarlamalı",
"rename": "Adı değiştir",
"renameMessage": "Şunun için yeni bir ad girin:",
"replace": "Değiştir",
"replaceMessage": "Yüklemeye çalıştığınız dosyalardan birinin adı aynı. Mevcut olanı değiştirmek istiyor musunuz?",
"schedule": "Planla",
"scheduleMessage": "Bu gönderinin yayınlanmasını planlamak için bir tarih ve saat seçin.",
"show": "Göster",
"size": "Boyut",
"skipTrashMessage": "Çöp kutusunu atlayıp hemen sil",
"unarchive": "Arşivden çıkar",
"unarchiveMessage": "Hedef klasör adını seçin:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Yaptığınız değişiklikler kaydedilmeyecek. Çıkılsın mı?",
"upload": "Yükle",
"uploadFile": "Dosya",
"uploadFolder": "Klasör",
"uploadMessage": "Yükleme seçeneğini belirleyin.",
"write": "Yaz"
},
"search": {
"images": "Images",
"music": "Music",
"images": "Görseller",
"music": "Müzik",
"pdf": "PDF",
"pressToSearch": "Press enter to search...",
"search": "Search...",
"types": "Types",
"typeToSearch": "Type to search...",
"pressToSearch": "Aramak için giriş tuşuna basın...",
"search": "Ara...",
"types": "Tür",
"typeToSearch": "Aramak için yazın...",
"video": "Video"
},
"settings": {
"admin": "Admin",
"administrator": "Administrator",
"allowCommands": "Execute commands",
"allowEdit": "Edit, rename and delete files or directories",
"allowNew": "Create new files and directories",
"allowPublish": "Publish new posts and pages",
"allowSignup": "Allow users to signup",
"avoidChanges": "(leave blank to avoid changes)",
"branding": "Branding",
"brandingDirectoryPath": "Branding directory path",
"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}.",
"changePassword": "Change Password",
"commandRunner": "Command runner",
"administrator": "Yönetici",
"allowCommands": "Komutları uygula",
"allowEdit": "Dosyaları veya dizinleri düzenle, yeniden adlandır veya silin",
"allowNew": "Yeni dosyalar ve dizinler oluştur",
"allowPublish": "Yeni gönderiler ve sayfalar yayınla",
"allowSignup": "Kullanıcı kaydına izin ver",
"avoidChanges": "(değişiklikleri önlemek için boş bırakın)",
"branding": "Marka",
"brandingDirectoryPath": "Marka dizini yolu",
"brandingHelp": "Adını ve logosunu değiştirerek, özel stiller ekleyerek ve hatta GitHub harici bağlantılarını devre dışı bırakarak Dosya Yönetici örneğinizin görünüşünü özelleştirebilirsiniz. Özel marka bilinci oluşturma hakkında daha fazla bilgi için lütfen {0} sayfasına göz atın.",
"changePassword": "Şifreyi Değiştir",
"commandRunner": "Komut çalıştırıcı",
"commandRunnerHelp": "Here you can set commands that are executed in the named events. You must write one per line. The environment variables {0} and {1} will be available, being {0} relative to {1}. For more information about this feature and the available environment variables, please read the {2}.",
"commandsUpdated": "Commands updated!",
"createUserDir": "Auto create user home dir while adding new user",
"customStylesheet": "Custom Stylesheet",
"defaultUserDescription": "This are the default settings for new users.",
"disableExternalLinks": "Disable external links (except documentation)",
"documentation": "documentation",
"examples": "Examples",
"executeOnShell": "Execute on shell",
"executeOnShellDescription": "By default, File Browser executes the commands by calling their binaries directly. If you want to run them on a shell instead (such as Bash or PowerShell), you can define it here with the required arguments and flags. If set, the command you execute will be appended as an argument. This apply to both user commands and event hooks.",
"globalRules": "This is a global set of allow and disallow rules. They apply to every user. You can define specific rules on each user's settings to override this ones.",
"globalSettings": "Global Settings",
"hideDotfiles": "Hide dotfiles",
"insertPath": "Insert the path",
"insertRegex": "Insert regex expression",
"instanceName": "Instance name",
"language": "Language",
"lockPassword": "Prevent the user from changing the password",
"newPassword": "Your new password",
"newPasswordConfirm": "Confirm your new password",
"newUser": "New User",
"password": "Password",
"passwordUpdated": "Password updated!",
"path": "Path",
"commandsUpdated": "Komutlar güncellendi!",
"createUserDir": "Yeni kullanıcı eklerken otomatik kullanıcı ana sayfa dizini oluştur",
"customStylesheet": "Özel Stil Sayfası",
"defaultUserDescription": "Yeni kullanıcılar için varsayılan ayarlar.",
"disableExternalLinks": "Harici bağlantıları devre dışı bırak (belgeler hariç)",
"documentation": "dokümantasyon",
"examples": "Örnekler",
"executeOnShell": "Kabukta yürüt",
"executeOnShellDescription": "Dosya yöneticisi varsayılan olarak komutları doğrudan ikili dosyalarını çağırarak çalıştırır. Kabukta (Bash veya PowerShell gibi) çalıştırmak istiyorsanız, burada gerekli parametre ve işaretlerle tanımlayabilirsiniz. Ayarlanırsa, yürüttüğünüz komut parametre olarak eklenir. Bu, hem kullanıcı komutları hem de olay kancaları için geçerlidir.",
"globalRules": "Bunlar, genel izinlerdir. Her kullanıcı için geçerlidir. Bunları geçersiz kılmak için her kullanıcı için ayrı kurallar tanımlayabilirsiniz.",
"globalSettings": "Genel Ayarlar",
"hideDotfiles": "Nokta dosyalarını gizle",
"insertPath": "Yolu ekle",
"insertRegex": "Regex ifadeleri ekle",
"instanceName": "Örnek isim",
"language": "Dil",
"lockPassword": "Kullanıcının parolayı değiştirmesini engelle",
"newPassword": "Yeni şifreniz",
"newPasswordConfirm": "Yeni şifrenizi onaylayın",
"newUser": "Yeni Kullanıcı",
"password": "Şifre",
"passwordUpdated": "Şifre güncellendi!",
"path": "Yol",
"perm": {
"create": "Create files and directories",
"delete": "Delete files and directories",
"download": "Download",
"execute": "Execute commands",
"modify": "Edit files",
"rename": "Rename or move files and directories",
"share": "Share files"
"create": "Dosya ve dizin oluştur",
"delete": "Dosya ve dizin sil",
"download": "İndir",
"execute": "Komutları uygula",
"modify": "Dosyaları düzenle",
"rename": "Dosya ve dizinleri yeniden adlandır veya taşı",
"share": "Dosyaları paylaş"
},
"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",
"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",
"rulesHelp": "Here you can define a set of allow and disallow rules for this specific user. The blocked files won't show up in the listings and they wont be accessible to the user. We support regex and paths relative to the users scope.\n",
"scope": "Scope",
"settingsUpdated": "Settings updated!",
"shareDeleted": "Share deleted!",
"shareDuration": "Share Duration",
"shareManagement": "Share Management",
"singleClick": "Use single clicks to open files and directories",
"permissions": "İzinler",
"permissionsHelp": "Kullanıcıyı yönetici olarak atayabilir veya izinleri ayrı ayrı seçebilirsiniz. \"Yönetici\"yi seçerseniz, diğer tüm izinler otomatik olarak verilecektir. Kullanıcı yönetimi iznini ise sadece yönetici verebilir.",
"profileSettings": "Profil Ayarları",
"ruleExample1": "her klasördeki herhangi bir nokta dosyasına (.git, .gitignore gibi) erişimi engeller.",
"ruleExample2": "dizin kökündeki Caddyfile adlı dosyaya erişimi engeller.",
"rules": "Kurallar",
"rulesHelp": "Burada, belirli kullanıcılara bir dizi izin ve engelleme tanımlayabilirsiniz. Engellenen dosyalar listelerde görünmez ve kullanıcı bunlara erişemez. Kullanıcı kapsamına göre regex ve yolları destekliyoruz.",
"scope": "Kapsam",
"settingsUpdated": "Ayarlar güncellendi!",
"shareDeleted": "Paylaşım Silindi!",
"shareDuration": "Paylaşım Süresi",
"shareManagement": "Paylaşım Yönetimi",
"singleClick": "Dosyaları ve dizinleri tek tıkla açabilirsiniz",
"themes": {
"dark": "Dark",
"light": "Light",
"title": "Theme"
"dark": "Karanlık",
"light": "ık",
"title": "Tema"
},
"user": "User",
"userCommands": "Commands",
"userCommandsHelp": "A space separated list with the available commands for this user. Example:\n",
"userCreated": "User created!",
"userDefaults": "User default settings",
"userDeleted": "User deleted!",
"userManagement": "User Management",
"username": "Username",
"users": "Users",
"userUpdated": "User updated!"
"user": "Kullanıcı",
"userCommands": "Komutlar",
"userCommandsHelp": "Bu kullanıcının mevcut komutlarını içeren boşlukla ayrılmış bir liste. Örneğin:",
"userCreated": "Kullanıcı oluşturuldu!",
"userDefaults": "Varsayılan kullanıcı ayarları",
"userDeleted": "Kullanıcı silindi!",
"userManagement": "Kullanıcı Yönetimi",
"username": "Kullanıcı Adı",
"users": "Kullanıcılar",
"userUpdated": "Kullanıcı güncellendi!"
},
"sidebar": {
"help": "Help",
"help": "Yardım",
"hugoNew": "Hugo New",
"login": "Login",
"logout": "Logout",
"myFiles": "My files",
"newFile": "New file",
"newFolder": "New folder",
"preview": "Preview",
"login": "Giriş",
"logout": "Çıkış",
"myFiles": "Dosyalarım",
"newFile": "Yeni dosya",
"newFolder": "Yeni klasör",
"preview": "Önizle",
"quota": {
"inodes": "Inodes",
"space": "Space"
"inodes": "Dosya indeksi",
"space": "Boşluk"
},
"settings": "Settings",
"signup": "Signup",
"siteSettings": "Site Settings",
"trashBin": "Trash bin"
"settings": "Ayarlar",
"signup": "Kayıt Ol",
"siteSettings": "Site Ayarları",
"trashBin": "Çöp Kutusu"
},
"success": {
"linkCopied": "Link copied!"
"linkCopied": "Bağlantı kopyalandı!"
},
"time": {
"days": "Days",
"hours": "Hours",
"minutes": "Minutes",
"seconds": "Seconds",
"unit": "Time Unit"
"days": "Gün",
"hours": "Saat",
"minutes": "Dakika",
"seconds": "Saniye",
"unit": "Zaman Birimi"
}
}

View File

@ -8,6 +8,7 @@
"copyToClipboard": "Копіювати в буфер обміну",
"create": "Створити",
"delete": "Видалити",
"directorySizes": "Порахувати розміри каталогів",
"download": "Скачати",
"hideDotfiles": "Сховати дотфайли",
"info": "Інфо",
@ -167,8 +168,11 @@
"skipTrashMessage": "Видалити без збереження в кошик",
"unarchive": "Розархівування",
"unarchiveMessage": "Виберіть назву папки призначення:",
"unarchiveOverwriteExisting": "Overwrite existing files",
"unsavedChanges": "Неможливо зберегти внесені зміни. Покинути сторінку?",
"upload": "Завантаження",
"uploadFile": "Файл",
"uploadFolder": "Папка",
"uploadMessage": "Виберіть опцію для завантаження.",
"write": "Запис"
},

View File

@ -873,7 +873,10 @@ export default {
if (result.status === "fulfilled") {
this.$store.commit("addDiskUsage", {
path: result.value.path,
usage: result.value.diskUsage,
usage: {
size: result.value.diskUsage,
inodes: result.value.inodes,
},
});
}
}

View File

@ -20,8 +20,6 @@ import (
"github.com/filebrowser/filebrowser/v2/fileutils"
)
const unarchiveAction = "unarchive"
var resourceGetHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
file, err := files.NewFileInfo(files.FileOptions{
Fs: d.user.Fs,
@ -279,8 +277,7 @@ func resourcePatchHandler(fileCache FileCache) handleFunc {
override := r.URL.Query().Get("override") == "true"
rename := r.URL.Query().Get("rename") == "true"
unarchive := action == unarchiveAction
if !override && !rename && !unarchive {
if !override && !rename {
if _, err = d.user.Fs.Stat(dst); err == nil {
return http.StatusConflict, nil
}
@ -418,7 +415,7 @@ func patchAction(ctx context.Context, action, src, dst string, d *data, fileCach
}
return fileutils.Copy(d.user.Fs, src, dst)
case unarchiveAction:
case "unarchive":
if !d.user.Perm.Create {
return errors.ErrPermissionDenied
}
@ -426,7 +423,38 @@ func patchAction(ctx context.Context, action, src, dst string, d *data, fileCach
src = d.user.FullPath(path.Clean("/" + src))
dst = d.user.FullPath(path.Clean("/" + dst))
err := archiver.Unarchive(src, dst)
arch, err := archiver.ByExtension(src)
if err != nil {
return err
}
// if we reach this place when overwrite is needed,
// it means that override was selected
switch a := arch.(type) {
case *archiver.Rar:
a.OverwriteExisting = true
case *archiver.Tar:
a.OverwriteExisting = true
case *archiver.TarBz2:
a.OverwriteExisting = true
case *archiver.TarGz:
a.OverwriteExisting = true
case *archiver.TarLz4:
a.OverwriteExisting = true
case *archiver.TarSz:
a.OverwriteExisting = true
case *archiver.TarXz:
a.OverwriteExisting = true
case *archiver.Zip:
a.OverwriteExisting = true
}
unarchiver, ok := arch.(archiver.Unarchiver)
if !ok {
return errors.ErrInvalidRequestParams
}
err = unarchiver.Unarchive(src, dst)
if err != nil {
return errors.ErrInvalidRequestParams
}