Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
849f5ad443 | ||
|
|
c1715992bd | ||
|
|
e4f2503298 | ||
|
|
152f8302f7 | ||
|
|
4cbb4b73af | ||
|
|
58cc874828 | ||
|
|
124def5cd7 | ||
|
|
2d88c06761 | ||
|
|
204a3f0eea | ||
|
|
f029c3005e | ||
|
|
a6934e40ff | ||
|
|
98662ac5ec | ||
|
|
5cf8ce8db5 | ||
|
|
062dc414f8 | ||
|
|
63582b644c | ||
|
|
4302ece49b | ||
|
|
e1ee14d827 | ||
|
|
84ca722261 | ||
|
|
b9ac45d5da | ||
|
|
701522a060 | ||
|
|
78e0395960 | ||
|
|
f0680cf0f5 | ||
|
|
982405ec94 | ||
|
|
a78aaed214 | ||
|
|
df11a7dd0e | ||
|
|
79980bcf52 | ||
|
|
3be134f23d | ||
|
|
279a5ccd1e | ||
|
|
87f73ac982 | ||
|
|
85cde140ba |
20
.github/workflows/docs.yml
vendored
20
.github/workflows/docs.yml
vendored
@@ -28,9 +28,11 @@ jobs:
|
|||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
name: Build and Release Docs
|
name: Build and Release Docs
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
pages: write
|
||||||
deployments: write
|
id-token: write
|
||||||
pull-requests: write
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
@@ -42,11 +44,9 @@ jobs:
|
|||||||
uses: go-task/setup-task@v1
|
uses: go-task/setup-task@v1
|
||||||
- name: Build site
|
- name: Build site
|
||||||
run: task docs
|
run: task docs
|
||||||
- name: Deploy to Cloudflare Pages
|
- name: Upload static files as artifact
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: actions/upload-pages-artifact@v4
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
path: www/public
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
- name: Deploy to GitHub Pages
|
||||||
command: pages deploy www/public --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}
|
uses: actions/deploy-pages@v4
|
||||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
|
|||||||
47
CHANGELOG.md
47
CHANGELOG.md
@@ -2,6 +2,53 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.51.2](https://github.com/filebrowser/filebrowser/compare/v2.51.1...v2.51.2) (2025-12-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **frontend:** add missing i18n strings ([c171599](https://github.com/filebrowser/filebrowser/commit/c1715992bda46517f801c1aa496df8a3b42a4e4d))
|
||||||
|
|
||||||
|
## [2.51.1](https://github.com/filebrowser/filebrowser/compare/v2.51.0...v2.51.1) (2025-12-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **frontend:** csv viewer i18n strings ([4cbb4b7](https://github.com/filebrowser/filebrowser/commit/4cbb4b73af816104475f15c1d996640b56203602))
|
||||||
|
* prevent the right-click from selecting multiple items when the "single-click" option is active ([#5608](https://github.com/filebrowser/filebrowser/issues/5608)) ([152f830](https://github.com/filebrowser/filebrowser/commit/152f8302f7cda21bde37692b175c22c124233f45))
|
||||||
|
|
||||||
|
## [2.51.0](https://github.com/filebrowser/filebrowser/compare/v2.50.0...v2.51.0) (2025-12-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* update translations ([2d88c06](https://github.com/filebrowser/filebrowser/commit/2d88c067611e936056dbbf04247f1c1c709b2a09))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* added column separator select (comma, semicolon and both) in CSV viewer ([#5604](https://github.com/filebrowser/filebrowser/issues/5604)) ([204a3f0](https://github.com/filebrowser/filebrowser/commit/204a3f0eeaa0c68781b60651bf27c4b27eac44e6))
|
||||||
|
|
||||||
|
|
||||||
|
### Refactorings
|
||||||
|
|
||||||
|
* cleanup package names ([#5605](https://github.com/filebrowser/filebrowser/issues/5605)) ([f029c30](https://github.com/filebrowser/filebrowser/commit/f029c3005e450cfbebb074c42dbdf65db9c8d56a))
|
||||||
|
|
||||||
|
## [2.50.0](https://github.com/filebrowser/filebrowser/compare/v2.49.0...v2.50.0) (2025-11-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* configurable logout page URL for proxy/hook auth ([#3884](https://github.com/filebrowser/filebrowser/issues/3884)) ([b9ac45d](https://github.com/filebrowser/filebrowser/commit/b9ac45d5dac4b4eb2ba364629090fbf306cffd2b))
|
||||||
|
* render CSVs as table ([#5569](https://github.com/filebrowser/filebrowser/issues/5569)) ([982405e](https://github.com/filebrowser/filebrowser/commit/982405ec944f94baf43594b0ed2f06329ff4e9ed))
|
||||||
|
* update frontend/src/i18n/hr.json ([279a5cc](https://github.com/filebrowser/filebrowser/commit/279a5ccd1e8d7bde4568b63cb3c506af48b6c618))
|
||||||
|
* update translations ([78e0395](https://github.com/filebrowser/filebrowser/commit/78e039596070a3a9e643a693cc99960c69dcfe92))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* do not close editor if save failed ([701522a](https://github.com/filebrowser/filebrowser/commit/701522a0600cfa542469540ed764630c0ba1a732)), closes [#5591](https://github.com/filebrowser/filebrowser/issues/5591)
|
||||||
|
|
||||||
## [2.49.0](https://github.com/filebrowser/filebrowser/compare/v2.48.2...v2.49.0) (2025-11-22)
|
## [2.49.0](https://github.com/filebrowser/filebrowser/compare/v2.48.2...v2.49.0) (2025-11-22)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## Multistage build: First stage fetches dependencies
|
## Multistage build: First stage fetches dependencies
|
||||||
FROM alpine:3.22 AS fetcher
|
FROM alpine:3.23 AS fetcher
|
||||||
|
|
||||||
# install and copy ca-certificates, mailcap, and tini-static; download JSON.sh
|
# install and copy ca-certificates, mailcap, and tini-static; download JSON.sh
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/files"
|
"github.com/filebrowser/filebrowser/v2/files"
|
||||||
"github.com/filebrowser/filebrowser/v2/settings"
|
"github.com/filebrowser/filebrowser/v2/settings"
|
||||||
"github.com/filebrowser/filebrowser/v2/users"
|
"github.com/filebrowser/filebrowser/v2/users"
|
||||||
@@ -146,7 +146,7 @@ func (a *HookAuth) GetValues(s string) {
|
|||||||
// SaveUser updates the existing user or creates a new one when not found
|
// SaveUser updates the existing user or creates a new one when not found
|
||||||
func (a *HookAuth) SaveUser() (*users.User, error) {
|
func (a *HookAuth) SaveUser() (*users.User, error) {
|
||||||
u, err := a.Users.Get(a.Server.Root, a.Cred.Username)
|
u, err := a.Users.Get(a.Server.Root, a.Cred.Username)
|
||||||
if err != nil && !errors.Is(err, fbErrors.ErrNotExist) {
|
if err != nil && !errors.Is(err, fberrors.ErrNotExist) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/settings"
|
"github.com/filebrowser/filebrowser/v2/settings"
|
||||||
"github.com/filebrowser/filebrowser/v2/users"
|
"github.com/filebrowser/filebrowser/v2/users"
|
||||||
)
|
)
|
||||||
@@ -21,7 +21,7 @@ type ProxyAuth struct {
|
|||||||
func (a ProxyAuth) Auth(r *http.Request, usr users.Store, setting *settings.Settings, srv *settings.Server) (*users.User, error) {
|
func (a ProxyAuth) Auth(r *http.Request, usr users.Store, setting *settings.Settings, srv *settings.Server) (*users.User, error) {
|
||||||
username := r.Header.Get(a.Header)
|
username := r.Header.Get(a.Header)
|
||||||
user, err := usr.Get(srv.Root, username)
|
user, err := usr.Get(srv.Root, username)
|
||||||
if errors.Is(err, fbErrors.ErrNotExist) {
|
if errors.Is(err, fberrors.ErrNotExist) {
|
||||||
return a.createUser(usr, setting, srv, username)
|
return a.createUser(usr, setting, srv, username)
|
||||||
}
|
}
|
||||||
return user, err
|
return user, err
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package cmd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
nerrors "errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/auth"
|
"github.com/filebrowser/filebrowser/v2/auth"
|
||||||
"github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/settings"
|
"github.com/filebrowser/filebrowser/v2/settings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ func addConfigFlags(flags *pflag.FlagSet) {
|
|||||||
flags.String("auth.method", string(auth.MethodJSONAuth), "authentication type")
|
flags.String("auth.method", string(auth.MethodJSONAuth), "authentication type")
|
||||||
flags.String("auth.header", "", "HTTP header for auth.method=proxy")
|
flags.String("auth.header", "", "HTTP header for auth.method=proxy")
|
||||||
flags.String("auth.command", "", "command for auth.method=hook")
|
flags.String("auth.command", "", "command for auth.method=hook")
|
||||||
|
flags.String("auth.logoutPage", "", "url of custom logout page")
|
||||||
|
|
||||||
flags.String("recaptcha.host", "https://www.google.com", "use another host for ReCAPTCHA. recaptcha.net might be useful in China")
|
flags.String("recaptcha.host", "https://www.google.com", "use another host for ReCAPTCHA. recaptcha.net might be useful in China")
|
||||||
flags.String("recaptcha.key", "", "ReCaptcha site key")
|
flags.String("recaptcha.key", "", "ReCaptcha site key")
|
||||||
@@ -103,7 +104,7 @@ func getProxyAuth(flags *pflag.FlagSet, defaultAuther map[string]interface{}) (a
|
|||||||
}
|
}
|
||||||
|
|
||||||
if header == "" {
|
if header == "" {
|
||||||
return nil, nerrors.New("you must set the flag 'auth.header' for method 'proxy'")
|
return nil, errors.New("you must set the flag 'auth.header' for method 'proxy'")
|
||||||
}
|
}
|
||||||
|
|
||||||
return &auth.ProxyAuth{Header: header}, nil
|
return &auth.ProxyAuth{Header: header}, nil
|
||||||
@@ -162,7 +163,7 @@ func getHookAuth(flags *pflag.FlagSet, defaultAuther map[string]interface{}) (au
|
|||||||
}
|
}
|
||||||
|
|
||||||
if command == "" {
|
if command == "" {
|
||||||
return nil, nerrors.New("you must set the flag 'auth.command' for method 'hook'")
|
return nil, errors.New("you must set the flag 'auth.command' for method 'hook'")
|
||||||
}
|
}
|
||||||
|
|
||||||
return &auth.HookAuth{Command: command}, nil
|
return &auth.HookAuth{Command: command}, nil
|
||||||
@@ -185,7 +186,7 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.
|
|||||||
case auth.MethodHookAuth:
|
case auth.MethodHookAuth:
|
||||||
auther, err = getHookAuth(flags, defaultAuther)
|
auther, err = getHookAuth(flags, defaultAuther)
|
||||||
default:
|
default:
|
||||||
return "", nil, errors.ErrInvalidAuthMethod
|
return "", nil, fberrors.ErrInvalidAuthMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -201,6 +202,7 @@ func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Aut
|
|||||||
fmt.Fprintf(w, "Sign up:\t%t\n", set.Signup)
|
fmt.Fprintf(w, "Sign up:\t%t\n", set.Signup)
|
||||||
fmt.Fprintf(w, "Hide Login Button:\t%t\n", set.HideLoginButton)
|
fmt.Fprintf(w, "Hide Login Button:\t%t\n", set.HideLoginButton)
|
||||||
fmt.Fprintf(w, "Create User Dir:\t%t\n", set.CreateUserDir)
|
fmt.Fprintf(w, "Create User Dir:\t%t\n", set.CreateUserDir)
|
||||||
|
fmt.Fprintf(w, "Logout Page:\t%s\n", set.LogoutPage)
|
||||||
fmt.Fprintf(w, "Minimum Password Length:\t%d\n", set.MinimumPasswordLength)
|
fmt.Fprintf(w, "Minimum Password Length:\t%d\n", set.MinimumPasswordLength)
|
||||||
fmt.Fprintf(w, "Auth Method:\t%s\n", set.AuthMethod)
|
fmt.Fprintf(w, "Auth Method:\t%s\n", set.AuthMethod)
|
||||||
fmt.Fprintf(w, "Shell:\t%s\t\n", strings.Join(set.Shell, " "))
|
fmt.Fprintf(w, "Shell:\t%s\t\n", strings.Join(set.Shell, " "))
|
||||||
@@ -328,6 +330,8 @@ func getSettings(flags *pflag.FlagSet, set *settings.Settings, ser *settings.Ser
|
|||||||
set.DirMode, err = getAndParseFileMode(flags, flag.Name)
|
set.DirMode, err = getAndParseFileMode(flags, flag.Name)
|
||||||
case "auth.method":
|
case "auth.method":
|
||||||
hasAuth = true
|
hasAuth = true
|
||||||
|
case "auth.logoutPage":
|
||||||
|
set.LogoutPage, err = flags.GetString(flag.Name)
|
||||||
case "branding.name":
|
case "branding.name":
|
||||||
set.Branding.Name, err = flags.GetString(flag.Name)
|
set.Branding.Name, err = flags.GetString(flag.Name)
|
||||||
case "branding.theme":
|
case "branding.theme":
|
||||||
@@ -357,7 +361,7 @@ func getSettings(flags *pflag.FlagSet, set *settings.Settings, ser *settings.Ser
|
|||||||
flags.Visit(visit)
|
flags.Visit(visit)
|
||||||
}
|
}
|
||||||
|
|
||||||
err := nerrors.Join(errs...)
|
err := errors.Join(errs...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package errors
|
package fberrors
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/rules"
|
"github.com/filebrowser/filebrowser/v2/rules"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ func stat(opts *FileOptions) (*FileInfo, error) {
|
|||||||
// algorithm. The checksums data is saved on File object.
|
// algorithm. The checksums data is saved on File object.
|
||||||
func (i *FileInfo) Checksum(algo string) error {
|
func (i *FileInfo) Checksum(algo string) error {
|
||||||
if i.IsDir {
|
if i.IsDir {
|
||||||
return fbErrors.ErrIsDirectory
|
return fberrors.ErrIsDirectory
|
||||||
}
|
}
|
||||||
|
|
||||||
if i.Checksums == nil {
|
if i.Checksums == nil {
|
||||||
@@ -193,7 +193,7 @@ func (i *FileInfo) Checksum(algo string) error {
|
|||||||
case "sha512":
|
case "sha512":
|
||||||
h = sha512.New()
|
h = sha512.New()
|
||||||
default:
|
default:
|
||||||
return fbErrors.ErrInvalidOption
|
return fberrors.ErrInvalidOption
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = io.Copy(h, reader)
|
_, err = io.Copy(h, reader)
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
DisableUsedPercentage: false,
|
DisableUsedPercentage: false,
|
||||||
EnableExec: true,
|
EnableExec: true,
|
||||||
EnableThumbs: true,
|
EnableThumbs: true,
|
||||||
|
LogoutPage: "",
|
||||||
LoginPage: true,
|
LoginPage: true,
|
||||||
Name: "",
|
Name: "",
|
||||||
NoAuth: false,
|
NoAuth: false,
|
||||||
|
|||||||
@@ -71,5 +71,5 @@
|
|||||||
"vite-plugin-compression2": "^2.3.1",
|
"vite-plugin-compression2": "^2.3.1",
|
||||||
"vue-tsc": "^3.1.3"
|
"vue-tsc": "^3.1.3"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.23.0+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b"
|
"packageManager": "pnpm@10.24.0+sha512.01ff8ae71b4419903b65c60fb2dc9d34cf8bb6e06d03bde112ef38f7a34d6904c424ba66bea5cdcf12890230bf39f9580473140ed9c946fef328b6e5238a345a"
|
||||||
}
|
}
|
||||||
|
|||||||
463
frontend/pnpm-lock.yaml
generated
463
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -129,6 +129,7 @@ import {
|
|||||||
disableExternal,
|
disableExternal,
|
||||||
disableUsedPercentage,
|
disableUsedPercentage,
|
||||||
noAuth,
|
noAuth,
|
||||||
|
logoutPage,
|
||||||
loginPage,
|
loginPage,
|
||||||
} from "@/utils/constants";
|
} from "@/utils/constants";
|
||||||
import { files as api } from "@/api";
|
import { files as api } from "@/api";
|
||||||
@@ -159,7 +160,7 @@ export default {
|
|||||||
version: () => version,
|
version: () => version,
|
||||||
disableExternal: () => disableExternal,
|
disableExternal: () => disableExternal,
|
||||||
disableUsedPercentage: () => disableUsedPercentage,
|
disableUsedPercentage: () => disableUsedPercentage,
|
||||||
canLogout: () => !noAuth && loginPage,
|
canLogout: () => !noAuth && (loginPage || logoutPage !== "/login"),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useLayoutStore, ["closeHovers", "showHover"]),
|
...mapActions(useLayoutStore, ["closeHovers", "showHover"]),
|
||||||
|
|||||||
252
frontend/src/components/files/CsvViewer.vue
Normal file
252
frontend/src/components/files/CsvViewer.vue
Normal file
@@ -0,0 +1,252 @@
|
|||||||
|
<template>
|
||||||
|
<div class="csv-viewer">
|
||||||
|
<div v-if="displayError" class="csv-error">
|
||||||
|
<i class="material-icons">error</i>
|
||||||
|
<p>{{ displayError }}</p>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="data.headers.length === 0" class="csv-empty">
|
||||||
|
<i class="material-icons">description</i>
|
||||||
|
<p>{{ $t("files.lonely") }}</p>
|
||||||
|
</div>
|
||||||
|
<div v-else class="csv-table-container" @wheel.stop @touchmove.stop>
|
||||||
|
<table class="csv-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th v-for="(header, index) in data.headers" :key="index">
|
||||||
|
{{ header || `Column ${index + 1}` }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(row, rowIndex) in data.rows" :key="rowIndex">
|
||||||
|
<td v-for="(cell, cellIndex) in row" :key="cellIndex">
|
||||||
|
{{ cell }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="csv-footer">
|
||||||
|
<div class="csv-info" v-if="data.rows.length > 100">
|
||||||
|
<i class="material-icons">info</i>
|
||||||
|
<span>
|
||||||
|
{{ $t("files.showingRows", { count: data.rows.length }) }}</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="column-separator">
|
||||||
|
<label for="columnSeparator">{{ $t("files.columnSeparator") }}</label>
|
||||||
|
<select
|
||||||
|
id="columnSeparator"
|
||||||
|
class="input input--block"
|
||||||
|
v-model="columnSeparator"
|
||||||
|
>
|
||||||
|
<option :value="[',']">
|
||||||
|
{{ $t("files.csvSeparators.comma") }}
|
||||||
|
</option>
|
||||||
|
<option :value="[';']">
|
||||||
|
{{ $t("files.csvSeparators.semicolon") }}
|
||||||
|
</option>
|
||||||
|
<option :value="[',', ';']">
|
||||||
|
{{ $t("files.csvSeparators.both") }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { parseCSV, type CsvData } from "@/utils/csv";
|
||||||
|
import { computed, ref } from "vue";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
content: string;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
error: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
const columnSeparator = ref([","]);
|
||||||
|
|
||||||
|
const data = computed<CsvData>(() => {
|
||||||
|
try {
|
||||||
|
return parseCSV(props.content, columnSeparator.value);
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Failed to parse CSV:", e);
|
||||||
|
return { headers: [], rows: [] };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const displayError = computed(() => {
|
||||||
|
// External error takes priority (e.g., file too large)
|
||||||
|
if (props.error) {
|
||||||
|
return props.error;
|
||||||
|
}
|
||||||
|
// Check for parse errors
|
||||||
|
if (
|
||||||
|
props.content &&
|
||||||
|
props.content.trim().length > 0 &&
|
||||||
|
data.value.headers.length === 0
|
||||||
|
) {
|
||||||
|
return "Failed to parse CSV file";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.csv-viewer {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: var(--surfacePrimary);
|
||||||
|
color: var(--textSecondary);
|
||||||
|
padding: 1rem;
|
||||||
|
padding-top: 4em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-error,
|
||||||
|
.csv-empty {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
gap: 1rem;
|
||||||
|
color: var(--textPrimary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-error i,
|
||||||
|
.csv-empty i {
|
||||||
|
font-size: 4rem;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-error p,
|
||||||
|
.csv-empty p {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table-container {
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
background-color: var(--surfacePrimary);
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scrollbar styling for better visibility */
|
||||||
|
.csv-table-container::-webkit-scrollbar {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table-container::-webkit-scrollbar-track {
|
||||||
|
background: var(--background);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table-container::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--borderSecondary);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table-container::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--textPrimary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
background-color: var(--surfacePrimary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background-color: var(--surfaceSecondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table th {
|
||||||
|
padding: 0.875rem 1rem;
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
border-bottom: 2px solid var(--borderSecondary);
|
||||||
|
background-color: var(--surfaceSecondary);
|
||||||
|
white-space: nowrap;
|
||||||
|
color: var(--textSecondary);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table td {
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid var(--borderPrimary);
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 400px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
color: var(--textSecondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table tbody tr:nth-child(even) {
|
||||||
|
background-color: var(--background);
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-table tbody tr:hover {
|
||||||
|
background-color: var(--hover);
|
||||||
|
transition: background-color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-footer > :only-child {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
background-color: var(--surfaceSecondary);
|
||||||
|
border-radius: 4px;
|
||||||
|
border-left: 3px solid var(--blue);
|
||||||
|
color: var(--textSecondary);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-separator {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-separator > label {
|
||||||
|
font-size: small;
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-separator > select {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.csv-info i {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: var(--blue);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -265,7 +265,15 @@ const click = (event: Event | KeyboardEvent) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fileStore.selected.indexOf(props.index) !== -1) {
|
if (fileStore.selected.indexOf(props.index) !== -1) {
|
||||||
fileStore.removeSelected(props.index);
|
if (
|
||||||
|
(event as KeyboardEvent).ctrlKey ||
|
||||||
|
(event as KeyboardEvent).metaKey ||
|
||||||
|
fileStore.multiple
|
||||||
|
) {
|
||||||
|
fileStore.removeSelected(props.index);
|
||||||
|
} else {
|
||||||
|
fileStore.selected = [props.index];
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,7 +299,6 @@ const click = (event: Event | KeyboardEvent) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!singleClick.value &&
|
|
||||||
!(event as KeyboardEvent).ctrlKey &&
|
!(event as KeyboardEvent).ctrlKey &&
|
||||||
!(event as KeyboardEvent).metaKey &&
|
!(event as KeyboardEvent).metaKey &&
|
||||||
!fileStore.multiple
|
!fileStore.multiple
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "رفع",
|
"upload": "رفع",
|
||||||
"openFile": "فتح الملف",
|
"openFile": "فتح الملف",
|
||||||
"discardChanges": "إلغاء التغييرات",
|
"discardChanges": "إلغاء التغييرات",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "تحميل الملف",
|
"downloadFile": "تحميل الملف",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "الترتيب بآخر تعديل",
|
"sortByLastModified": "الترتيب بآخر تعديل",
|
||||||
"sortByName": "الترتيب باﻹسم",
|
"sortByName": "الترتيب باﻹسم",
|
||||||
"sortBySize": "الترتيب بالحجم",
|
"sortBySize": "الترتيب بالحجم",
|
||||||
"noPreview": "لا يوجد عرض مسبق لهذا الملف."
|
"noPreview": "لا يوجد عرض مسبق لهذا الملف.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "حدد الملف أو المجلد",
|
"click": "حدد الملف أو المجلد",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "دقائق",
|
"minutes": "دقائق",
|
||||||
"seconds": "ثواني",
|
"seconds": "ثواني",
|
||||||
"unit": "وحدة الوقت"
|
"unit": "وحدة الوقت"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Качи",
|
"upload": "Качи",
|
||||||
"openFile": "Отвори файл",
|
"openFile": "Отвори файл",
|
||||||
"discardChanges": "Изчисти",
|
"discardChanges": "Изчисти",
|
||||||
"saveChanges": "Запиши промените"
|
"saveChanges": "Запиши промените",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Свали файл",
|
"downloadFile": "Свали файл",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Подредба по последна промяна",
|
"sortByLastModified": "Подредба по последна промяна",
|
||||||
"sortByName": "Подредба по име",
|
"sortByName": "Подредба по име",
|
||||||
"sortBySize": "Подредба по размер",
|
"sortBySize": "Подредба по размер",
|
||||||
"noPreview": "За този файл не е наличен преглед."
|
"noPreview": "За този файл не е наличен преглед.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "избери файл или директория",
|
"click": "избери файл или директория",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Минути",
|
"minutes": "Минути",
|
||||||
"seconds": "Секунди",
|
"seconds": "Секунди",
|
||||||
"unit": "Единица за време"
|
"unit": "Единица за време"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Pujar",
|
"upload": "Pujar",
|
||||||
"openFile": "Obrir fitxer",
|
"openFile": "Obrir fitxer",
|
||||||
"discardChanges": "Descartar",
|
"discardChanges": "Descartar",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Descarregar fitxer",
|
"downloadFile": "Descarregar fitxer",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ordenar per última modificació",
|
"sortByLastModified": "Ordenar per última modificació",
|
||||||
"sortByName": "Ordenar per nom",
|
"sortByName": "Ordenar per nom",
|
||||||
"sortBySize": "Ordenar per mida",
|
"sortBySize": "Ordenar per mida",
|
||||||
"noPreview": "La vista prèvia no està disponible per a aquest fitxer."
|
"noPreview": "La vista prèvia no està disponible per a aquest fitxer.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "seleccionar fitxer o carpeta",
|
"click": "seleccionar fitxer o carpeta",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuts",
|
"minutes": "Minuts",
|
||||||
"seconds": "Segons",
|
"seconds": "Segons",
|
||||||
"unit": "Unitat"
|
"unit": "Unitat"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Nahrát",
|
"upload": "Nahrát",
|
||||||
"openFile": "Otevřít soubor",
|
"openFile": "Otevřít soubor",
|
||||||
"discardChanges": "Zrušit změny",
|
"discardChanges": "Zrušit změny",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Stáhnout soubor",
|
"downloadFile": "Stáhnout soubor",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Seřadit podle poslední změny",
|
"sortByLastModified": "Seřadit podle poslední změny",
|
||||||
"sortByName": "Seřadit podle názvu",
|
"sortByName": "Seřadit podle názvu",
|
||||||
"sortBySize": "Seřadit podle velikosti",
|
"sortBySize": "Seřadit podle velikosti",
|
||||||
"noPreview": "Náhled pro tento soubor není k dispozici."
|
"noPreview": "Náhled pro tento soubor není k dispozici.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "vyberte soubor nebo adresář",
|
"click": "vyberte soubor nebo adresář",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuty",
|
"minutes": "Minuty",
|
||||||
"seconds": "Sekundy",
|
"seconds": "Sekundy",
|
||||||
"unit": "Časová jednotka"
|
"unit": "Časová jednotka"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"openFile": "Datei öffnen",
|
"openFile": "Datei öffnen",
|
||||||
"discardChanges": "Verwerfen",
|
"discardChanges": "Verwerfen",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Änderungen speichern",
|
||||||
|
"editAsText": "Als Text bearbeiten"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Download Datei",
|
"downloadFile": "Download Datei",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Nach Änderungsdatum sortieren",
|
"sortByLastModified": "Nach Änderungsdatum sortieren",
|
||||||
"sortByName": "Nach Namen sortieren",
|
"sortByName": "Nach Namen sortieren",
|
||||||
"sortBySize": "Nach Größe sortieren",
|
"sortBySize": "Nach Größe sortieren",
|
||||||
"noPreview": "Für diese Datei ist keine Vorschau verfügbar."
|
"noPreview": "Für diese Datei ist keine Vorschau verfügbar.",
|
||||||
|
"csvTooLarge": "Die CSV-Datei ist zu groß für die Vorschau (>5 MB). Bitte herunterladen, um sie anzuzeigen.",
|
||||||
|
"csvLoadFailed": "Fehler beim Laden der CSV-Datei."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "Wähle Datei oder Ordner",
|
"click": "Wähle Datei oder Ordner",
|
||||||
@@ -102,9 +105,9 @@
|
|||||||
"username": "Benutzername",
|
"username": "Benutzername",
|
||||||
"usernameTaken": "Benutzername ist bereits vergeben",
|
"usernameTaken": "Benutzername ist bereits vergeben",
|
||||||
"wrongCredentials": "Falsche Zugangsdaten",
|
"wrongCredentials": "Falsche Zugangsdaten",
|
||||||
"passwordTooShort": "Password must be at least {min} characters",
|
"passwordTooShort": "Passwort muss mindestens {min} Zeichen lang sein",
|
||||||
"logout_reasons": {
|
"logout_reasons": {
|
||||||
"inactivity": "You have been logged out due to inactivity."
|
"inactivity": "Du wurdest aufgrund von Inaktivität abgemeldet."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permanent": "Permanent",
|
"permanent": "Permanent",
|
||||||
@@ -159,7 +162,7 @@
|
|||||||
"video": "Video"
|
"video": "Video"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"aceEditorTheme": "Ace editor theme",
|
"aceEditorTheme": "Ace Editor Theme",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
"administrator": "Administrator",
|
"administrator": "Administrator",
|
||||||
"allowCommands": "Befehle ausführen",
|
"allowCommands": "Befehle ausführen",
|
||||||
@@ -167,7 +170,7 @@
|
|||||||
"allowNew": "Erstellen neuer Dateien und Ordner",
|
"allowNew": "Erstellen neuer Dateien und Ordner",
|
||||||
"allowPublish": "Veröffentlichen von neuen Beiträgen und Seiten",
|
"allowPublish": "Veröffentlichen von neuen Beiträgen und Seiten",
|
||||||
"allowSignup": "Erlaube Benutzern sich zu registrieren",
|
"allowSignup": "Erlaube Benutzern sich zu registrieren",
|
||||||
"hideLoginButton": "Hide the login button from public pages",
|
"hideLoginButton": "Den Login-Button auf öffentlichen Seiten ausblenden",
|
||||||
"avoidChanges": "(leer lassen, um Änderungen zu vermeiden)",
|
"avoidChanges": "(leer lassen, um Änderungen zu vermeiden)",
|
||||||
"branding": "Design",
|
"branding": "Design",
|
||||||
"brandingDirectoryPath": "Designverzeichnispfad",
|
"brandingDirectoryPath": "Designverzeichnispfad",
|
||||||
@@ -177,7 +180,7 @@
|
|||||||
"commandRunnerHelp": "Hier könne Sie Befehle eintragen, welche bei den benannten Aktionen ausgeführt werden. Sie müssen pro Zeile jeweils einen Befehl eingeben. Die Umgebungsvariable {0} und {1} sind verfügbar, wobei {0} relative zu {1} ist. Für mehr Informationen über diese Funktion und die verfügbaren Umgebungsvariablen lesen Sie bitte die {2}.",
|
"commandRunnerHelp": "Hier könne Sie Befehle eintragen, welche bei den benannten Aktionen ausgeführt werden. Sie müssen pro Zeile jeweils einen Befehl eingeben. Die Umgebungsvariable {0} und {1} sind verfügbar, wobei {0} relative zu {1} ist. Für mehr Informationen über diese Funktion und die verfügbaren Umgebungsvariablen lesen Sie bitte die {2}.",
|
||||||
"commandsUpdated": "Befehle aktualisiert!",
|
"commandsUpdated": "Befehle aktualisiert!",
|
||||||
"createUserDir": "Automatisches Erstellen des Home-Verzeichnisses beim Anlegen neuer Benutzer",
|
"createUserDir": "Automatisches Erstellen des Home-Verzeichnisses beim Anlegen neuer Benutzer",
|
||||||
"minimumPasswordLength": "Minimum password length",
|
"minimumPasswordLength": "Mindestlänge für Passwörter",
|
||||||
"tusUploads": "Gestückelter Upload",
|
"tusUploads": "Gestückelter Upload",
|
||||||
"tusUploadsHelp": "File Browser unterstützt das Hochladen von gestückelten Dateien und ermöglicht so einen effizienten, zuverlässigen, fortsetzbaren und gestückelten Datei-Upload auch in unzuverlässigen Netzwerken.",
|
"tusUploadsHelp": "File Browser unterstützt das Hochladen von gestückelten Dateien und ermöglicht so einen effizienten, zuverlässigen, fortsetzbaren und gestückelten Datei-Upload auch in unzuverlässigen Netzwerken.",
|
||||||
"tusUploadsChunkSize": "Gibt die maximale Größe pro Anfrage an (direkte Uploads werden für kleinere Uploads verwendet). Bitte geben Sie eine Byte-Angabe oder eine Zeichenfolge wie 10 MB, 1 GB usw. an",
|
"tusUploadsChunkSize": "Gibt die maximale Größe pro Anfrage an (direkte Uploads werden für kleinere Uploads verwendet). Bitte geben Sie eine Byte-Angabe oder eine Zeichenfolge wie 10 MB, 1 GB usw. an",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuten",
|
"minutes": "Minuten",
|
||||||
"seconds": "Sekunden",
|
"seconds": "Sekunden",
|
||||||
"unit": "Zeiteinheit"
|
"unit": "Zeiteinheit"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Μεταφόρτωση",
|
"upload": "Μεταφόρτωση",
|
||||||
"openFile": "Άνοιγμα αρχείου",
|
"openFile": "Άνοιγμα αρχείου",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Λήψη αρχείου",
|
"downloadFile": "Λήψη αρχείου",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ταξινόμηση κατά πρόσφατη τροποποίηση",
|
"sortByLastModified": "Ταξινόμηση κατά πρόσφατη τροποποίηση",
|
||||||
"sortByName": "Ταξινόμηση κατά όνομα",
|
"sortByName": "Ταξινόμηση κατά όνομα",
|
||||||
"sortBySize": "Ταξινόμηση κατά μέγεθος",
|
"sortBySize": "Ταξινόμηση κατά μέγεθος",
|
||||||
"noPreview": "Η προεπισκόπηση δεν είναι διαθέσιμη για αυτό το αρχείο."
|
"noPreview": "Η προεπισκόπηση δεν είναι διαθέσιμη για αυτό το αρχείο.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "επιλέξτε αρχείο ή φάκελο",
|
"click": "επιλέξτε αρχείο ή φάκελο",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Λεπτά",
|
"minutes": "Λεπτά",
|
||||||
"seconds": "Δευτερόλεπτα",
|
"seconds": "Δευτερόλεπτα",
|
||||||
"unit": "Μονάδα χρόνου"
|
"unit": "Μονάδα χρόνου"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,10 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text",
|
||||||
|
"increaseFontSize": "Increase font size",
|
||||||
|
"decreaseFontSize": "Decrease font size"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Download File",
|
"downloadFile": "Download File",
|
||||||
@@ -75,7 +78,16 @@
|
|||||||
"sortByLastModified": "Sort by last modified",
|
"sortByLastModified": "Sort by last modified",
|
||||||
"sortByName": "Sort by name",
|
"sortByName": "Sort by name",
|
||||||
"sortBySize": "Sort by size",
|
"sortBySize": "Sort by size",
|
||||||
"noPreview": "Preview is not available for this file."
|
"noPreview": "Preview is not available for this file.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file.",
|
||||||
|
"showingRows": "Showing {count} row(s)",
|
||||||
|
"columnSeparator": "Column Separator",
|
||||||
|
"csvSeparators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "select file or directory",
|
"click": "select file or directory",
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Subir",
|
"upload": "Subir",
|
||||||
"openFile": "Abrir archivo",
|
"openFile": "Abrir archivo",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Guardar cambios"
|
"saveChanges": "Guardar cambios",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Descargar fichero",
|
"downloadFile": "Descargar fichero",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ordenar por última modificación",
|
"sortByLastModified": "Ordenar por última modificación",
|
||||||
"sortByName": "Ordenar por nombre",
|
"sortByName": "Ordenar por nombre",
|
||||||
"sortBySize": "Ordenar por tamaño",
|
"sortBySize": "Ordenar por tamaño",
|
||||||
"noPreview": "La vista previa no está disponible para este archivo."
|
"noPreview": "La vista previa no está disponible para este archivo.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "seleccionar archivo o carpeta",
|
"click": "seleccionar archivo o carpeta",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minutos",
|
"minutes": "Minutos",
|
||||||
"seconds": "Segundos",
|
"seconds": "Segundos",
|
||||||
"unit": "Unidad"
|
"unit": "Unidad"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "آپلود",
|
"upload": "آپلود",
|
||||||
"openFile": "باز کردن فایل",
|
"openFile": "باز کردن فایل",
|
||||||
"discardChanges": "لغو کردن",
|
"discardChanges": "لغو کردن",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "دانلود فایل",
|
"downloadFile": "دانلود فایل",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "مرتب سازی آخرین ویرایش",
|
"sortByLastModified": "مرتب سازی آخرین ویرایش",
|
||||||
"sortByName": "مرتب سازی نام",
|
"sortByName": "مرتب سازی نام",
|
||||||
"sortBySize": "مرتب سازی اندازه",
|
"sortBySize": "مرتب سازی اندازه",
|
||||||
"noPreview": "این فایل قابل نمایش نیست"
|
"noPreview": "این فایل قابل نمایش نیست",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "انتخاب فایل یا پوشه",
|
"click": "انتخاب فایل یا پوشه",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "دقیقه",
|
"minutes": "دقیقه",
|
||||||
"seconds": "ثانیه",
|
"seconds": "ثانیه",
|
||||||
"unit": "واحد زمان"
|
"unit": "واحد زمان"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Importer",
|
"upload": "Importer",
|
||||||
"openFile": "Ouvrir le fichier",
|
"openFile": "Ouvrir le fichier",
|
||||||
"discardChanges": "Annuler",
|
"discardChanges": "Annuler",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Télécharger le fichier",
|
"downloadFile": "Télécharger le fichier",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Trier par date de modification",
|
"sortByLastModified": "Trier par date de modification",
|
||||||
"sortByName": "Trier par nom",
|
"sortByName": "Trier par nom",
|
||||||
"sortBySize": "Trier par taille",
|
"sortBySize": "Trier par taille",
|
||||||
"noPreview": "L'aperçu n'est pas disponible pour ce fichier."
|
"noPreview": "L'aperçu n'est pas disponible pour ce fichier.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "Sélectionner un fichier ou dossier",
|
"click": "Sélectionner un fichier ou dossier",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minutes",
|
"minutes": "Minutes",
|
||||||
"seconds": "Secondes",
|
"seconds": "Secondes",
|
||||||
"unit": "Unité de temps"
|
"unit": "Unité de temps"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "העלאה",
|
"upload": "העלאה",
|
||||||
"openFile": "פתח קובץ",
|
"openFile": "פתח קובץ",
|
||||||
"discardChanges": "זריקת השינויים",
|
"discardChanges": "זריקת השינויים",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "הורד קובץ",
|
"downloadFile": "הורד קובץ",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "מיין לפי השינוי האחרון",
|
"sortByLastModified": "מיין לפי השינוי האחרון",
|
||||||
"sortByName": "מיין לפי שם",
|
"sortByName": "מיין לפי שם",
|
||||||
"sortBySize": "מיין לפי גודל",
|
"sortBySize": "מיין לפי גודל",
|
||||||
"noPreview": "לא זמינה תצוגה מקדימה לקובץ זה"
|
"noPreview": "לא זמינה תצוגה מקדימה לקובץ זה",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "בחר קובץ או תיקייה",
|
"click": "בחר קובץ או תיקייה",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "דקות",
|
"minutes": "דקות",
|
||||||
"seconds": "שניות",
|
"seconds": "שניות",
|
||||||
"unit": "יחידת זמן"
|
"unit": "יחידת זמן"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Prenesi",
|
"upload": "Prenesi",
|
||||||
"openFile": "Otvori datoteku",
|
"openFile": "Otvori datoteku",
|
||||||
"discardChanges": "Odbaci",
|
"discardChanges": "Odbaci",
|
||||||
"saveChanges": "Spremi promjene"
|
"saveChanges": "Spremi promjene",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Preuzmi Datoteku",
|
"downloadFile": "Preuzmi Datoteku",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Sortiraj po zadnjoj izmjeni",
|
"sortByLastModified": "Sortiraj po zadnjoj izmjeni",
|
||||||
"sortByName": "Sortiraj po nazivu",
|
"sortByName": "Sortiraj po nazivu",
|
||||||
"sortBySize": "Sortiraj po veličini",
|
"sortBySize": "Sortiraj po veličini",
|
||||||
"noPreview": "Pregled nije dostupan za ovu datoteku."
|
"noPreview": "Pregled nije dostupan za ovu datoteku.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "odaberi datoteku ili mapu",
|
"click": "odaberi datoteku ili mapu",
|
||||||
@@ -102,7 +105,7 @@
|
|||||||
"username": "Korisničko ime",
|
"username": "Korisničko ime",
|
||||||
"usernameTaken": "Korisničko ime zauzeto",
|
"usernameTaken": "Korisničko ime zauzeto",
|
||||||
"wrongCredentials": "Neispravno korisničko ime/lozinka",
|
"wrongCredentials": "Neispravno korisničko ime/lozinka",
|
||||||
"passwordTooShort": "Password must be at least {min} characters",
|
"passwordTooShort": "Lozinka mora sadržavati minimalno {min} znakova",
|
||||||
"logout_reasons": {
|
"logout_reasons": {
|
||||||
"inactivity": "Odjavljeni ste zbog neaktivnosti."
|
"inactivity": "Odjavljeni ste zbog neaktivnosti."
|
||||||
}
|
}
|
||||||
@@ -167,7 +170,7 @@
|
|||||||
"allowNew": "Stvori nove datoteke i mape",
|
"allowNew": "Stvori nove datoteke i mape",
|
||||||
"allowPublish": "Objavi nove objave i stranice",
|
"allowPublish": "Objavi nove objave i stranice",
|
||||||
"allowSignup": "Dopusti registraciju korisnicima",
|
"allowSignup": "Dopusti registraciju korisnicima",
|
||||||
"hideLoginButton": "Hide the login button from public pages",
|
"hideLoginButton": "Sakrij tipku za prijavu s javnih stranica",
|
||||||
"avoidChanges": "(ostavite prazno kako biste izbjegli promjene)",
|
"avoidChanges": "(ostavite prazno kako biste izbjegli promjene)",
|
||||||
"branding": "Brendiranje",
|
"branding": "Brendiranje",
|
||||||
"brandingDirectoryPath": "Put brendiranja",
|
"brandingDirectoryPath": "Put brendiranja",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minute",
|
"minutes": "Minute",
|
||||||
"seconds": "Sekunde",
|
"seconds": "Sekunde",
|
||||||
"unit": "Jedinica vremena"
|
"unit": "Jedinica vremena"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Feltöltés",
|
"upload": "Feltöltés",
|
||||||
"openFile": "Fájl megnyitása",
|
"openFile": "Fájl megnyitása",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Fájl letöltése",
|
"downloadFile": "Fájl letöltése",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Rendezés utolsó módosítás szerint",
|
"sortByLastModified": "Rendezés utolsó módosítás szerint",
|
||||||
"sortByName": "Rendezés név szerint",
|
"sortByName": "Rendezés név szerint",
|
||||||
"sortBySize": "Rendezés méret szerint",
|
"sortBySize": "Rendezés méret szerint",
|
||||||
"noPreview": "Ehhez a fájlhoz nincs előnézet."
|
"noPreview": "Ehhez a fájlhoz nincs előnézet.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "mappa vagy fájl kijelölése",
|
"click": "mappa vagy fájl kijelölése",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Perc",
|
"minutes": "Perc",
|
||||||
"seconds": "Másodperc",
|
"seconds": "Másodperc",
|
||||||
"unit": "Időegység"
|
"unit": "Időegység"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Hlaða upp",
|
"upload": "Hlaða upp",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Sækja skjal",
|
"downloadFile": "Sækja skjal",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Flokka eftir Seinast breytt",
|
"sortByLastModified": "Flokka eftir Seinast breytt",
|
||||||
"sortByName": "Flokka eftir nafni",
|
"sortByName": "Flokka eftir nafni",
|
||||||
"sortBySize": "Flokka eftir stærð",
|
"sortBySize": "Flokka eftir stærð",
|
||||||
"noPreview": "Preview is not available for this file."
|
"noPreview": "Preview is not available for this file.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "velja skjal eða möppu",
|
"click": "velja skjal eða möppu",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Mínútur",
|
"minutes": "Mínútur",
|
||||||
"seconds": "Sekúndur",
|
"seconds": "Sekúndur",
|
||||||
"unit": "Tímastilling"
|
"unit": "Tímastilling"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Carica",
|
"upload": "Carica",
|
||||||
"openFile": "Apri file",
|
"openFile": "Apri file",
|
||||||
"discardChanges": "Ignora",
|
"discardChanges": "Ignora",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Scarica file",
|
"downloadFile": "Scarica file",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ordina per ultima modifica",
|
"sortByLastModified": "Ordina per ultima modifica",
|
||||||
"sortByName": "Ordina per nome",
|
"sortByName": "Ordina per nome",
|
||||||
"sortBySize": "Ordina per dimensione",
|
"sortBySize": "Ordina per dimensione",
|
||||||
"noPreview": "L'anteprima non è disponibile per questo file."
|
"noPreview": "L'anteprima non è disponibile per questo file.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "seleziona un file o una cartella",
|
"click": "seleziona un file o una cartella",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuti",
|
"minutes": "Minuti",
|
||||||
"seconds": "Secondi",
|
"seconds": "Secondi",
|
||||||
"unit": "Unità di tempo"
|
"unit": "Unità di tempo"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "アップロード",
|
"upload": "アップロード",
|
||||||
"openFile": "ファイルを開く",
|
"openFile": "ファイルを開く",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "ファイルのダウンロード",
|
"downloadFile": "ファイルのダウンロード",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "更新日時で並べ替え",
|
"sortByLastModified": "更新日時で並べ替え",
|
||||||
"sortByName": "名前で並べ替え",
|
"sortByName": "名前で並べ替え",
|
||||||
"sortBySize": "サイズで並べ替え",
|
"sortBySize": "サイズで並べ替え",
|
||||||
"noPreview": "プレビューはこのファイルでは利用できません"
|
"noPreview": "プレビューはこのファイルでは利用できません",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "ファイルやフォルダーを選択",
|
"click": "ファイルやフォルダーを選択",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "分",
|
"minutes": "分",
|
||||||
"seconds": "秒",
|
"seconds": "秒",
|
||||||
"unit": "時間の単位"
|
"unit": "時間の単位"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "업로드",
|
"upload": "업로드",
|
||||||
"openFile": "파일 열기",
|
"openFile": "파일 열기",
|
||||||
"discardChanges": "변경 사항 취소",
|
"discardChanges": "변경 사항 취소",
|
||||||
"saveChanges": "변경사항 저장"
|
"saveChanges": "변경사항 저장",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "파일 다운로드",
|
"downloadFile": "파일 다운로드",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "수정시간순 정렬",
|
"sortByLastModified": "수정시간순 정렬",
|
||||||
"sortByName": "이름순",
|
"sortByName": "이름순",
|
||||||
"sortBySize": "크기순",
|
"sortBySize": "크기순",
|
||||||
"noPreview": "미리 보기가 지원되지 않는 파일 유형입니다."
|
"noPreview": "미리 보기가 지원되지 않는 파일 유형입니다.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "파일이나 디렉토리를 선택해주세요.",
|
"click": "파일이나 디렉토리를 선택해주세요.",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "분",
|
"minutes": "분",
|
||||||
"seconds": "초",
|
"seconds": "초",
|
||||||
"unit": "Time Unit"
|
"unit": "Time Unit"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Uploaden",
|
"upload": "Uploaden",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Bestand downloaden",
|
"downloadFile": "Bestand downloaden",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Sorteren op laatst bewerkt",
|
"sortByLastModified": "Sorteren op laatst bewerkt",
|
||||||
"sortByName": "Sorteren op naam",
|
"sortByName": "Sorteren op naam",
|
||||||
"sortBySize": "Sorteren op grootte",
|
"sortBySize": "Sorteren op grootte",
|
||||||
"noPreview": "Preview is not available for this file."
|
"noPreview": "Preview is not available for this file.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "selecteer bestand of map",
|
"click": "selecteer bestand of map",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuten",
|
"minutes": "Minuten",
|
||||||
"seconds": "Seconden",
|
"seconds": "Seconden",
|
||||||
"unit": "Tijdseenheid"
|
"unit": "Tijdseenheid"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Last opp",
|
"upload": "Last opp",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
"discardChanges": "Slett",
|
"discardChanges": "Slett",
|
||||||
"saveChanges": "Lagre Endringane "
|
"saveChanges": "Lagre Endringane ",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Nedlast filen",
|
"downloadFile": "Nedlast filen",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Sorter etter sist endret",
|
"sortByLastModified": "Sorter etter sist endret",
|
||||||
"sortByName": "Sorter etter navn",
|
"sortByName": "Sorter etter navn",
|
||||||
"sortBySize": "Sorter etter størrelse",
|
"sortBySize": "Sorter etter størrelse",
|
||||||
"noPreview": "Forhåndsvisning er ikkje tilgjengeleg for denne filen."
|
"noPreview": "Forhåndsvisning er ikkje tilgjengeleg for denne filen.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "velg fil eller katalog",
|
"click": "velg fil eller katalog",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minutt",
|
"minutes": "Minutt",
|
||||||
"seconds": "Sekunder",
|
"seconds": "Sekunder",
|
||||||
"unit": "Time format"
|
"unit": "Time format"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Wyślij",
|
"upload": "Wyślij",
|
||||||
"openFile": "Otwórz plik",
|
"openFile": "Otwórz plik",
|
||||||
"discardChanges": "Odrzuć",
|
"discardChanges": "Odrzuć",
|
||||||
"saveChanges": "Zapisz zmiany"
|
"saveChanges": "Zapisz zmiany",
|
||||||
|
"editAsText": "Edytuj jako tekst"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Pobierz plik",
|
"downloadFile": "Pobierz plik",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Sortuj wg ostatniej modyfikacji",
|
"sortByLastModified": "Sortuj wg ostatniej modyfikacji",
|
||||||
"sortByName": "Sortuj wg nazwy",
|
"sortByName": "Sortuj wg nazwy",
|
||||||
"sortBySize": "Sortuj wg rozmiaru",
|
"sortBySize": "Sortuj wg rozmiaru",
|
||||||
"noPreview": "Podgląd tego pliku jest niedostępny."
|
"noPreview": "Podgląd tego pliku jest niedostępny.",
|
||||||
|
"csvTooLarge": "Plik CSV jest za duży do podglądu (>5 MB). Pobierz, aby wyświetlić.",
|
||||||
|
"csvLoadFailed": "Nie udało się załadować pliku CSV."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "zaznacz plik lub folder",
|
"click": "zaznacz plik lub folder",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuty",
|
"minutes": "Minuty",
|
||||||
"seconds": "Sekundy",
|
"seconds": "Sekundy",
|
||||||
"unit": "Jednostka czasu"
|
"unit": "Jednostka czasu"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Enviar",
|
"upload": "Enviar",
|
||||||
"openFile": "Abrir",
|
"openFile": "Abrir",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Baixar arquivo",
|
"downloadFile": "Baixar arquivo",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ordenar pela última modificação",
|
"sortByLastModified": "Ordenar pela última modificação",
|
||||||
"sortByName": "Ordenar pelo nome",
|
"sortByName": "Ordenar pelo nome",
|
||||||
"sortBySize": "Ordenar pelo tamanho",
|
"sortBySize": "Ordenar pelo tamanho",
|
||||||
"noPreview": "Pré-visualização não disponível para este arquivo."
|
"noPreview": "Pré-visualização não disponível para este arquivo.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "selecionar pasta ou arquivo",
|
"click": "selecionar pasta ou arquivo",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minutos",
|
"minutes": "Minutos",
|
||||||
"seconds": "Segundos",
|
"seconds": "Segundos",
|
||||||
"unit": "Unidades de Tempo"
|
"unit": "Unidades de Tempo"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Enviar",
|
"upload": "Enviar",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Descarregar ficheiro",
|
"downloadFile": "Descarregar ficheiro",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ordenar pela última alteração",
|
"sortByLastModified": "Ordenar pela última alteração",
|
||||||
"sortByName": "Ordenar pelo nome",
|
"sortByName": "Ordenar pelo nome",
|
||||||
"sortBySize": "Ordenar pelo tamanho",
|
"sortBySize": "Ordenar pelo tamanho",
|
||||||
"noPreview": "Preview is not available for this file."
|
"noPreview": "Preview is not available for this file.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "selecionar pasta ou ficheiro",
|
"click": "selecionar pasta ou ficheiro",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minutos",
|
"minutes": "Minutos",
|
||||||
"seconds": "Segundos",
|
"seconds": "Segundos",
|
||||||
"unit": "Unidades de tempo"
|
"unit": "Unidades de tempo"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Încarcă",
|
"upload": "Încarcă",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Descarcă fișier",
|
"downloadFile": "Descarcă fișier",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Ordonează dup ultima modificare",
|
"sortByLastModified": "Ordonează dup ultima modificare",
|
||||||
"sortByName": "Ordonează după nume",
|
"sortByName": "Ordonează după nume",
|
||||||
"sortBySize": "Ordonează după dimensiune",
|
"sortBySize": "Ordonează după dimensiune",
|
||||||
"noPreview": "Preview is not available for this file."
|
"noPreview": "Preview is not available for this file.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "alege fișier sau director",
|
"click": "alege fișier sau director",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minute",
|
"minutes": "Minute",
|
||||||
"seconds": "Secunde",
|
"seconds": "Secunde",
|
||||||
"unit": "Unitate de timp"
|
"unit": "Unitate de timp"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Загрузить",
|
"upload": "Загрузить",
|
||||||
"openFile": "Открыть файл",
|
"openFile": "Открыть файл",
|
||||||
"discardChanges": "Отказаться",
|
"discardChanges": "Отказаться",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Скачать файл",
|
"downloadFile": "Скачать файл",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Сортировка по дате изменения",
|
"sortByLastModified": "Сортировка по дате изменения",
|
||||||
"sortByName": "Сортировка по имени",
|
"sortByName": "Сортировка по имени",
|
||||||
"sortBySize": "Сортировка по размеру",
|
"sortBySize": "Сортировка по размеру",
|
||||||
"noPreview": "Предварительный просмотр для этого файла недоступен."
|
"noPreview": "Предварительный просмотр для этого файла недоступен.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "выбрать файл или каталог",
|
"click": "выбрать файл или каталог",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Минуты",
|
"minutes": "Минуты",
|
||||||
"seconds": "Секунды",
|
"seconds": "Секунды",
|
||||||
"unit": "Единица времени"
|
"unit": "Единица времени"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Nahrať",
|
"upload": "Nahrať",
|
||||||
"openFile": "Otvoriť súbor",
|
"openFile": "Otvoriť súbor",
|
||||||
"discardChanges": "Zahodiť",
|
"discardChanges": "Zahodiť",
|
||||||
"saveChanges": "Uložiť zmeny"
|
"saveChanges": "Uložiť zmeny",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Stiahnuť súbor",
|
"downloadFile": "Stiahnuť súbor",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Zoradiť podľa dátumu",
|
"sortByLastModified": "Zoradiť podľa dátumu",
|
||||||
"sortByName": "Zoradiť podľa názvu",
|
"sortByName": "Zoradiť podľa názvu",
|
||||||
"sortBySize": "Zoradiť podľa veľkosti",
|
"sortBySize": "Zoradiť podľa veľkosti",
|
||||||
"noPreview": "Pre tento súbor nie je dostupný náhľad."
|
"noPreview": "Pre tento súbor nie je dostupný náhľad.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "vyberie súbor alebo priečinok",
|
"click": "vyberie súbor alebo priečinok",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minúty",
|
"minutes": "Minúty",
|
||||||
"seconds": "Sekundy",
|
"seconds": "Sekundy",
|
||||||
"unit": "Jednotka času"
|
"unit": "Jednotka času"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Ladda upp",
|
"upload": "Ladda upp",
|
||||||
"openFile": "Öppna fil",
|
"openFile": "Öppna fil",
|
||||||
"discardChanges": "Förkasta",
|
"discardChanges": "Förkasta",
|
||||||
"saveChanges": "Spara ändringar"
|
"saveChanges": "Spara ändringar",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Ladda ner fil",
|
"downloadFile": "Ladda ner fil",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Sortera på senast ändrad",
|
"sortByLastModified": "Sortera på senast ändrad",
|
||||||
"sortByName": "Sortera på namn",
|
"sortByName": "Sortera på namn",
|
||||||
"sortBySize": "Sortera på storlek",
|
"sortBySize": "Sortera på storlek",
|
||||||
"noPreview": "Förhandsvisning är inte tillgänglig för denna fil."
|
"noPreview": "Förhandsvisning är inte tillgänglig för denna fil.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "välj fil eller mapp",
|
"click": "välj fil eller mapp",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Minuter",
|
"minutes": "Minuter",
|
||||||
"seconds": "Sekunder",
|
"seconds": "Sekunder",
|
||||||
"unit": "Tidsenhet"
|
"unit": "Tidsenhet"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Yükle",
|
"upload": "Yükle",
|
||||||
"openFile": "Dosyayı aç",
|
"openFile": "Dosyayı aç",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Dosyayı indir",
|
"downloadFile": "Dosyayı indir",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Güncelleme tarihine göre sırala",
|
"sortByLastModified": "Güncelleme tarihine göre sırala",
|
||||||
"sortByName": "İsme göre sırala",
|
"sortByName": "İsme göre sırala",
|
||||||
"sortBySize": "Boyuta göre sırala",
|
"sortBySize": "Boyuta göre sırala",
|
||||||
"noPreview": "Bu dosya için önizleme aktif değil"
|
"noPreview": "Bu dosya için önizleme aktif değil",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "dosya veya klasör seçin",
|
"click": "dosya veya klasör seçin",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Dakika",
|
"minutes": "Dakika",
|
||||||
"seconds": "Saniye",
|
"seconds": "Saniye",
|
||||||
"unit": "Zaman birimi"
|
"unit": "Zaman birimi"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Вивантажити",
|
"upload": "Вивантажити",
|
||||||
"openFile": "Відкрити файл",
|
"openFile": "Відкрити файл",
|
||||||
"discardChanges": "Скасувати",
|
"discardChanges": "Скасувати",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Завантажити файл",
|
"downloadFile": "Завантажити файл",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Сортувати за останнім зміненням",
|
"sortByLastModified": "Сортувати за останнім зміненням",
|
||||||
"sortByName": "Сортувати за іменем",
|
"sortByName": "Сортувати за іменем",
|
||||||
"sortBySize": "Сортувати за розміром",
|
"sortBySize": "Сортувати за розміром",
|
||||||
"noPreview": "Попередній перегляд для цього файлу недоступний."
|
"noPreview": "Попередній перегляд для цього файлу недоступний.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "вибрати файл чи каталог",
|
"click": "вибрати файл чи каталог",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Хвилини",
|
"minutes": "Хвилини",
|
||||||
"seconds": "Секунди",
|
"seconds": "Секунди",
|
||||||
"unit": "Одиниця часу"
|
"unit": "Одиниця часу"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "Tải lên",
|
"upload": "Tải lên",
|
||||||
"openFile": "Mở tệp",
|
"openFile": "Mở tệp",
|
||||||
"discardChanges": "Hủy bỏ thay đổi",
|
"discardChanges": "Hủy bỏ thay đổi",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Tải xuống tệp tin",
|
"downloadFile": "Tải xuống tệp tin",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "Sắp xếp theo ngày sửa đổi",
|
"sortByLastModified": "Sắp xếp theo ngày sửa đổi",
|
||||||
"sortByName": "Sắp xếp theo tên",
|
"sortByName": "Sắp xếp theo tên",
|
||||||
"sortBySize": "Sắp xếp theo kích thước",
|
"sortBySize": "Sắp xếp theo kích thước",
|
||||||
"noPreview": "Không có bản xem trước cho tập tin này."
|
"noPreview": "Không có bản xem trước cho tập tin này.",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "chọn tập tin hoặc thư mục",
|
"click": "chọn tập tin hoặc thư mục",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "Phút",
|
"minutes": "Phút",
|
||||||
"seconds": "Giây",
|
"seconds": "Giây",
|
||||||
"unit": "Đơn vị"
|
"unit": "Đơn vị"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "上传",
|
"upload": "上传",
|
||||||
"openFile": "打开文件",
|
"openFile": "打开文件",
|
||||||
"discardChanges": "放弃更改",
|
"discardChanges": "放弃更改",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "下载文件",
|
"downloadFile": "下载文件",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "按最后修改时间排序",
|
"sortByLastModified": "按最后修改时间排序",
|
||||||
"sortByName": "按名称排序",
|
"sortByName": "按名称排序",
|
||||||
"sortBySize": "按大小排序",
|
"sortBySize": "按大小排序",
|
||||||
"noPreview": "此文件无法预览。"
|
"noPreview": "此文件无法预览。",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "选择文件或文件夹",
|
"click": "选择文件或文件夹",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "分钟",
|
"minutes": "分钟",
|
||||||
"seconds": "秒",
|
"seconds": "秒",
|
||||||
"unit": "时间单位"
|
"unit": "时间单位"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"upload": "上傳",
|
"upload": "上傳",
|
||||||
"openFile": "開啟檔案",
|
"openFile": "開啟檔案",
|
||||||
"discardChanges": "放棄變更",
|
"discardChanges": "放棄變更",
|
||||||
"saveChanges": "Save changes"
|
"saveChanges": "Save changes",
|
||||||
|
"editAsText": "Edit as Text"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "下載檔案",
|
"downloadFile": "下載檔案",
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
"sortByLastModified": "按最後修改時間排序",
|
"sortByLastModified": "按最後修改時間排序",
|
||||||
"sortByName": "按名稱排序",
|
"sortByName": "按名稱排序",
|
||||||
"sortBySize": "按大小排序",
|
"sortBySize": "按大小排序",
|
||||||
"noPreview": "此檔案無法預覽。"
|
"noPreview": "此檔案無法預覽。",
|
||||||
|
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
|
||||||
|
"csvLoadFailed": "Failed to load CSV file."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"click": "選擇檔案或目錄",
|
"click": "選擇檔案或目錄",
|
||||||
@@ -269,5 +272,10 @@
|
|||||||
"minutes": "分鐘",
|
"minutes": "分鐘",
|
||||||
"seconds": "秒",
|
"seconds": "秒",
|
||||||
"unit": "時間單位"
|
"unit": "時間單位"
|
||||||
|
},
|
||||||
|
"available_csv_separators": {
|
||||||
|
"comma": "Comma (,)",
|
||||||
|
"semicolon": "Semicolon (;)",
|
||||||
|
"both": "Both (,) and (;)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useAuthStore } from "@/stores/auth";
|
|||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import type { JwtPayload } from "jwt-decode";
|
import type { JwtPayload } from "jwt-decode";
|
||||||
import { jwtDecode } from "jwt-decode";
|
import { jwtDecode } from "jwt-decode";
|
||||||
import { baseURL, noAuth } from "./constants";
|
import { authMethod, baseURL, noAuth, logoutPage } from "./constants";
|
||||||
import { StatusError } from "@/api/utils";
|
import { StatusError } from "@/api/utils";
|
||||||
import { setSafeTimeout } from "@/api/utils";
|
import { setSafeTimeout } from "@/api/utils";
|
||||||
|
|
||||||
@@ -18,6 +18,12 @@ export function parseToken(token: string) {
|
|||||||
authStore.jwt = token;
|
authStore.jwt = token;
|
||||||
authStore.setUser(data.user);
|
authStore.setUser(data.user);
|
||||||
|
|
||||||
|
// proxy auth with custom logout subject to unknown external timeout
|
||||||
|
if (logoutPage !== "/login" && authMethod === "proxy") {
|
||||||
|
console.warn("idle timeout disabled with proxy auth and custom logout");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (authStore.logoutTimer) {
|
if (authStore.logoutTimer) {
|
||||||
clearTimeout(authStore.logoutTimer);
|
clearTimeout(authStore.logoutTimer);
|
||||||
}
|
}
|
||||||
@@ -118,6 +124,8 @@ export function logout(reason?: string) {
|
|||||||
localStorage.setItem("jwt", "");
|
localStorage.setItem("jwt", "");
|
||||||
if (noAuth) {
|
if (noAuth) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
} else if (logoutPage !== "/login") {
|
||||||
|
document.location.href = `${logoutPage}`;
|
||||||
} else {
|
} else {
|
||||||
if (typeof reason === "string" && reason.trim() !== "") {
|
if (typeof reason === "string" && reason.trim() !== "") {
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ const version: string = window.FileBrowser.Version;
|
|||||||
const logoURL = `${staticURL}/img/logo.svg`;
|
const logoURL = `${staticURL}/img/logo.svg`;
|
||||||
const noAuth: boolean = window.FileBrowser.NoAuth;
|
const noAuth: boolean = window.FileBrowser.NoAuth;
|
||||||
const authMethod = window.FileBrowser.AuthMethod;
|
const authMethod = window.FileBrowser.AuthMethod;
|
||||||
|
const logoutPage: string = window.FileBrowser.LogoutPage;
|
||||||
const loginPage: boolean = window.FileBrowser.LoginPage;
|
const loginPage: boolean = window.FileBrowser.LoginPage;
|
||||||
const theme: UserTheme = window.FileBrowser.Theme;
|
const theme: UserTheme = window.FileBrowser.Theme;
|
||||||
const enableThumbs: boolean = window.FileBrowser.EnableThumbs;
|
const enableThumbs: boolean = window.FileBrowser.EnableThumbs;
|
||||||
@@ -32,6 +33,7 @@ export {
|
|||||||
version,
|
version,
|
||||||
noAuth,
|
noAuth,
|
||||||
authMethod,
|
authMethod,
|
||||||
|
logoutPage,
|
||||||
loginPage,
|
loginPage,
|
||||||
theme,
|
theme,
|
||||||
enableThumbs,
|
enableThumbs,
|
||||||
|
|||||||
64
frontend/src/utils/csv.ts
Normal file
64
frontend/src/utils/csv.ts
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
export interface CsvData {
|
||||||
|
headers: string[];
|
||||||
|
rows: string[][];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse CSV content into headers and rows
|
||||||
|
* Supports quoted fields and handles commas within quotes
|
||||||
|
*/
|
||||||
|
export function parseCSV(
|
||||||
|
content: string,
|
||||||
|
columnSeparator: Array<string>
|
||||||
|
): CsvData {
|
||||||
|
if (!content || content.trim().length === 0) {
|
||||||
|
return { headers: [], rows: [] };
|
||||||
|
}
|
||||||
|
|
||||||
|
const lines = content.split(/\r?\n/);
|
||||||
|
const result: string[][] = [];
|
||||||
|
|
||||||
|
for (const line of lines) {
|
||||||
|
if (line.trim().length === 0) continue;
|
||||||
|
|
||||||
|
const row: string[] = [];
|
||||||
|
let currentField = "";
|
||||||
|
let inQuotes = false;
|
||||||
|
|
||||||
|
for (let i = 0; i < line.length; i++) {
|
||||||
|
const char = line[i];
|
||||||
|
const nextChar = line[i + 1];
|
||||||
|
|
||||||
|
if (char === '"') {
|
||||||
|
if (inQuotes && nextChar === '"') {
|
||||||
|
// Escaped quote
|
||||||
|
currentField += '"';
|
||||||
|
i++; // Skip next quote
|
||||||
|
} else {
|
||||||
|
// Toggle quote state
|
||||||
|
inQuotes = !inQuotes;
|
||||||
|
}
|
||||||
|
} else if (columnSeparator.includes(char) && !inQuotes) {
|
||||||
|
// Field separator
|
||||||
|
row.push(currentField);
|
||||||
|
currentField = "";
|
||||||
|
} else {
|
||||||
|
currentField += char;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the last field
|
||||||
|
row.push(currentField);
|
||||||
|
result.push(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.length === 0) {
|
||||||
|
return { headers: [], rows: [] };
|
||||||
|
}
|
||||||
|
|
||||||
|
// First row is headers
|
||||||
|
const headers = result[0];
|
||||||
|
const rows = result.slice(1);
|
||||||
|
|
||||||
|
return { headers, rows };
|
||||||
|
}
|
||||||
@@ -69,6 +69,12 @@ const currentView = computed(() => {
|
|||||||
|
|
||||||
if (fileStore.req.isDir) {
|
if (fileStore.req.isDir) {
|
||||||
return FileListing;
|
return FileListing;
|
||||||
|
} else if (fileStore.req.extension.toLowerCase() === ".csv") {
|
||||||
|
// CSV files use Preview for table view, unless ?edit=true
|
||||||
|
if (route.query.edit === "true") {
|
||||||
|
return Editor;
|
||||||
|
}
|
||||||
|
return Preview;
|
||||||
} else if (
|
} else if (
|
||||||
fileStore.req.type === "text" ||
|
fileStore.req.type === "text" ||
|
||||||
fileStore.req.type === "textImmutable"
|
fileStore.req.type === "textImmutable"
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ const handlePageChange = (event: BeforeUnloadEvent) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const save = async () => {
|
const save = async (throwError?: boolean) => {
|
||||||
const button = "save";
|
const button = "save";
|
||||||
buttons.loading("save");
|
buttons.loading("save");
|
||||||
|
|
||||||
@@ -197,6 +197,7 @@ const save = async () => {
|
|||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
buttons.done(button);
|
buttons.done(button);
|
||||||
$showError(e);
|
$showError(e);
|
||||||
|
if (throwError) throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -223,8 +224,10 @@ const close = () => {
|
|||||||
finishClose();
|
finishClose();
|
||||||
},
|
},
|
||||||
saveAction: async () => {
|
saveAction: async () => {
|
||||||
await save();
|
try {
|
||||||
finishClose();
|
await save(true);
|
||||||
|
finishClose();
|
||||||
|
} catch {}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
@mousemove="toggleNavigation"
|
@mousemove="toggleNavigation"
|
||||||
@touchstart="toggleNavigation"
|
@touchstart="toggleNavigation"
|
||||||
>
|
>
|
||||||
<header-bar v-if="isPdf || isEpub || showNav">
|
<header-bar v-if="isPdf || isEpub || isCsv || showNav">
|
||||||
<action icon="close" :label="$t('buttons.close')" @action="close()" />
|
<action icon="close" :label="$t('buttons.close')" @action="close()" />
|
||||||
<title>{{ name }}</title>
|
<title>{{ name }}</title>
|
||||||
<action
|
<action
|
||||||
@@ -24,6 +24,13 @@
|
|||||||
:label="$t('buttons.rename')"
|
:label="$t('buttons.rename')"
|
||||||
show="rename"
|
show="rename"
|
||||||
/>
|
/>
|
||||||
|
<action
|
||||||
|
:disabled="layoutStore.loading"
|
||||||
|
v-if="isCsv && authStore.user?.perm.modify"
|
||||||
|
icon="edit_note"
|
||||||
|
:label="t('buttons.editAsText')"
|
||||||
|
@action="editAsText"
|
||||||
|
/>
|
||||||
<action
|
<action
|
||||||
:disabled="layoutStore.loading"
|
:disabled="layoutStore.loading"
|
||||||
v-if="authStore.user?.perm.delete"
|
v-if="authStore.user?.perm.delete"
|
||||||
@@ -87,6 +94,7 @@
|
|||||||
<span>{{ size }}%</span>
|
<span>{{ size }}%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<CsvViewer v-else-if="isCsv" :content="csvContent" :error="csvError" />
|
||||||
<ExtendedImage
|
<ExtendedImage
|
||||||
v-else-if="fileStore.req?.type == 'image'"
|
v-else-if="fileStore.req?.type == 'image'"
|
||||||
:src="previewUrl"
|
:src="previewUrl"
|
||||||
@@ -176,11 +184,17 @@ import HeaderBar from "@/components/header/HeaderBar.vue";
|
|||||||
import Action from "@/components/header/Action.vue";
|
import Action from "@/components/header/Action.vue";
|
||||||
import ExtendedImage from "@/components/files/ExtendedImage.vue";
|
import ExtendedImage from "@/components/files/ExtendedImage.vue";
|
||||||
import VideoPlayer from "@/components/files/VideoPlayer.vue";
|
import VideoPlayer from "@/components/files/VideoPlayer.vue";
|
||||||
|
import CsvViewer from "@/components/files/CsvViewer.vue";
|
||||||
import { VueReader } from "vue-reader";
|
import { VueReader } from "vue-reader";
|
||||||
import { computed, inject, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
import { computed, inject, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import type { Rendition } from "epubjs";
|
import type { Rendition } from "epubjs";
|
||||||
import { getTheme } from "@/utils/theme";
|
import { getTheme } from "@/utils/theme";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
|
// CSV file size limit for preview (5MB)
|
||||||
|
// Prevents browser memory issues with large files
|
||||||
|
const CSV_MAX_SIZE = 5 * 1024 * 1024;
|
||||||
|
|
||||||
const location = useStorage("book-progress", 0, undefined, {
|
const location = useStorage("book-progress", 0, undefined, {
|
||||||
serializer: {
|
serializer: {
|
||||||
@@ -239,6 +253,8 @@ const hoverNav = ref<boolean>(false);
|
|||||||
const autoPlay = ref<boolean>(false);
|
const autoPlay = ref<boolean>(false);
|
||||||
const previousRaw = ref<string>("");
|
const previousRaw = ref<string>("");
|
||||||
const nextRaw = ref<string>("");
|
const nextRaw = ref<string>("");
|
||||||
|
const csvContent = ref<string>("");
|
||||||
|
const csvError = ref<string>("");
|
||||||
|
|
||||||
const player = ref<HTMLVideoElement | HTMLAudioElement | null>(null);
|
const player = ref<HTMLVideoElement | HTMLAudioElement | null>(null);
|
||||||
|
|
||||||
@@ -248,6 +264,8 @@ const authStore = useAuthStore();
|
|||||||
const fileStore = useFileStore();
|
const fileStore = useFileStore();
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -279,6 +297,7 @@ const isPdf = computed(() => fileStore.req?.extension.toLowerCase() == ".pdf");
|
|||||||
const isEpub = computed(
|
const isEpub = computed(
|
||||||
() => fileStore.req?.extension.toLowerCase() == ".epub"
|
() => fileStore.req?.extension.toLowerCase() == ".epub"
|
||||||
);
|
);
|
||||||
|
const isCsv = computed(() => fileStore.req?.extension.toLowerCase() == ".csv");
|
||||||
|
|
||||||
const isResizeEnabled = computed(() => resizePreview);
|
const isResizeEnabled = computed(() => resizePreview);
|
||||||
|
|
||||||
@@ -366,6 +385,18 @@ const updatePreview = async () => {
|
|||||||
const dirs = route.fullPath.split("/");
|
const dirs = route.fullPath.split("/");
|
||||||
name.value = decodeURIComponent(dirs[dirs.length - 1]);
|
name.value = decodeURIComponent(dirs[dirs.length - 1]);
|
||||||
|
|
||||||
|
// Load CSV content if it's a CSV file
|
||||||
|
if (isCsv.value && fileStore.req) {
|
||||||
|
csvContent.value = "";
|
||||||
|
csvError.value = "";
|
||||||
|
|
||||||
|
if (fileStore.req.size > CSV_MAX_SIZE) {
|
||||||
|
csvError.value = t("files.csvTooLarge");
|
||||||
|
} else {
|
||||||
|
csvContent.value = fileStore.req.content ?? "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!listing.value) {
|
if (!listing.value) {
|
||||||
try {
|
try {
|
||||||
const path = url.removeLastDir(route.path);
|
const path = url.removeLastDir(route.path);
|
||||||
@@ -435,4 +466,8 @@ const close = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const download = () => window.open(downloadUrl.value);
|
const download = () => window.open(downloadUrl.value);
|
||||||
|
|
||||||
|
const editAsText = () => {
|
||||||
|
router.push({ path: route.path, query: { edit: "true" } });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
6
go.mod
6
go.mod
@@ -17,9 +17,9 @@ require (
|
|||||||
github.com/mholt/archives v0.1.5
|
github.com/mholt/archives v0.1.5
|
||||||
github.com/mitchellh/go-homedir v1.1.0
|
github.com/mitchellh/go-homedir v1.1.0
|
||||||
github.com/samber/lo v1.52.0
|
github.com/samber/lo v1.52.0
|
||||||
github.com/shirou/gopsutil/v4 v4.25.10
|
github.com/shirou/gopsutil/v4 v4.25.11
|
||||||
github.com/spf13/afero v1.15.0
|
github.com/spf13/afero v1.15.0
|
||||||
github.com/spf13/cobra v1.10.1
|
github.com/spf13/cobra v1.10.2
|
||||||
github.com/spf13/pflag v1.0.10
|
github.com/spf13/pflag v1.0.10
|
||||||
github.com/spf13/viper v1.21.0
|
github.com/spf13/viper v1.21.0
|
||||||
github.com/stretchr/testify v1.11.1
|
github.com/stretchr/testify v1.11.1
|
||||||
@@ -44,7 +44,7 @@ require (
|
|||||||
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect
|
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect
|
||||||
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
|
||||||
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349 // indirect
|
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349 // indirect
|
||||||
github.com/ebitengine/purego v0.9.0 // indirect
|
github.com/ebitengine/purego v0.9.1 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||||
github.com/go-errors/errors v1.5.1 // indirect
|
github.com/go-errors/errors v1.5.1 // indirect
|
||||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||||
|
|||||||
12
go.sum
12
go.sum
@@ -75,8 +75,8 @@ github.com/dsoprea/go-utility/v2 v2.0.0-20221003142440-7a1927d49d9d/go.mod h1:LV
|
|||||||
github.com/dsoprea/go-utility/v2 v2.0.0-20221003160719-7bc88537c05e/go.mod h1:VZ7cB0pTjm1ADBWhJUOHESu4ZYy9JN+ZPqjfiW09EPU=
|
github.com/dsoprea/go-utility/v2 v2.0.0-20221003160719-7bc88537c05e/go.mod h1:VZ7cB0pTjm1ADBWhJUOHESu4ZYy9JN+ZPqjfiW09EPU=
|
||||||
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349 h1:DilThiXje0z+3UQ5YjYiSRRzVdtamFpvBQXKwMglWqw=
|
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349 h1:DilThiXje0z+3UQ5YjYiSRRzVdtamFpvBQXKwMglWqw=
|
||||||
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349/go.mod h1:4GC5sXji84i/p+irqghpPFZBF8tRN/Q7+700G0/DLe8=
|
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349/go.mod h1:4GC5sXji84i/p+irqghpPFZBF8tRN/Q7+700G0/DLe8=
|
||||||
github.com/ebitengine/purego v0.9.0 h1:mh0zpKBIXDceC63hpvPuGLiJ8ZAa3DfrFTudmfi8A4k=
|
github.com/ebitengine/purego v0.9.1 h1:a/k2f2HQU3Pi399RPW1MOaZyhKJL9w/xFpKAg4q1s0A=
|
||||||
github.com/ebitengine/purego v0.9.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
github.com/ebitengine/purego v0.9.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||||
@@ -204,8 +204,8 @@ github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDc
|
|||||||
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
|
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
|
||||||
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=
|
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=
|
||||||
github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
|
github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
|
||||||
github.com/shirou/gopsutil/v4 v4.25.10 h1:at8lk/5T1OgtuCp+AwrDofFRjnvosn0nkN2OLQ6g8tA=
|
github.com/shirou/gopsutil/v4 v4.25.11 h1:X53gB7muL9Gnwwo2evPSE+SfOrltMoR6V3xJAXZILTY=
|
||||||
github.com/shirou/gopsutil/v4 v4.25.10/go.mod h1:+kSwyC8DRUD9XXEHCAFjK+0nuArFJM0lva+StQAcskM=
|
github.com/shirou/gopsutil/v4 v4.25.11/go.mod h1:EivAfP5x2EhLp2ovdpKSozecVXn1TmuG7SMzs/Wh4PU=
|
||||||
github.com/sorairolake/lzip-go v0.3.8 h1:j5Q2313INdTA80ureWYRhX+1K78mUXfMoPZCw/ivWik=
|
github.com/sorairolake/lzip-go v0.3.8 h1:j5Q2313INdTA80ureWYRhX+1K78mUXfMoPZCw/ivWik=
|
||||||
github.com/sorairolake/lzip-go v0.3.8/go.mod h1:JcBqGMV0frlxwrsE9sMWXDjqn3EeVf0/54YPsw66qkU=
|
github.com/sorairolake/lzip-go v0.3.8/go.mod h1:JcBqGMV0frlxwrsE9sMWXDjqn3EeVf0/54YPsw66qkU=
|
||||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
|
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
|
||||||
@@ -214,8 +214,8 @@ github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
|
|||||||
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
|
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
|
||||||
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
|
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
|
||||||
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
|
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
|
||||||
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
|
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
|
||||||
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
|
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
|
||||||
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||||
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
|
|||||||
34
http/auth.go
34
http/auth.go
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -12,7 +12,9 @@ import (
|
|||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
"github.com/golang-jwt/jwt/v5/request"
|
"github.com/golang-jwt/jwt/v5/request"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fbAuth "github.com/filebrowser/filebrowser/v2/auth"
|
||||||
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
|
"github.com/filebrowser/filebrowser/v2/settings"
|
||||||
"github.com/filebrowser/filebrowser/v2/users"
|
"github.com/filebrowser/filebrowser/v2/users"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -61,6 +63,22 @@ func (e extractor) ExtractToken(r *http.Request) (string, error) {
|
|||||||
return "", request.ErrNoTokenInRequest
|
return "", request.ErrNoTokenInRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func renewableErr(err error, d *data) bool {
|
||||||
|
if d.settings.AuthMethod != fbAuth.MethodProxyAuth || err == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if d.settings.LogoutPage == settings.DefaultLogoutPage {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if !errors.Is(err, jwt.ErrTokenExpired) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func withUser(fn handleFunc) handleFunc {
|
func withUser(fn handleFunc) handleFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
return func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
||||||
keyFunc := func(_ *jwt.Token) (interface{}, error) {
|
keyFunc := func(_ *jwt.Token) (interface{}, error) {
|
||||||
@@ -68,13 +86,9 @@ func withUser(fn handleFunc) handleFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var tk authToken
|
var tk authToken
|
||||||
token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk))
|
p := jwt.NewParser(jwt.WithValidMethods([]string{jwt.SigningMethodHS256.Alg()}), jwt.WithExpirationRequired())
|
||||||
if err != nil || !token.Valid {
|
token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk), request.WithParser(p))
|
||||||
return http.StatusUnauthorized, nil
|
if (err != nil || !token.Valid) && !renewableErr(err, d) {
|
||||||
}
|
|
||||||
|
|
||||||
err = jwt.NewValidator(jwt.WithExpirationRequired()).Validate(tk)
|
|
||||||
if err != nil {
|
|
||||||
return http.StatusUnauthorized, nil
|
return http.StatusUnauthorized, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,7 +185,7 @@ var signupHandler = func(_ http.ResponseWriter, r *http.Request, d *data) (int,
|
|||||||
log.Printf("new user: %s, home dir: [%s].", user.Username, userHome)
|
log.Printf("new user: %s, home dir: [%s].", user.Username, userHome)
|
||||||
|
|
||||||
err = d.store.Users.Save(user)
|
err = d.store.Users.Save(user)
|
||||||
if errors.Is(err, fbErrors.ErrExist) {
|
if errors.Is(err, fberrors.ErrExist) {
|
||||||
return http.StatusConflict, err
|
return http.StatusConflict, err
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return http.StatusInternalServerError, err
|
return http.StatusInternalServerError, err
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//go:build !dev
|
//go:build !dev
|
||||||
|
|
||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
// global headers to append to every response
|
// global headers to append to every response
|
||||||
var globalHeaders = map[string]string{
|
var globalHeaders = map[string]string{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/fs"
|
"io/fs"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//go:generate go-enum --sql --marshal --names --file $GOFILE
|
//go:generate go-enum --sql --marshal --names --file $GOFILE
|
||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by go-enum
|
// Code generated by go-enum
|
||||||
// DO NOT EDIT!
|
// DO NOT EDIT!
|
||||||
|
|
||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql/driver"
|
"database/sql/driver"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/shirou/gopsutil/v4/disk"
|
"github.com/shirou/gopsutil/v4/disk"
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/files"
|
"github.com/filebrowser/filebrowser/v2/files"
|
||||||
"github.com/filebrowser/filebrowser/v2/fileutils"
|
"github.com/filebrowser/filebrowser/v2/fileutils"
|
||||||
)
|
)
|
||||||
@@ -44,7 +44,7 @@ var resourceGetHandler = withUser(func(w http.ResponseWriter, r *http.Request, d
|
|||||||
|
|
||||||
if checksum := r.URL.Query().Get("checksum"); checksum != "" {
|
if checksum := r.URL.Query().Get("checksum"); checksum != "" {
|
||||||
err := file.Checksum(checksum)
|
err := file.Checksum(checksum)
|
||||||
if errors.Is(err, fbErrors.ErrInvalidOption) {
|
if errors.Is(err, fberrors.ErrInvalidOption) {
|
||||||
return http.StatusBadRequest, nil
|
return http.StatusBadRequest, nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return http.StatusInternalServerError, err
|
return http.StatusInternalServerError, err
|
||||||
@@ -238,7 +238,7 @@ func checkParent(src, dst string) error {
|
|||||||
|
|
||||||
rel = filepath.ToSlash(rel)
|
rel = filepath.ToSlash(rel)
|
||||||
if !strings.HasPrefix(rel, "../") && rel != ".." && rel != "." {
|
if !strings.HasPrefix(rel, "../") && rel != ".." && rel != "." {
|
||||||
return fbErrors.ErrSourceIsParent
|
return fberrors.ErrSourceIsParent
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@@ -304,13 +304,13 @@ func patchAction(ctx context.Context, action, src, dst string, d *data, fileCach
|
|||||||
switch action {
|
switch action {
|
||||||
case "copy":
|
case "copy":
|
||||||
if !d.user.Perm.Create {
|
if !d.user.Perm.Create {
|
||||||
return fbErrors.ErrPermissionDenied
|
return fberrors.ErrPermissionDenied
|
||||||
}
|
}
|
||||||
|
|
||||||
return fileutils.Copy(d.user.Fs, src, dst, d.settings.FileMode, d.settings.DirMode)
|
return fileutils.Copy(d.user.Fs, src, dst, d.settings.FileMode, d.settings.DirMode)
|
||||||
case "rename":
|
case "rename":
|
||||||
if !d.user.Perm.Rename {
|
if !d.user.Perm.Rename {
|
||||||
return fbErrors.ErrPermissionDenied
|
return fberrors.ErrPermissionDenied
|
||||||
}
|
}
|
||||||
src = path.Clean("/" + src)
|
src = path.Clean("/" + src)
|
||||||
dst = path.Clean("/" + dst)
|
dst = path.Clean("/" + dst)
|
||||||
@@ -335,7 +335,7 @@ func patchAction(ctx context.Context, action, src, dst string, d *data, fileCach
|
|||||||
|
|
||||||
return fileutils.MoveFile(d.user.Fs, src, dst, d.settings.FileMode, d.settings.DirMode)
|
return fileutils.MoveFile(d.user.Fs, src, dst, d.settings.FileMode, d.settings.DirMode)
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unsupported action %s: %w", action, fbErrors.ErrInvalidRequestParams)
|
return fmt.Errorf("unsupported action %s: %w", action, fberrors.ErrInvalidRequestParams)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/share"
|
"github.com/filebrowser/filebrowser/v2/share"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ var shareListHandler = withPermShare(func(w http.ResponseWriter, r *http.Request
|
|||||||
} else {
|
} else {
|
||||||
s, err = d.store.Share.FindByUserID(d.user.ID)
|
s, err = d.store.Share.FindByUserID(d.user.ID)
|
||||||
}
|
}
|
||||||
if errors.Is(err, fbErrors.ErrNotExist) {
|
if errors.Is(err, fberrors.ErrNotExist) {
|
||||||
return renderJSON(w, r, []*share.Link{})
|
return renderJSON(w, r, []*share.Link{})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ var shareListHandler = withPermShare(func(w http.ResponseWriter, r *http.Request
|
|||||||
|
|
||||||
var shareGetsHandler = withPermShare(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
var shareGetsHandler = withPermShare(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
||||||
s, err := d.store.Share.Gets(r.URL.Path, d.user.ID)
|
s, err := d.store.Share.Gets(r.URL.Path, d.user.ID)
|
||||||
if errors.Is(err, fbErrors.ErrNotExist) {
|
if errors.Is(err, fberrors.ErrNotExist) {
|
||||||
return renderJSON(w, r, []*share.Link{})
|
return renderJSON(w, r, []*share.Link{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -38,6 +38,7 @@ func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys
|
|||||||
"Signup": d.settings.Signup,
|
"Signup": d.settings.Signup,
|
||||||
"NoAuth": d.settings.AuthMethod == auth.MethodNoAuth,
|
"NoAuth": d.settings.AuthMethod == auth.MethodNoAuth,
|
||||||
"AuthMethod": d.settings.AuthMethod,
|
"AuthMethod": d.settings.AuthMethod,
|
||||||
|
"LogoutPage": d.settings.LogoutPage,
|
||||||
"LoginPage": auther.LoginPage(),
|
"LoginPage": auther.LoginPage(),
|
||||||
"CSS": false,
|
"CSS": false,
|
||||||
"ReCaptcha": false,
|
"ReCaptcha": false,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"golang.org/x/text/cases"
|
"golang.org/x/text/cases"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/users"
|
"github.com/filebrowser/filebrowser/v2/users"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ func getUserID(r *http.Request) (uint, error) {
|
|||||||
|
|
||||||
func getUser(_ http.ResponseWriter, r *http.Request) (*modifyUserRequest, error) {
|
func getUser(_ http.ResponseWriter, r *http.Request) (*modifyUserRequest, error) {
|
||||||
if r.Body == nil {
|
if r.Body == nil {
|
||||||
return nil, fbErrors.ErrEmptyRequest
|
return nil, fberrors.ErrEmptyRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
req := &modifyUserRequest{}
|
req := &modifyUserRequest{}
|
||||||
@@ -46,7 +46,7 @@ func getUser(_ http.ResponseWriter, r *http.Request) (*modifyUserRequest, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.What != "user" {
|
if req.What != "user" {
|
||||||
return nil, fbErrors.ErrInvalidDataType
|
return nil, fberrors.ErrInvalidDataType
|
||||||
}
|
}
|
||||||
|
|
||||||
return req, nil
|
return req, nil
|
||||||
@@ -87,7 +87,7 @@ var usersGetHandler = withAdmin(func(w http.ResponseWriter, r *http.Request, d *
|
|||||||
|
|
||||||
var userGetHandler = withSelfOrAdmin(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
var userGetHandler = withSelfOrAdmin(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
||||||
u, err := d.store.Users.Get(d.server.Root, d.raw.(uint))
|
u, err := d.store.Users.Get(d.server.Root, d.raw.(uint))
|
||||||
if errors.Is(err, fbErrors.ErrNotExist) {
|
if errors.Is(err, fberrors.ErrNotExist) {
|
||||||
return http.StatusNotFound, err
|
return http.StatusNotFound, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ var userPostHandler = withAdmin(func(w http.ResponseWriter, r *http.Request, d *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.Data.Password == "" {
|
if req.Data.Password == "" {
|
||||||
return http.StatusBadRequest, fbErrors.ErrEmptyPassword
|
return http.StatusBadRequest, fberrors.ErrEmptyPassword
|
||||||
}
|
}
|
||||||
|
|
||||||
req.Data.Password, err = users.ValidateAndHashPwd(req.Data.Password, d.settings.MinimumPasswordLength)
|
req.Data.Password, err = users.ValidateAndHashPwd(req.Data.Password, d.settings.MinimumPasswordLength)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package http
|
package fbhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|||||||
@@ -10,5 +10,6 @@
|
|||||||
"postUpdateOptions": [
|
"postUpdateOptions": [
|
||||||
"gomodUpdateImportPaths",
|
"gomodUpdateImportPaths",
|
||||||
"gomodTidy"
|
"gomodTidy"
|
||||||
]
|
],
|
||||||
|
"schedule": "* * * * 0,6"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const DefaultUsersHomeBasePath = "/users"
|
const DefaultUsersHomeBasePath = "/users"
|
||||||
|
const DefaultLogoutPage = "/login"
|
||||||
const DefaultMinimumPasswordLength = 12
|
const DefaultMinimumPasswordLength = 12
|
||||||
const DefaultFileMode = 0640
|
const DefaultFileMode = 0640
|
||||||
const DefaultDirMode = 0750
|
const DefaultDirMode = 0750
|
||||||
@@ -27,6 +28,7 @@ type Settings struct {
|
|||||||
UserHomeBasePath string `json:"userHomeBasePath"`
|
UserHomeBasePath string `json:"userHomeBasePath"`
|
||||||
Defaults UserDefaults `json:"defaults"`
|
Defaults UserDefaults `json:"defaults"`
|
||||||
AuthMethod AuthMethod `json:"authMethod"`
|
AuthMethod AuthMethod `json:"authMethod"`
|
||||||
|
LogoutPage string `json:"logoutPage"`
|
||||||
Branding Branding `json:"branding"`
|
Branding Branding `json:"branding"`
|
||||||
Tus Tus `json:"tus"`
|
Tus Tus `json:"tus"`
|
||||||
Commands map[string][]string `json:"commands"`
|
Commands map[string][]string `json:"commands"`
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package settings
|
package settings
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/rules"
|
"github.com/filebrowser/filebrowser/v2/rules"
|
||||||
"github.com/filebrowser/filebrowser/v2/users"
|
"github.com/filebrowser/filebrowser/v2/users"
|
||||||
)
|
)
|
||||||
@@ -30,24 +30,34 @@ func (s *Storage) Get() (*Settings, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if set.UserHomeBasePath == "" {
|
if set.UserHomeBasePath == "" {
|
||||||
set.UserHomeBasePath = DefaultUsersHomeBasePath
|
set.UserHomeBasePath = DefaultUsersHomeBasePath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if set.LogoutPage == "" {
|
||||||
|
set.LogoutPage = DefaultLogoutPage
|
||||||
|
}
|
||||||
|
|
||||||
if set.MinimumPasswordLength == 0 {
|
if set.MinimumPasswordLength == 0 {
|
||||||
set.MinimumPasswordLength = DefaultMinimumPasswordLength
|
set.MinimumPasswordLength = DefaultMinimumPasswordLength
|
||||||
}
|
}
|
||||||
|
|
||||||
if set.Tus == (Tus{}) {
|
if set.Tus == (Tus{}) {
|
||||||
set.Tus = Tus{
|
set.Tus = Tus{
|
||||||
ChunkSize: DefaultTusChunkSize,
|
ChunkSize: DefaultTusChunkSize,
|
||||||
RetryCount: DefaultTusRetryCount,
|
RetryCount: DefaultTusRetryCount,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if set.FileMode == 0 {
|
if set.FileMode == 0 {
|
||||||
set.FileMode = DefaultFileMode
|
set.FileMode = DefaultFileMode
|
||||||
}
|
}
|
||||||
|
|
||||||
if set.DirMode == 0 {
|
if set.DirMode == 0 {
|
||||||
set.DirMode = DefaultDirMode
|
set.DirMode = DefaultDirMode
|
||||||
}
|
}
|
||||||
|
|
||||||
return set, nil
|
return set, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +72,7 @@ var defaultEvents = []string{
|
|||||||
// Save saves the settings for the current instance.
|
// Save saves the settings for the current instance.
|
||||||
func (s *Storage) Save(set *Settings) error {
|
func (s *Storage) Save(set *Settings) error {
|
||||||
if len(set.Key) == 0 {
|
if len(set.Key) == 0 {
|
||||||
return errors.ErrEmptyKey
|
return fberrors.ErrEmptyKey
|
||||||
}
|
}
|
||||||
|
|
||||||
if set.Defaults.Locale == "" {
|
if set.Defaults.Locale == "" {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package share
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StorageBackend is the interface to implement for a share storage.
|
// StorageBackend is the interface to implement for a share storage.
|
||||||
@@ -79,7 +79,7 @@ func (s *Storage) GetByHash(hash string) (*Link, error) {
|
|||||||
if err := s.Delete(link.Hash); err != nil {
|
if err := s.Delete(link.Hash); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return nil, errors.ErrNotExist
|
return nil, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return link, nil
|
return link, nil
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/asdine/storm/v3"
|
"github.com/asdine/storm/v3"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/auth"
|
"github.com/filebrowser/filebrowser/v2/auth"
|
||||||
"github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/settings"
|
"github.com/filebrowser/filebrowser/v2/settings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ func (s authBackend) Get(t settings.AuthMethod) (auth.Auther, error) {
|
|||||||
case auth.MethodNoAuth:
|
case auth.MethodNoAuth:
|
||||||
auther = &auth.NoAuth{}
|
auther = &auth.NoAuth{}
|
||||||
default:
|
default:
|
||||||
return nil, errors.ErrInvalidAuthMethod
|
return nil, fberrors.ErrInvalidAuthMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
return auther, get(s.db, "auther", auther)
|
return auther, get(s.db, "auther", auther)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/asdine/storm/v3"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/v3/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/share"
|
"github.com/filebrowser/filebrowser/v2/share"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ func (s shareBackend) All() ([]*share.Link, error) {
|
|||||||
var v []*share.Link
|
var v []*share.Link
|
||||||
err := s.db.All(&v)
|
err := s.db.All(&v)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return v, fbErrors.ErrNotExist
|
return v, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return v, err
|
return v, err
|
||||||
@@ -28,7 +28,7 @@ func (s shareBackend) FindByUserID(id uint) ([]*share.Link, error) {
|
|||||||
var v []*share.Link
|
var v []*share.Link
|
||||||
err := s.db.Select(q.Eq("UserID", id)).Find(&v)
|
err := s.db.Select(q.Eq("UserID", id)).Find(&v)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return v, fbErrors.ErrNotExist
|
return v, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return v, err
|
return v, err
|
||||||
@@ -38,7 +38,7 @@ func (s shareBackend) GetByHash(hash string) (*share.Link, error) {
|
|||||||
var v share.Link
|
var v share.Link
|
||||||
err := s.db.One("Hash", hash, &v)
|
err := s.db.One("Hash", hash, &v)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return nil, fbErrors.ErrNotExist
|
return nil, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return &v, err
|
return &v, err
|
||||||
@@ -48,7 +48,7 @@ func (s shareBackend) GetPermanent(path string, id uint) (*share.Link, error) {
|
|||||||
var v share.Link
|
var v share.Link
|
||||||
err := s.db.Select(q.Eq("Path", path), q.Eq("Expire", 0), q.Eq("UserID", id)).First(&v)
|
err := s.db.Select(q.Eq("Path", path), q.Eq("Expire", 0), q.Eq("UserID", id)).First(&v)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return nil, fbErrors.ErrNotExist
|
return nil, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return &v, err
|
return &v, err
|
||||||
@@ -58,7 +58,7 @@ func (s shareBackend) Gets(path string, id uint) ([]*share.Link, error) {
|
|||||||
var v []*share.Link
|
var v []*share.Link
|
||||||
err := s.db.Select(q.Eq("Path", path), q.Eq("UserID", id)).Find(&v)
|
err := s.db.Select(q.Eq("Path", path), q.Eq("UserID", id)).Find(&v)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return v, fbErrors.ErrNotExist
|
return v, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return v, err
|
return v, err
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/asdine/storm/v3"
|
"github.com/asdine/storm/v3"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/users"
|
"github.com/filebrowser/filebrowser/v2/users"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -25,14 +25,14 @@ func (st usersBackend) GetBy(i interface{}) (user *users.User, err error) {
|
|||||||
case string:
|
case string:
|
||||||
arg = "Username"
|
arg = "Username"
|
||||||
default:
|
default:
|
||||||
return nil, fbErrors.ErrInvalidDataType
|
return nil, fberrors.ErrInvalidDataType
|
||||||
}
|
}
|
||||||
|
|
||||||
err = st.db.One(arg, i, user)
|
err = st.db.One(arg, i, user)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return nil, fbErrors.ErrNotExist
|
return nil, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ func (st usersBackend) Gets() ([]*users.User, error) {
|
|||||||
var allUsers []*users.User
|
var allUsers []*users.User
|
||||||
err := st.db.All(&allUsers)
|
err := st.db.All(&allUsers)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return nil, fbErrors.ErrNotExist
|
return nil, fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -76,7 +76,7 @@ func (st usersBackend) Update(user *users.User, fields ...string) error {
|
|||||||
func (st usersBackend) Save(user *users.User) error {
|
func (st usersBackend) Save(user *users.User) error {
|
||||||
err := st.db.Save(user)
|
err := st.db.Save(user)
|
||||||
if errors.Is(err, storm.ErrAlreadyExists) {
|
if errors.Is(err, storm.ErrAlreadyExists) {
|
||||||
return fbErrors.ErrExist
|
return fberrors.ErrExist
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import (
|
|||||||
|
|
||||||
"github.com/asdine/storm/v3"
|
"github.com/asdine/storm/v3"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
func get(db *storm.DB, name string, to interface{}) error {
|
func get(db *storm.DB, name string, to interface{}) error {
|
||||||
err := db.Get("config", name, to)
|
err := db.Get("config", name, to)
|
||||||
if errors.Is(err, storm.ErrNotFound) {
|
if errors.Is(err, storm.ErrNotFound) {
|
||||||
return fbErrors.ErrNotExist
|
return fberrors.ErrNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -6,17 +6,17 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
||||||
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ValidateAndHashPwd validates and hashes a password.
|
// ValidateAndHashPwd validates and hashes a password.
|
||||||
func ValidateAndHashPwd(password string, minimumLength uint) (string, error) {
|
func ValidateAndHashPwd(password string, minimumLength uint) (string, error) {
|
||||||
if uint(len(password)) < minimumLength {
|
if uint(len(password)) < minimumLength {
|
||||||
return "", fbErrors.ErrShortPassword{MinimumLength: minimumLength}
|
return "", fberrors.ErrShortPassword{MinimumLength: minimumLength}
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := commonPasswords[password]; ok {
|
if _, ok := commonPasswords[password]; ok {
|
||||||
return "", fbErrors.ErrEasyPassword
|
return "", fberrors.ErrEasyPassword
|
||||||
}
|
}
|
||||||
|
|
||||||
return HashPwd(password)
|
return HashPwd(password)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StorageBackend is the interface to implement for a users storage.
|
// StorageBackend is the interface to implement for a users storage.
|
||||||
@@ -109,16 +109,16 @@ func (s *Storage) Delete(id interface{}) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if user.ID == 1 {
|
if user.ID == 1 {
|
||||||
return errors.ErrRootUserDeletion
|
return fberrors.ErrRootUserDeletion
|
||||||
}
|
}
|
||||||
return s.back.DeleteByUsername(id)
|
return s.back.DeleteByUsername(id)
|
||||||
case uint:
|
case uint:
|
||||||
if id == 1 {
|
if id == 1 {
|
||||||
return errors.ErrRootUserDeletion
|
return fberrors.ErrRootUserDeletion
|
||||||
}
|
}
|
||||||
return s.back.DeleteByID(id)
|
return s.back.DeleteByID(id)
|
||||||
default:
|
default:
|
||||||
return errors.ErrInvalidDataType
|
return fberrors.ErrInvalidDataType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/errors"
|
fberrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
"github.com/filebrowser/filebrowser/v2/files"
|
"github.com/filebrowser/filebrowser/v2/files"
|
||||||
"github.com/filebrowser/filebrowser/v2/rules"
|
"github.com/filebrowser/filebrowser/v2/rules"
|
||||||
)
|
)
|
||||||
@@ -64,11 +64,11 @@ func (u *User) Clean(baseScope string, fields ...string) error {
|
|||||||
switch field {
|
switch field {
|
||||||
case "Username":
|
case "Username":
|
||||||
if u.Username == "" {
|
if u.Username == "" {
|
||||||
return errors.ErrEmptyUsername
|
return fberrors.ErrEmptyUsername
|
||||||
}
|
}
|
||||||
case "Password":
|
case "Password":
|
||||||
if u.Password == "" {
|
if u.Password == "" {
|
||||||
return errors.ErrEmptyPassword
|
return fberrors.ErrEmptyPassword
|
||||||
}
|
}
|
||||||
case "ViewMode":
|
case "ViewMode":
|
||||||
if u.ViewMode == "" {
|
if u.ViewMode == "" {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ filebrowser config init [flags]
|
|||||||
-a, --address string address to listen on (default "127.0.0.1")
|
-a, --address string address to listen on (default "127.0.0.1")
|
||||||
--auth.command string command for auth.method=hook
|
--auth.command string command for auth.method=hook
|
||||||
--auth.header string HTTP header for auth.method=proxy
|
--auth.header string HTTP header for auth.method=proxy
|
||||||
|
--auth.logoutPage string url of custom logout page
|
||||||
--auth.method string authentication type (default "json")
|
--auth.method string authentication type (default "json")
|
||||||
-b, --baseURL string base url
|
-b, --baseURL string base url
|
||||||
--branding.color string set the theme color
|
--branding.color string set the theme color
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ filebrowser config set [flags]
|
|||||||
-a, --address string address to listen on (default "127.0.0.1")
|
-a, --address string address to listen on (default "127.0.0.1")
|
||||||
--auth.command string command for auth.method=hook
|
--auth.command string command for auth.method=hook
|
||||||
--auth.header string HTTP header for auth.method=proxy
|
--auth.header string HTTP header for auth.method=proxy
|
||||||
|
--auth.logoutPage string url of custom logout page
|
||||||
--auth.method string authentication type (default "json")
|
--auth.method string authentication type (default "json")
|
||||||
-b, --baseURL string base url
|
-b, --baseURL string base url
|
||||||
--branding.color string set the theme color
|
--branding.color string set the theme color
|
||||||
|
|||||||
Reference in New Issue
Block a user