mirror of
https://github.com/gtsteffaniak/filebrowser.git
synced 2026-11-17 14:29:42 -05:00
Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1ab7dda42 | ||
|
|
22174b5575 | ||
|
|
f7e09430e6 | ||
|
|
f3f4bbe80c | ||
|
|
863f8f64a3 | ||
|
|
ec80963d5f | ||
|
|
630016a36c | ||
|
|
1b748adc53 | ||
|
|
6571e3adca | ||
|
|
5d88f223e5 | ||
|
|
8a9347c9df | ||
|
|
6014139f2d | ||
|
|
4ff600dab1 | ||
|
|
07530de13b | ||
|
|
d6e4063f3b | ||
|
|
2539b893d7 | ||
|
|
b30b1641fc | ||
|
|
010c4728ae | ||
|
|
8658b27a97 | ||
|
|
36bf16a68b | ||
|
|
c135b8610d | ||
|
|
27eb86421d | ||
|
|
7359640dec |
No files matched your search
@@ -2,66 +2,6 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version).
|
||||
|
||||
## v1.5.4
|
||||
|
||||
**Notes**:
|
||||
- PWA installation name now capped at 30 characters instead of 12 (#2699)
|
||||
|
||||
**BugFixes**:
|
||||
- fix forward slash blocked in text fields when the search shortcut listener intercepts `/` (#2696)
|
||||
|
||||
## v1.5.3
|
||||
|
||||
**BugFixes**:
|
||||
- fix probe canShare with the real file, not a fixed text/plain stand-in (#2664)
|
||||
- When the logout button is pressed, the user is redirected to an invalid URL that does not honor baseURL / externalUrl (#2657)
|
||||
- fix redirect to login when an authenticated request returns 401 (expired session)
|
||||
|
||||
## v1.5.2
|
||||
|
||||
**Notes**:
|
||||
- [docker] upgraded ffmpeg version 8.1.1 to 8.1.2
|
||||
|
||||
**BugFixes**:
|
||||
- Fixed OnlyOffice reopening an older editor state after a document is modified (#2633) (#2578).
|
||||
- Cannot "Reset and generate new two-factor code" to reset the TOTP for a user (#2399) (#2641).
|
||||
|
||||
## v1.5.1
|
||||
|
||||
**BugFixes**:
|
||||
- fix http config section being dropped so trustedHeaders and disableRateLimit apply (#2602) (#2560)
|
||||
- fix upload shares with password (#2589) (#2573)
|
||||
- fix token when returning from preview on shares with pass (#2588) (#2465)
|
||||
- fix share undefined url after editing (#2567) (#2523)
|
||||
|
||||
## v1.5.0
|
||||
|
||||
**New Features**:
|
||||
- Added basic html viewer with relative reference support (#2522)
|
||||
- Shares can have pinned files, requires a user to have edit access to share (#2522)
|
||||
- Enhanced search
|
||||
- now uses "lazy" match by default. (#2509)
|
||||
- added missing `case sensitive` option in the UI
|
||||
- Progressive Web App (PWA) improvements
|
||||
- restored install prompt with sidebar install button (#2086)
|
||||
- camera and video capture buttons on upload (mobile-friendly `capture` inputs)
|
||||
- send files to other apps via the Web Share API (`Send to app` in the context menu)
|
||||
- App notifications for file operations (#2478)
|
||||
- optional browser notifications when uploads, chunked downloads, move/copy, or failures finish while the tab is in the background
|
||||
- single on/off toggle in Notifications settings, stored in browser local storage
|
||||
|
||||
**Notes**:
|
||||
- [docker] upgraded ffmpeg version 8.1 to 8.1.1
|
||||
|
||||
**BugFixes**:
|
||||
- fixed PWA manifest `scope` and `id` so install works when the app is served under a base URL
|
||||
- installing a public share as a PWA now opens the share URL instead of the site root (#2302)
|
||||
|
||||
## v1.4.4
|
||||
|
||||
**BugFixes**:
|
||||
- Pinning/Unpinning file resets users' scope permission (#2532)
|
||||
|
||||
## v1.4.3
|
||||
|
||||
**Security**:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div align="center">
|
||||
|
||||
[](https://goreportcard.com/report/github.com/gtsteffaniak/filebrowser/backend)
|
||||
[](https://app.codacy.com/gh/gtsteffaniak/filebrowser/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
||||
[](https://github.com/gtsteffaniak/filebrowser/releases)
|
||||
[](https://hub.docker.com/r/gtstef/filebrowser)
|
||||
@@ -16,6 +17,8 @@
|
||||
|
||||
## Pinned
|
||||
|
||||
:loudspeaker: [New Announcement](https://github.com/gtsteffaniak/filebrowser/discussions/2048)
|
||||
|
||||
:pushpin: [Read The Official Docs](https://filebrowserquantum.com/) (currently english-only)
|
||||
|
||||
## About
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM gtstef/ffmpeg:8.1.2-decode AS ffmpeg
|
||||
FROM gtstef/ffmpeg:8.1-decode AS ffmpeg
|
||||
FROM golang:alpine AS base
|
||||
ARG VERSION
|
||||
ARG REVISION
|
||||
|
||||
@@ -89,7 +89,7 @@ func processDirectoryMetadata(response *iteminfo.ExtendedFileInfo, idx *indexing
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
// finalizeResponse handles final response adjustments (OnlyOffice ID, scope stripping).
|
||||
// finalizeResponse handles final response adjustments (OnlyOffice ID, scope stripping)
|
||||
func finalizeResponse(response *iteminfo.ExtendedFileInfo, info *iteminfo.FileInfo, realPath string, user *users.User, userScope string) {
|
||||
// Add OnlyOffice ID if applicable
|
||||
if settings.Config.Integrations.OnlyOffice.Secret != "" && info.Type != "directory" && iteminfo.IsOnlyOffice(info.Name) {
|
||||
@@ -223,12 +223,12 @@ func GetDirItems(opts utils.FileOptions, access *access.Storage, user *users.Use
|
||||
// FileInfoFasterFunc is a variable that can be mocked in tests
|
||||
var FileInfoFasterFunc = fileInfoFasterImpl
|
||||
|
||||
func FileInfoFaster(opts utils.FileOptions, access *access.Storage, user *users.User, shareStore *share.Storage) (*iteminfo.ExtendedFileInfo, error) {
|
||||
return FileInfoFasterFunc(opts, access, user, shareStore)
|
||||
func FileInfoFaster(opts utils.FileOptions, access *access.Storage, user *users.User, share *share.Storage) (*iteminfo.ExtendedFileInfo, error) {
|
||||
return FileInfoFasterFunc(opts, access, user, share)
|
||||
}
|
||||
|
||||
// fileInfoFasterImpl is the actual implementation of FileInfoFaster
|
||||
func fileInfoFasterImpl(opts utils.FileOptions, access *access.Storage, user *users.User, shareStore *share.Storage) (*iteminfo.ExtendedFileInfo, error) {
|
||||
func fileInfoFasterImpl(opts utils.FileOptions, access *access.Storage, user *users.User, share *share.Storage) (*iteminfo.ExtendedFileInfo, error) {
|
||||
response := &iteminfo.ExtendedFileInfo{}
|
||||
indexPath, userScope, topLevelErr := CheckPermissions(opts, access, user)
|
||||
accessRulesErr := topLevelErr != nil && topLevelErr == errors.ErrAccessDenied && indexPath != ""
|
||||
@@ -268,29 +268,17 @@ func fileInfoFasterImpl(opts utils.FileOptions, access *access.Storage, user *us
|
||||
response.FileInfo = *info
|
||||
response.RealPath = filepath.Join(idx.Path, indexPath)
|
||||
response.Source = opts.Source
|
||||
if shareStore != nil && user.Permissions.Share && opts.ShowSharedAttr {
|
||||
if share != nil && user.Permissions.Share && opts.ShowSharedAttr {
|
||||
for i := range response.Files {
|
||||
file := &response.Files[i]
|
||||
file.IsShared = shareStore.IsShared(response.Path+file.Name, idx.Path, user.ID)
|
||||
file.IsShared = share.IsShared(response.Path+file.Name, idx.Path, user.ID)
|
||||
}
|
||||
for i := range response.Folders {
|
||||
folder := &response.Folders[i]
|
||||
folder.IsShared = shareStore.IsShared(response.Path+folder.Name, idx.Path, user.ID)
|
||||
folder.IsShared = share.IsShared(response.Path+folder.Name, idx.Path, user.ID)
|
||||
}
|
||||
response.IsShared = shareStore.IsShared(response.Path, idx.Path, user.ID)
|
||||
response.IsShared = share.IsShared(response.Path, idx.Path, user.ID)
|
||||
}
|
||||
if info.Type == "directory" && opts.ShowPinnedItems {
|
||||
if opts.ShareHash != "" && shareStore != nil {
|
||||
if link, err := shareStore.GetByHash(opts.ShareHash); err == nil {
|
||||
if shareRelDir, err := link.ShareRelativeDir(response.Path); err == nil {
|
||||
response.PinnedItems = link.PinnedItems.NamesForDirectory(shareRelDir)
|
||||
}
|
||||
}
|
||||
} else if source, ok := users.ResolveSourceKey(response.Source); ok {
|
||||
response.PinnedItems = user.PinnedNamesForDirectory(source.Path, response.Path)
|
||||
}
|
||||
}
|
||||
|
||||
defer finalizeResponse(response, info, response.RealPath, user, userScope)
|
||||
if opts.SkipExtendedAttrs {
|
||||
if info.Type == "directory" && opts.HideFileExt != "" {
|
||||
|
||||
@@ -150,7 +150,7 @@ func VerifyTotpCode(user *users.User, code string, userStore *users.Storage) err
|
||||
if !found && user.TOTPSecret == "" {
|
||||
return fmt.Errorf("OTP token not found in cache, please generate a new one")
|
||||
}
|
||||
useCache := found
|
||||
useCache := found && user.TOTPSecret == ""
|
||||
totpSecret := user.TOTPSecret // The encrypted or plaintext secret
|
||||
totpNonce := user.TOTPNonce // The nonce if encrypted, or empty if plaintext
|
||||
if useCache {
|
||||
|
||||
@@ -857,7 +857,6 @@ func loadConfigWithDefaults(configFile string, generate bool) error {
|
||||
"integrations": true,
|
||||
"frontend": true,
|
||||
"userDefaults": true,
|
||||
"http": true,
|
||||
}
|
||||
|
||||
filteredConfig := make(map[string]interface{})
|
||||
|
||||
@@ -94,34 +94,6 @@ func TestConfigLoadEnvVars(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfigLoadHttpSection(t *testing.T) {
|
||||
testDir := t.TempDir()
|
||||
configContent := []byte(`
|
||||
server:
|
||||
sources:
|
||||
- path: "."
|
||||
http:
|
||||
trustedHeaders:
|
||||
- X-Forwarded-For
|
||||
disableRateLimit: true
|
||||
`)
|
||||
configFile := filepath.Join(testDir, "config.yaml")
|
||||
if err := os.WriteFile(configFile, configContent, 0644); err != nil {
|
||||
t.Fatalf("failed to write test config: %v", err)
|
||||
}
|
||||
|
||||
if err := loadConfigWithDefaults(configFile, true); err != nil {
|
||||
t.Fatalf("error loading config file: %v", err)
|
||||
}
|
||||
|
||||
if len(Config.Http.TrustedHeadersArray) != 1 || Config.Http.TrustedHeadersArray[0] != "X-Forwarded-For" {
|
||||
t.Fatalf("expected trusted headers to contain X-Forwarded-For, got %v", Config.Http.TrustedHeadersArray)
|
||||
}
|
||||
if !Config.Http.DisableRateLimit {
|
||||
t.Fatal("expected http.disableRateLimit to be true")
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfigLoadSpecificValues(t *testing.T) {
|
||||
// Create isolated test directory
|
||||
testDir := t.TempDir()
|
||||
|
||||
@@ -280,7 +280,7 @@ type ResolvedRulesConfig struct {
|
||||
}
|
||||
|
||||
type Frontend struct {
|
||||
Name string `json:"name"` // display name, PWA installation name is capped at 30 characters
|
||||
Name string `json:"name"` // display name
|
||||
DisableDefaultLinks bool `json:"disableDefaultLinks"` // disable default links in the sidebar
|
||||
DisableUsedPercentage bool `json:"disableUsedPercentage"` // disable used percentage for the sources in the sidebar
|
||||
ExternalLinks []ExternalLink `json:"externalLinks"`
|
||||
|
||||
@@ -57,8 +57,6 @@ type FileOptions struct {
|
||||
ExtractEmbeddedSubtitles bool // whether to extract embedded subtitles from media files
|
||||
AlbumArt bool // whether to get album art from media files
|
||||
ShowHidden bool // whether to show hidden files (true = show, false = hide)
|
||||
ShowPinnedItems bool // whether to show pinned items
|
||||
ShareHash string // when set, pinned items are loaded from this share link
|
||||
HideFileExt string // Hide files based on extensions (eg: '.lrc' or '.srt')
|
||||
FollowSymlinks bool // whether to follow symlinks
|
||||
Only string // whether to only get files or folders
|
||||
@@ -110,4 +108,4 @@ func HideFileByExt(filename, hideExt string) bool {
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package share
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/utils"
|
||||
)
|
||||
|
||||
// PinnedItems maps share-relative directory paths to pinned item names.
|
||||
type PinnedItems map[string][]string
|
||||
|
||||
// Add records a pinned item name under shareRelDir.
|
||||
func (p PinnedItems) Add(shareRelDir, name string) {
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
items := p[shareRelDir]
|
||||
if slices.Contains(items, name) {
|
||||
return
|
||||
}
|
||||
p[shareRelDir] = append(items, name)
|
||||
}
|
||||
|
||||
// Remove deletes a pinned item name and prunes empty map entries.
|
||||
func (p PinnedItems) Remove(shareRelDir, name string) {
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
items := p[shareRelDir]
|
||||
idx := slices.Index(items, name)
|
||||
if idx < 0 {
|
||||
return
|
||||
}
|
||||
items = append(items[:idx], items[idx+1:]...)
|
||||
if len(items) == 0 {
|
||||
delete(p, shareRelDir)
|
||||
} else {
|
||||
p[shareRelDir] = items
|
||||
}
|
||||
}
|
||||
|
||||
// NamesForDirectory returns pinned item names for a share-relative directory path.
|
||||
func (p PinnedItems) NamesForDirectory(shareRelDir string) []string {
|
||||
if len(p) == 0 {
|
||||
return nil
|
||||
}
|
||||
names := p[shareRelDir]
|
||||
if len(names) == 0 {
|
||||
return nil
|
||||
}
|
||||
out := make([]string, len(names))
|
||||
copy(out, names)
|
||||
return out
|
||||
}
|
||||
|
||||
// EnsurePinnedItems returns a non-nil map for mutation.
|
||||
func (l *Link) EnsurePinnedItems() PinnedItems {
|
||||
if l.PinnedItems == nil {
|
||||
l.PinnedItems = make(PinnedItems)
|
||||
}
|
||||
return l.PinnedItems
|
||||
}
|
||||
|
||||
// ShareRelativeDir maps a source index directory path to a share-relative directory path.
|
||||
// link.Path is the index path of the share root (e.g. "/share/").
|
||||
func (l *Link) ShareRelativeDir(indexDirPath string) (string, error) {
|
||||
shareRootIndex := utils.AddTrailingSlashIfNotExists(l.Path)
|
||||
indexDirPath = utils.AddTrailingSlashIfNotExists(indexDirPath)
|
||||
if !strings.HasPrefix(indexDirPath, shareRootIndex) {
|
||||
return "", fmt.Errorf("path is outside share scope")
|
||||
}
|
||||
|
||||
rel := strings.TrimPrefix(indexDirPath, shareRootIndex)
|
||||
if rel == "" {
|
||||
return "/", nil
|
||||
}
|
||||
return utils.AddTrailingSlashIfNotExists("/" + strings.TrimPrefix(rel, "/")), nil
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package share
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestSharePinnedItemsAddRemove(t *testing.T) {
|
||||
p := make(PinnedItems)
|
||||
const dir = "/"
|
||||
const name = "vacation.jpg"
|
||||
|
||||
p.Add(dir, name)
|
||||
if len(p[dir]) != 1 || p[dir][0] != name {
|
||||
t.Fatalf("add failed: %#v", p)
|
||||
}
|
||||
|
||||
p.Add(dir, name)
|
||||
if len(p[dir]) != 1 {
|
||||
t.Fatalf("duplicate add should be ignored: %#v", p)
|
||||
}
|
||||
|
||||
p.Remove(dir, name)
|
||||
if len(p) != 0 {
|
||||
t.Fatalf("remove should prune empty entries: %#v", p)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSharePinnedNamesForDirectory(t *testing.T) {
|
||||
p := PinnedItems{
|
||||
"/photos/": {"vacation.jpg", "notes.txt"},
|
||||
}
|
||||
|
||||
names := p.NamesForDirectory("/photos/")
|
||||
if len(names) != 2 || names[0] != "vacation.jpg" || names[1] != "notes.txt" {
|
||||
t.Fatalf("unexpected names: %#v", names)
|
||||
}
|
||||
if got := p.NamesForDirectory("/missing/"); got != nil {
|
||||
t.Fatalf("expected nil for missing directory, got %#v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShareRelativeDir(t *testing.T) {
|
||||
link := &Link{CommonShare: CommonShare{Path: "/share/"}}
|
||||
|
||||
got, err := link.ShareRelativeDir("/share/")
|
||||
if err != nil {
|
||||
t.Fatalf("ShareRelativeDir root: %v", err)
|
||||
}
|
||||
if got != "/" {
|
||||
t.Fatalf("got %q, want /", got)
|
||||
}
|
||||
|
||||
got, err = link.ShareRelativeDir("/share/test [file2]/")
|
||||
if err != nil {
|
||||
t.Fatalf("ShareRelativeDir subdir: %v", err)
|
||||
}
|
||||
if got != "/test [file2]/" {
|
||||
t.Fatalf("got %q, want /test [file2]/", got)
|
||||
}
|
||||
}
|
||||
@@ -60,12 +60,11 @@ type CreateBody struct {
|
||||
// Link is the information needed to build a shareable link.
|
||||
type Link struct {
|
||||
CommonShare
|
||||
Downloads int `json:"downloads"`
|
||||
Hash string `json:"hash" storm:"id,index"`
|
||||
UserID uint `json:"userID"`
|
||||
Expire int64 `json:"expire"`
|
||||
PasswordHash string `json:"password_hash,omitempty"`
|
||||
PinnedItems PinnedItems `json:"pinnedItems,omitempty"`
|
||||
Downloads int `json:"downloads"`
|
||||
Hash string `json:"hash" storm:"id,index"`
|
||||
UserID uint `json:"userID"`
|
||||
Expire int64 `json:"expire"`
|
||||
PasswordHash string `json:"password_hash,omitempty"`
|
||||
// Token is a random value that will only be set when PasswordHash is set. It is
|
||||
// URL-Safe and is used to download links in password-protected shares via a
|
||||
// query arg.
|
||||
|
||||
@@ -19,17 +19,13 @@ type SearchItem struct {
|
||||
}
|
||||
|
||||
// appendNameGlobSQL adds AND (name GLOB ? OR ...) or AND (name GLOB ? AND ...) when joinAnd is true.
|
||||
func appendNameGlobSQL(query string, args []interface{}, patterns []string, joinAnd, caseExact bool) (string, []interface{}) {
|
||||
func appendNameGlobSQL(query string, args []interface{}, patterns []string, joinAnd bool) (string, []interface{}) {
|
||||
if len(patterns) == 0 {
|
||||
return query, args
|
||||
}
|
||||
nameExpr := "name"
|
||||
if !caseExact {
|
||||
nameExpr = "lower(name)"
|
||||
}
|
||||
parts := make([]string, len(patterns))
|
||||
for i := range patterns {
|
||||
parts[i] = nameExpr + " GLOB ?"
|
||||
parts[i] = "name GLOB ?"
|
||||
args = append(args, patterns[i])
|
||||
}
|
||||
join := " OR "
|
||||
@@ -42,7 +38,7 @@ func appendNameGlobSQL(query string, args []interface{}, patterns []string, join
|
||||
// SearchItems queries the database for items matching the search criteria for a single source.
|
||||
// When nameGlobPatterns is non-empty (and largest is false), rows are restricted with SQLite name GLOB ... OR ....
|
||||
// Returns rows that can be iterated to scan search results.
|
||||
func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd, caseExact bool) (*sql.Rows, error) {
|
||||
func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd bool) (*sql.Rows, error) {
|
||||
query := `
|
||||
SELECT path, name, size, mod_time, type, is_dir, has_preview
|
||||
FROM index_items
|
||||
@@ -58,7 +54,7 @@ func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGl
|
||||
}
|
||||
|
||||
if !largest && len(nameGlobPatterns) > 0 {
|
||||
query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd, caseExact)
|
||||
query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd)
|
||||
}
|
||||
|
||||
if largest {
|
||||
@@ -71,7 +67,7 @@ func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGl
|
||||
// SearchItemsMultiSource queries the database for items matching the search criteria across multiple sources.
|
||||
// When nameGlobPatterns is non-empty (and largest is false), restricts rows with SQLite name GLOB ... OR ....
|
||||
// Returns rows that can be iterated to scan search results.
|
||||
func (db *IndexDB) SearchItemsMultiSource(sources []string, sourceScopes map[string]string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd, caseExact bool) (*sql.Rows, error) {
|
||||
func (db *IndexDB) SearchItemsMultiSource(sources []string, sourceScopes map[string]string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd bool) (*sql.Rows, error) {
|
||||
if len(sources) == 0 {
|
||||
return nil, fmt.Errorf("at least one source is required")
|
||||
}
|
||||
@@ -123,7 +119,7 @@ func (db *IndexDB) SearchItemsMultiSource(sources []string, sourceScopes map[str
|
||||
}
|
||||
|
||||
if !largest && len(nameGlobPatterns) > 0 {
|
||||
query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd, caseExact)
|
||||
query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd)
|
||||
}
|
||||
|
||||
if largest {
|
||||
|
||||
@@ -138,8 +138,17 @@ func (st usersBackend) Update(user *users.User, actorIsAdmin bool, fields ...str
|
||||
}
|
||||
user.SidebarLinks = adjustedLinks
|
||||
}
|
||||
if slices.Contains(fields, "PinnedItems") {
|
||||
adjustedPinnedItems, err := user.GetBackendPinnedItems()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
user.PinnedItems = adjustedPinnedItems
|
||||
}
|
||||
// Use reflection to access struct fields
|
||||
userFields := reflect.ValueOf(user).Elem() // Get struct value
|
||||
existingUserFields := reflect.ValueOf(existingUser).Elem()
|
||||
needsUserSave := false
|
||||
for _, field := range fields {
|
||||
// Get the corresponding field using reflection
|
||||
fieldValue := userFields.FieldByName(field)
|
||||
@@ -162,12 +171,27 @@ func (st usersBackend) Update(user *users.User, actorIsAdmin bool, fields ...str
|
||||
}
|
||||
// If otpEnabled is true, continue with normal field update
|
||||
}
|
||||
existingFieldValue := existingUserFields.FieldByName(field)
|
||||
if existingFieldValue.IsValid() && existingFieldValue.CanSet() {
|
||||
existingFieldValue.Set(reflect.ValueOf(val))
|
||||
}
|
||||
if field == "PinnedItems" {
|
||||
existingUser.PinnedItems = user.PinnedItems
|
||||
needsUserSave = true
|
||||
continue
|
||||
}
|
||||
// Update the database
|
||||
if err := st.db.UpdateField(existingUser, field, val); err != nil {
|
||||
return fmt.Errorf("failed to update user field: %s, error: %v", field, err)
|
||||
}
|
||||
}
|
||||
|
||||
if needsUserSave {
|
||||
if err := st.db.Save(existingUser); err != nil {
|
||||
return fmt.Errorf("failed to save user with pinned items: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,64 @@ func (u *User) GetBackendSidebarLinks() ([]SidebarLink, error) {
|
||||
return newLinks, nil
|
||||
}
|
||||
|
||||
// GetBackendPinnedItems converts pinned item source keys from frontend source names to backend source paths.
|
||||
func (u *User) GetBackendPinnedItems() (PinnedItems, error) {
|
||||
if len(u.PinnedItems) == 0 {
|
||||
return PinnedItems{}, nil
|
||||
}
|
||||
if sourceConfig == nil {
|
||||
return nil, fmt.Errorf("source config not initialized")
|
||||
}
|
||||
|
||||
newPinnedItems := PinnedItems{}
|
||||
for sourceKey, directories := range u.PinnedItems {
|
||||
source, ok := sourceConfig.GetSourceByPath(sourceKey)
|
||||
if !ok {
|
||||
source, ok = sourceConfig.GetSourceByName(sourceKey)
|
||||
}
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
if newPinnedItems[source.Path] == nil {
|
||||
newPinnedItems[source.Path] = map[string][]string{}
|
||||
}
|
||||
|
||||
for directoryPath, pinnedPaths := range directories {
|
||||
copiedPaths := append([]string(nil), pinnedPaths...)
|
||||
newPinnedItems[source.Path][directoryPath] = copiedPaths
|
||||
}
|
||||
}
|
||||
|
||||
return newPinnedItems, nil
|
||||
}
|
||||
|
||||
// GetFrontendPinnedItems converts pinned item source keys from backend source paths to frontend source names.
|
||||
func (u *User) GetFrontendPinnedItems() PinnedItems {
|
||||
if len(u.PinnedItems) == 0 || sourceConfig == nil {
|
||||
return PinnedItems{}
|
||||
}
|
||||
|
||||
newPinnedItems := PinnedItems{}
|
||||
for sourceKey, directories := range u.PinnedItems {
|
||||
source, ok := sourceConfig.GetSourceByPath(sourceKey)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
if newPinnedItems[source.Name] == nil {
|
||||
newPinnedItems[source.Name] = map[string][]string{}
|
||||
}
|
||||
|
||||
for directoryPath, pinnedPaths := range directories {
|
||||
copiedPaths := append([]string(nil), pinnedPaths...)
|
||||
newPinnedItems[source.Name][directoryPath] = copiedPaths
|
||||
}
|
||||
}
|
||||
|
||||
return newPinnedItems
|
||||
}
|
||||
|
||||
// normalizeScope ensures scope starts with / and doesn't end with / (except for root)
|
||||
func normalizeScope(scope string) string {
|
||||
if !strings.HasPrefix(scope, "/") {
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
package users
|
||||
|
||||
import "slices"
|
||||
|
||||
// Add records a pinned item name under sourcePath and indexDirPath.
|
||||
func (p PinnedItems) Add(sourcePath, indexDirPath, name string) {
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
if p[sourcePath] == nil {
|
||||
p[sourcePath] = make(map[string][]string)
|
||||
}
|
||||
items := p[sourcePath][indexDirPath]
|
||||
if slices.Contains(items, name) {
|
||||
return
|
||||
}
|
||||
p[sourcePath][indexDirPath] = append(items, name)
|
||||
}
|
||||
|
||||
// Remove deletes a pinned item name and prunes empty map entries.
|
||||
func (p PinnedItems) Remove(sourcePath, indexDirPath, name string) {
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
byDir, ok := p[sourcePath]
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
items := byDir[indexDirPath]
|
||||
idx := slices.Index(items, name)
|
||||
if idx < 0 {
|
||||
return
|
||||
}
|
||||
items = append(items[:idx], items[idx+1:]...)
|
||||
if len(items) == 0 {
|
||||
delete(byDir, indexDirPath)
|
||||
} else {
|
||||
byDir[indexDirPath] = items
|
||||
}
|
||||
if len(byDir) == 0 {
|
||||
delete(p, sourcePath)
|
||||
}
|
||||
}
|
||||
|
||||
// PinnedNamesForDirectory returns pinned item names for a source/index directory path.
|
||||
func (u *User) PinnedNamesForDirectory(sourcePath, indexDirPath string) []string {
|
||||
if u == nil || len(u.PinnedItems) == 0 {
|
||||
return nil
|
||||
}
|
||||
byDir, ok := u.PinnedItems[sourcePath]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
names := byDir[indexDirPath]
|
||||
if len(names) == 0 {
|
||||
return nil
|
||||
}
|
||||
out := make([]string, len(names))
|
||||
copy(out, names)
|
||||
return out
|
||||
}
|
||||
|
||||
// EnsurePinnedItems returns a non-nil map for mutation.
|
||||
func (u *User) EnsurePinnedItems() PinnedItems {
|
||||
if u.PinnedItems == nil {
|
||||
u.PinnedItems = make(PinnedItems)
|
||||
}
|
||||
return u.PinnedItems
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package users
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestPinnedItemsAddRemove(t *testing.T) {
|
||||
p := make(PinnedItems)
|
||||
const source = "/data/files"
|
||||
const dir = "/photos/"
|
||||
const name = "vacation.jpg"
|
||||
|
||||
p.Add(source, dir, name)
|
||||
if len(p[source][dir]) != 1 || p[source][dir][0] != name {
|
||||
t.Fatalf("add failed: %#v", p)
|
||||
}
|
||||
|
||||
p.Add(source, dir, name)
|
||||
if len(p[source][dir]) != 1 {
|
||||
t.Fatalf("duplicate add should be ignored: %#v", p)
|
||||
}
|
||||
|
||||
p.Remove(source, dir, name)
|
||||
if len(p) != 0 {
|
||||
t.Fatalf("remove should prune empty maps: %#v", p)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPinnedNamesForDirectory(t *testing.T) {
|
||||
u := &User{
|
||||
NonAdminEditable: NonAdminEditable{
|
||||
PinnedItems: PinnedItems{
|
||||
"/data/files": {
|
||||
"/photos/": {"vacation.jpg", "notes.txt"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
names := u.PinnedNamesForDirectory("/data/files", "/photos/")
|
||||
if len(names) != 2 || names[0] != "vacation.jpg" || names[1] != "notes.txt" {
|
||||
t.Fatalf("unexpected names: %#v", names)
|
||||
}
|
||||
if got := u.PinnedNamesForDirectory("/missing", "/photos/"); got != nil {
|
||||
t.Fatalf("expected nil for missing source, got %#v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPinnedItemsRemoveMissing(t *testing.T) {
|
||||
p := make(PinnedItems)
|
||||
p.Remove("/data/files", "/photos/", "vacation.jpg")
|
||||
if len(p) != 0 {
|
||||
t.Fatalf("remove on empty map should be no-op: %#v", p)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPinnedItemsMultipleItems(t *testing.T) {
|
||||
p := make(PinnedItems)
|
||||
const source = "/data/files"
|
||||
const dir = "/photos/"
|
||||
|
||||
p.Add(source, dir, "a.jpg")
|
||||
p.Add(source, dir, "b.jpg")
|
||||
p.Add(source, dir, "c.jpg")
|
||||
|
||||
if len(p[source][dir]) != 3 {
|
||||
t.Fatalf("expected 3 items, got %d", len(p[source][dir]))
|
||||
}
|
||||
|
||||
p.Remove(source, dir, "b.jpg")
|
||||
items := p[source][dir]
|
||||
if len(items) != 2 || items[0] != "a.jpg" || items[1] != "c.jpg" {
|
||||
t.Fatalf("unexpected items after remove: %#v", items)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPinnedItemsMultipleDirectories(t *testing.T) {
|
||||
p := make(PinnedItems)
|
||||
const source = "/data/files"
|
||||
const photosDir = "/photos/"
|
||||
const docsDir = "/docs/"
|
||||
|
||||
p.Add(source, photosDir, "a.jpg")
|
||||
p.Add(source, docsDir, "notes.txt")
|
||||
|
||||
if len(p[source][photosDir]) != 1 || p[source][photosDir][0] != "a.jpg" {
|
||||
t.Fatalf("unexpected photos dir: %#v", p[source][photosDir])
|
||||
}
|
||||
if len(p[source][docsDir]) != 1 || p[source][docsDir][0] != "notes.txt" {
|
||||
t.Fatalf("unexpected docs dir: %#v", p[source][docsDir])
|
||||
}
|
||||
|
||||
p.Remove(source, photosDir, "a.jpg")
|
||||
if _, ok := p[source][photosDir]; ok {
|
||||
t.Fatalf("photos dir should be pruned: %#v", p)
|
||||
}
|
||||
if len(p[source][docsDir]) != 1 {
|
||||
t.Fatalf("docs dir should remain: %#v", p[source][docsDir])
|
||||
}
|
||||
}
|
||||
@@ -96,27 +96,26 @@ type Preview struct {
|
||||
Models bool `json:"models"` // show live thumbnails for 3D models files
|
||||
}
|
||||
|
||||
// source filesystem path -> index directory path -> pinned item names (unique within the directory)
|
||||
type PinnedItems map[string]map[string][]string
|
||||
|
||||
// User describes a persisted account. Scopes and source sidebar links store filesystem paths in Name/SourceName;
|
||||
// JSON responses use display names only (see http prepForFrontend).
|
||||
type User struct {
|
||||
NonAdminEditable
|
||||
DisableSettings bool `json:"disableSettings"`
|
||||
ID uint `storm:"id,increment" json:"id"`
|
||||
Username string `storm:"unique" json:"username"`
|
||||
Scopes []SourceScope `json:"scopes"`
|
||||
Scope string `json:"scope,omitempty"`
|
||||
LockPassword bool `json:"lockPassword"`
|
||||
Permissions Permissions `json:"permissions"`
|
||||
ApiKeys map[string]AuthToken `json:"apiKeys,omitempty"` // deprecated: use Tokens instead
|
||||
Tokens map[string]AuthToken `json:"tokens,omitempty"`
|
||||
TOTPSecret string `json:"totpSecret,omitempty"`
|
||||
TOTPNonce string `json:"totpNonce,omitempty"`
|
||||
LoginMethod LoginMethod `json:"loginMethod"`
|
||||
OtpEnabled bool `json:"otpEnabled"` // true if TOTP is enabled, false otherwise
|
||||
Version int `json:"version"`
|
||||
DisableSettings bool `json:"disableSettings"`
|
||||
ID uint `storm:"id,increment" json:"id"`
|
||||
Username string `storm:"unique" json:"username"`
|
||||
Scopes []SourceScope `json:"scopes"`
|
||||
Scope string `json:"scope,omitempty"`
|
||||
LockPassword bool `json:"lockPassword"`
|
||||
Permissions Permissions `json:"permissions"`
|
||||
ApiKeys map[string]AuthToken `json:"apiKeys,omitempty"` // deprecated: use Tokens instead
|
||||
Tokens map[string]AuthToken `json:"tokens,omitempty"`
|
||||
TOTPSecret string `json:"totpSecret,omitempty"`
|
||||
TOTPNonce string `json:"totpNonce,omitempty"`
|
||||
LoginMethod LoginMethod `json:"loginMethod"`
|
||||
OtpEnabled bool `json:"otpEnabled"` // true if TOTP is enabled, false otherwise
|
||||
Version int `json:"version"`
|
||||
// legacy for migration purposes... og filebrowser has perm attribute
|
||||
Perm Permissions `json:"perm,omitzero"` // deprecated: use Permissions instead
|
||||
}
|
||||
@@ -128,44 +127,44 @@ type SourceScope struct {
|
||||
|
||||
// json tags must match variable name with smaller case first letter
|
||||
type NonAdminEditable struct {
|
||||
EditorQuickSave bool `json:"editorQuickSave"` // show quick save button in editor
|
||||
HideSidebarFileActions bool `json:"hideSidebarFileActions"` // hide the file actions in the sidebar
|
||||
DisableQuickToggles bool `json:"disableQuickToggles"` // disable the quick toggles in the sidebar
|
||||
DisableSearchOptions bool `json:"disableSearchOptions"` // disable the search options in the search bar
|
||||
DeleteWithoutConfirming bool `json:"deleteWithoutConfirming"` // delete files without confirmation
|
||||
Preview Preview `json:"preview"`
|
||||
StickySidebar bool `json:"stickySidebar"` // keep sidebar open when navigating
|
||||
DarkMode bool `json:"darkMode"` // should dark mode be enabled
|
||||
Password string `json:"password,omitempty"`
|
||||
Locale string `json:"locale"` // language to use: eg. de, en, or fr
|
||||
ViewMode string `json:"viewMode"` // view mode to use: eg. normal, list, grid, or compact
|
||||
SingleClick bool `json:"singleClick"` // open directory on single click, also enables middle click to open in new tab
|
||||
Sorting Sorting `json:"sorting"`
|
||||
ShowHidden bool `json:"showHidden"` // show hidden files in the UI. On windows this includes files starting with a dot and windows hidden files
|
||||
HideFileExt string `json:"hideFileExt"` // space separated list of file extensions to hide in UI and API
|
||||
DateFormat bool `json:"dateFormat"` // when false, the date is relative, when true, the date is an exact timestamp
|
||||
GallerySize int `json:"gallerySize"` // 0-9 - the size of the gallery thumbnails
|
||||
ThemeColor string `json:"themeColor"` // theme color to use: eg. #ff0000, or var(--red), var(--purple), etc
|
||||
QuickDownload bool `json:"quickDownload"` // show icon to download in one click
|
||||
DisableUpdateNotifications bool `json:"disableUpdateNotifications"` // disable update notifications
|
||||
FileLoading FileLoading `json:"fileLoading"` // upload and download settings
|
||||
DisableOfficePreviewExt string `json:"disableOfficePreviewExt"` // deprecated
|
||||
DisableOnlyOfficeExt string `json:"disableOnlyOfficeExt"` // deprecated
|
||||
DisablePreviewExt string `json:"disablePreviewExt"` // space separated list of file extensions to disable preview for
|
||||
DisableViewingExt string `json:"disableViewingExt"` // space separated list of file extensions to disable viewing for
|
||||
CustomTheme string `json:"customTheme"` // Name of theme to use chosen from custom themes config.
|
||||
ShowSelectMultiple bool `json:"showSelectMultiple"` // show select multiple files on desktop
|
||||
ShowCopyPath bool `json:"showCopyPath"` // show copy path action in the context menu
|
||||
ShowToolsInSidebar bool `json:"showToolsInSidebar"` // when false, sidebar hides links with category "tool" (default: true)
|
||||
DebugOffice bool `json:"debugOffice"` // debug onlyoffice editor
|
||||
OtpEnabled bool `json:"otpEnabled"` // allow non-admin users to disable their own OTP
|
||||
SidebarLinks []SidebarLink `json:"sidebarLinks"` // customizable sidebar links
|
||||
HideFilesInTree bool `json:"hideFilesInTree"` // hide files in the sidebar tree navigation, when true, will show only directories.
|
||||
DeleteAfterArchive bool `json:"deleteAfterArchive"` // delete source files after successful creation/extraction of archives
|
||||
PreferEditorForMarkdown bool `json:"preferEditorForMarkdown"` // prefer editor first for markdown files instead of the Markdown Viewer
|
||||
ShowFirstLogin bool `json:"showFirstLogin"`
|
||||
PasskeyCredentials []WebAuthnCredential `json:"passkeyCredentials,omitempty"`
|
||||
PinnedItems PinnedItems `json:"pinnedItems,omitempty"`
|
||||
EditorQuickSave bool `json:"editorQuickSave"` // show quick save button in editor
|
||||
HideSidebarFileActions bool `json:"hideSidebarFileActions"` // hide the file actions in the sidebar
|
||||
DisableQuickToggles bool `json:"disableQuickToggles"` // disable the quick toggles in the sidebar
|
||||
DisableSearchOptions bool `json:"disableSearchOptions"` // disable the search options in the search bar
|
||||
DeleteWithoutConfirming bool `json:"deleteWithoutConfirming"` // delete files without confirmation
|
||||
Preview Preview `json:"preview"`
|
||||
StickySidebar bool `json:"stickySidebar"` // keep sidebar open when navigating
|
||||
DarkMode bool `json:"darkMode"` // should dark mode be enabled
|
||||
Password string `json:"password,omitempty"`
|
||||
Locale string `json:"locale"` // language to use: eg. de, en, or fr
|
||||
ViewMode string `json:"viewMode"` // view mode to use: eg. normal, list, grid, or compact
|
||||
SingleClick bool `json:"singleClick"` // open directory on single click, also enables middle click to open in new tab
|
||||
Sorting Sorting `json:"sorting"`
|
||||
ShowHidden bool `json:"showHidden"` // show hidden files in the UI. On windows this includes files starting with a dot and windows hidden files
|
||||
HideFileExt string `json:"hideFileExt"` // space separated list of file extensions to hide in UI and API
|
||||
DateFormat bool `json:"dateFormat"` // when false, the date is relative, when true, the date is an exact timestamp
|
||||
GallerySize int `json:"gallerySize"` // 0-9 - the size of the gallery thumbnails
|
||||
ThemeColor string `json:"themeColor"` // theme color to use: eg. #ff0000, or var(--red), var(--purple), etc
|
||||
QuickDownload bool `json:"quickDownload"` // show icon to download in one click
|
||||
DisableUpdateNotifications bool `json:"disableUpdateNotifications"` // disable update notifications
|
||||
FileLoading FileLoading `json:"fileLoading"` // upload and download settings
|
||||
DisableOfficePreviewExt string `json:"disableOfficePreviewExt"` // deprecated
|
||||
DisableOnlyOfficeExt string `json:"disableOnlyOfficeExt"` // deprecated
|
||||
DisablePreviewExt string `json:"disablePreviewExt"` // space separated list of file extensions to disable preview for
|
||||
DisableViewingExt string `json:"disableViewingExt"` // space separated list of file extensions to disable viewing for
|
||||
CustomTheme string `json:"customTheme"` // Name of theme to use chosen from custom themes config.
|
||||
PinnedItems PinnedItems `json:"pinnedItems,omitempty"` // pinned items organized by source and directory path
|
||||
ShowSelectMultiple bool `json:"showSelectMultiple"` // show select multiple files on desktop
|
||||
ShowCopyPath bool `json:"showCopyPath"` // show copy path action in the context menu
|
||||
ShowToolsInSidebar bool `json:"showToolsInSidebar"` // when false, sidebar hides links with category "tool" (default: true)
|
||||
DebugOffice bool `json:"debugOffice"` // debug onlyoffice editor
|
||||
OtpEnabled bool `json:"otpEnabled"` // allow non-admin users to disable their own OTP
|
||||
SidebarLinks []SidebarLink `json:"sidebarLinks"` // customizable sidebar links
|
||||
HideFilesInTree bool `json:"hideFilesInTree"` // hide files in the sidebar tree navigation, when true, will show only directories.
|
||||
DeleteAfterArchive bool `json:"deleteAfterArchive"` // delete source files after successful creation/extraction of archives
|
||||
PreferEditorForMarkdown bool `json:"preferEditorForMarkdown"` // prefer editor first for markdown files instead of the Markdown Viewer
|
||||
ShowFirstLogin bool `json:"showFirstLogin"`
|
||||
PasskeyCredentials []WebAuthnCredential `json:"passkeyCredentials,omitempty"`
|
||||
}
|
||||
|
||||
type FileLoading struct {
|
||||
|
||||
+34
-33
@@ -4,12 +4,12 @@ go 1.25.0
|
||||
|
||||
require (
|
||||
github.com/asdine/storm/v3 v3.2.1
|
||||
github.com/coreos/go-oidc/v3 v3.20.0
|
||||
github.com/coreos/go-oidc/v3 v3.18.0
|
||||
github.com/coreos/go-systemd/v22 v22.7.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
github.com/dsoprea/go-exif/v3 v3.0.1
|
||||
github.com/gen2brain/go-fitz v1.28.2
|
||||
github.com/go-ldap/ldap/v3 v3.4.14
|
||||
github.com/gen2brain/go-fitz v1.24.15
|
||||
github.com/go-ldap/ldap/v3 v3.4.13
|
||||
github.com/go-playground/validator/v10 v10.30.3
|
||||
github.com/go-webauthn/webauthn v0.17.4
|
||||
github.com/goccy/go-yaml v1.19.2
|
||||
@@ -17,23 +17,23 @@ require (
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/gtsteffaniak/go-cache v1.1.0
|
||||
github.com/gtsteffaniak/go-logger v1.1.0
|
||||
github.com/kovidgoyal/imaging v1.8.23
|
||||
github.com/mattn/go-sqlite3 v1.14.49
|
||||
github.com/kovidgoyal/imaging v1.8.21
|
||||
github.com/mattn/go-sqlite3 v1.14.45
|
||||
github.com/pquerna/otp v1.5.0
|
||||
github.com/spf13/afero v1.15.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/swaggo/http-swagger v1.3.4
|
||||
github.com/swaggo/swag v1.16.6
|
||||
golang.org/x/crypto v0.54.0
|
||||
golang.org/x/image v0.44.0
|
||||
golang.org/x/mod v0.38.0
|
||||
golang.org/x/net v0.57.0
|
||||
golang.org/x/crypto v0.52.0
|
||||
golang.org/x/image v0.41.0
|
||||
golang.org/x/mod v0.36.0
|
||||
golang.org/x/net v0.55.0
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
golang.org/x/sys v0.47.0
|
||||
golang.org/x/sys v0.45.0
|
||||
golang.org/x/time v0.15.0
|
||||
golang.org/x/tools v0.48.0
|
||||
golang.org/x/tools v0.45.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
modernc.org/sqlite v1.55.0
|
||||
modernc.org/sqlite v1.51.0
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -106,7 +106,7 @@ require (
|
||||
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/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/ebitengine/purego v0.10.2 // indirect
|
||||
github.com/ebitengine/purego v0.10.1 // indirect
|
||||
github.com/ettle/strcase v0.2.0 // indirect
|
||||
github.com/fatih/color v1.19.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
@@ -114,22 +114,22 @@ require (
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.9.2 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.15 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
|
||||
github.com/ghostiam/protogetter v0.3.20 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
|
||||
github.com/go-critic/go-critic v0.14.3 // indirect
|
||||
github.com/go-errors/errors v1.5.1 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
|
||||
github.com/go-openapi/jsonpointer v1.0.0 // indirect
|
||||
github.com/go-openapi/jsonreference v1.0.0 // indirect
|
||||
github.com/go-openapi/spec v0.22.9 // indirect
|
||||
github.com/go-openapi/swag/conv v0.28.0 // indirect
|
||||
github.com/go-openapi/swag/jsonutils v0.28.0 // indirect
|
||||
github.com/go-openapi/swag/loading v0.28.0 // indirect
|
||||
github.com/go-openapi/swag/pools v0.28.0 // indirect
|
||||
github.com/go-openapi/swag/stringutils v0.28.0 // indirect
|
||||
github.com/go-openapi/swag/typeutils v0.28.0 // indirect
|
||||
github.com/go-openapi/swag/yamlutils v0.28.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.23.1 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.6 // indirect
|
||||
github.com/go-openapi/spec v0.22.5 // indirect
|
||||
github.com/go-openapi/swag/conv v0.26.0 // indirect
|
||||
github.com/go-openapi/swag/jsonname v0.26.0 // indirect
|
||||
github.com/go-openapi/swag/jsonutils v0.26.0 // indirect
|
||||
github.com/go-openapi/swag/loading v0.26.0 // indirect
|
||||
github.com/go-openapi/swag/stringutils v0.26.0 // indirect
|
||||
github.com/go-openapi/swag/typeutils v0.26.0 // indirect
|
||||
github.com/go-openapi/swag/yamlutils v0.26.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-toolsmith/astcast v1.1.0 // indirect
|
||||
@@ -147,7 +147,7 @@ require (
|
||||
github.com/gofrs/flock v0.13.0 // indirect
|
||||
github.com/gohugoio/hugo v0.149.1 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
|
||||
github.com/golang/geo v0.0.0-20260713102120-857a528af641 // indirect
|
||||
github.com/golang/geo v0.0.0-20260605061815-58f45aa500f1 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golangci/asciicheck v0.5.0 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 // indirect
|
||||
@@ -178,6 +178,7 @@ require (
|
||||
github.com/jjti/go-spancheck v0.6.5 // indirect
|
||||
github.com/joho/godotenv v1.5.1 // indirect
|
||||
github.com/julz/importas v0.2.0 // indirect
|
||||
github.com/jupiterrider/ffi v0.7.0 // indirect
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect
|
||||
github.com/kisielk/errcheck v1.10.0 // indirect
|
||||
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
|
||||
@@ -192,7 +193,7 @@ require (
|
||||
github.com/ldez/structtags v0.6.1 // indirect
|
||||
github.com/ldez/tagliatelle v0.7.2 // indirect
|
||||
github.com/ldez/usetesting v0.5.0 // indirect
|
||||
github.com/leodido/go-urn v1.5.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/leonklingele/grouper v1.1.2 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
|
||||
github.com/macabu/inamedparam v0.2.0 // indirect
|
||||
@@ -204,7 +205,7 @@ require (
|
||||
github.com/maratori/testpackage v1.1.2 // indirect
|
||||
github.com/matoous/godox v1.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.24 // indirect
|
||||
github.com/mattn/go-isatty v0.0.22 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.23 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mgechev/revive v1.15.0 // indirect
|
||||
@@ -281,19 +282,19 @@ require (
|
||||
go-simpler.org/sloglint v0.12.0 // indirect
|
||||
go.augendre.info/arangolint v0.4.0 // indirect
|
||||
go.augendre.info/fatcontext v0.9.0 // indirect
|
||||
go.etcd.io/bbolt v1.5.0 // indirect
|
||||
go.etcd.io/bbolt v1.4.3 // indirect
|
||||
go.uber.org/multierr v1.10.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect
|
||||
golang.org/x/sync v0.22.0 // indirect
|
||||
golang.org/x/text v0.40.0 // indirect
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/text v0.37.0 // indirect
|
||||
google.golang.org/protobuf v1.36.10 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
honnef.co/go/tools v0.7.0 // indirect
|
||||
modernc.org/libc v1.74.4 // indirect
|
||||
modernc.org/libc v1.72.5 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.11.0 // indirect
|
||||
mvdan.cc/gofumpt v0.9.2 // indirect
|
||||
|
||||
+79
-78
@@ -211,8 +211,8 @@ github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/go-oidc/v3 v3.20.0 h1:EtE0WIBHk03N+DqGkY4+UONzzZHk7amKt6IyNd7OsZE=
|
||||
github.com/coreos/go-oidc/v3 v3.20.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-oidc/v3 v3.18.0 h1:V9orjXynvu5wiC9SemFTWnG4F45v403aIcjWo0d41+A=
|
||||
github.com/coreos/go-oidc/v3 v3.18.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
|
||||
github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
@@ -256,8 +256,8 @@ github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349 h1:DilThiXje
|
||||
github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349/go.mod h1:4GC5sXji84i/p+irqghpPFZBF8tRN/Q7+700G0/DLe8=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/ebitengine/purego v0.10.2 h1:W809HbnvzAxgdm+aOvlSekrM16wGCdT/e76+9tS7gzE=
|
||||
github.com/ebitengine/purego v0.10.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
github.com/ebitengine/purego v0.10.1 h1:dewVBCBT2GaMu1SrNTYxQhgQBethzfhiwvZiLGP/qyY=
|
||||
github.com/ebitengine/purego v0.10.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/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/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
@@ -281,18 +281,18 @@ github.com/fxamacker/cbor/v2 v2.9.2 h1:X4Ksno9+x3cz0TZv69ec1hxP/+tymuR8PXQJyDwfh
|
||||
github.com/fxamacker/cbor/v2 v2.9.2/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
|
||||
github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
|
||||
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
|
||||
github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI=
|
||||
github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ=
|
||||
github.com/gen2brain/go-fitz v1.28.2 h1:845G85N5TUgnq5oDqyYrW0JvehAkeo35UkkK2dJtW1M=
|
||||
github.com/gen2brain/go-fitz v1.28.2/go.mod h1:pY2hqAjp9Zy7qfPI2gwbJMHBFAdZpVXOLrRxD82l3Bs=
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
|
||||
github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||
github.com/gen2brain/go-fitz v1.24.15 h1:sJNB1MOWkqnzzENPHggFpgxTwW0+S5WF/rM5wUBpJWo=
|
||||
github.com/gen2brain/go-fitz v1.24.15/go.mod h1:SftkiVbTHqF141DuiLwBBM65zP7ig6AVDQpf2WlHamo=
|
||||
github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ=
|
||||
github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/ghostiam/protogetter v0.3.20 h1:oW7OPFit2FxZOpmMRPP9FffU4uUpfeE/rEdE1f+MzD0=
|
||||
github.com/ghostiam/protogetter v0.3.20/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8 h1:H9AZkK22UOmfX8J84ubyaZxKJZ3FMHVwn8swoMML7iQ=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-critic/go-critic v0.14.3 h1:5R1qH2iFeo4I/RJU8vTezdqs08Egi4u5p6vOESA0pog=
|
||||
github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
@@ -309,40 +309,40 @@ github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
github.com/go-ldap/ldap/v3 v3.4.14 h1:D6PYdEgsaVzsXyr6w/yDC06Ria4uUhWm+Rb+er8lfAs=
|
||||
github.com/go-ldap/ldap/v3 v3.4.14/go.mod h1:S4eJUMUNjDkE0ZJtIZdybwyb03sGGLW6gxXT1Hs8VKA=
|
||||
github.com/go-ldap/ldap/v3 v3.4.13 h1:+x1nG9h+MZN7h/lUi5Q3UZ0fJ1GyDQYbPvbuH38baDQ=
|
||||
github.com/go-ldap/ldap/v3 v3.4.13/go.mod h1:LxsGZV6vbaK0sIvYfsv47rfh4ca0JXokCoKjZxsszv0=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-openapi/jsonpointer v1.0.0 h1:kR9tHqY0CtZaOPVFm622dPVNhrvYpwr4uCxgL3h1H8s=
|
||||
github.com/go-openapi/jsonpointer v1.0.0/go.mod h1:Z3rw7dWu1p9IgitXCFamSlA5lmDiklEB6vkaxcNZW5Y=
|
||||
github.com/go-openapi/jsonreference v1.0.0 h1:jlmTr6torcd1YgDQvSfNmRtKzYDO4FGBkrAdlAVWnpY=
|
||||
github.com/go-openapi/jsonreference v1.0.0/go.mod h1:jtwdyGbJk0Xhe5Y+rwtglQP6Sb1WZST4rT32LWB+sv0=
|
||||
github.com/go-openapi/spec v0.22.9 h1:/vKIFDcGKp0ktZWGbym/tJEWbk6/XOEmAVU0kqKMH+w=
|
||||
github.com/go-openapi/spec v0.22.9/go.mod h1:b/mNUYIOQOyIiUzUzXEE8xzyZqf93KvM9hQGP91yfl0=
|
||||
github.com/go-openapi/jsonpointer v0.23.1 h1:1HBACs7XIwR2RcmItfdSFlALhGbe6S92p0ry4d1GWg4=
|
||||
github.com/go-openapi/jsonpointer v0.23.1/go.mod h1:iWRmZTrGn7XwYhtPt/fvdSFj1OfNBngqRT2UG3BxSqY=
|
||||
github.com/go-openapi/jsonreference v0.21.6 h1:NZ5nGfnaM1n4I43Xjm1e5/M2GjOwQwndQz22uhxwD+Y=
|
||||
github.com/go-openapi/jsonreference v0.21.6/go.mod h1:xzbgtQ3ZbWxvET3AxdzCJlJt6vkovbf+IfSPJjD0tUY=
|
||||
github.com/go-openapi/spec v0.22.5 h1:KhO7RBlKQfonUWX2WzQCoLIXVA6AcNqDGZ3a1Dutdlo=
|
||||
github.com/go-openapi/spec v0.22.5/go.mod h1:vxpOtMya5TXtENXKE5bKqv5NjocVhyhxHrlZfvKnZ74=
|
||||
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
|
||||
github.com/go-openapi/swag/conv v0.28.0 h1:GtqqbyFe7vR5Y7ehxG9W6/OvrSFdf1OLeTGp40TqxH8=
|
||||
github.com/go-openapi/swag/conv v0.28.0/go.mod h1:mbUE+mzctnhxi864m0Q07SpN8OowD9JhxmxuYvZZD/k=
|
||||
github.com/go-openapi/swag/jsonutils v0.28.0 h1:YIch6FwO7RXzeAnbO8Tu7dWBZeUEH+4nA0HXltVTnv4=
|
||||
github.com/go-openapi/swag/jsonutils v0.28.0/go.mod h1:CYM3WlTUcagR2ZoHdz54di/cbBqt82tuxuXgAjxw+mg=
|
||||
github.com/go-openapi/swag/jsonutils/fixtures_test v0.28.0 h1:qV+VVUAx5Oro8WjVWpZeql7YReTKhT4smR4zhcOQZr0=
|
||||
github.com/go-openapi/swag/jsonutils/fixtures_test v0.28.0/go.mod h1:mofwUWx70wvskwESqRJ//k/9kURmCgyJl5m5Ppoh5kY=
|
||||
github.com/go-openapi/swag/loading v0.28.0 h1:td8QZdZC9MIYGGSnSPKShKiK22I2tU5UQvuUhIBPRLU=
|
||||
github.com/go-openapi/swag/loading v0.28.0/go.mod h1:rXB0QiQX5mMveXEA7ouM4KiiM9jVJe4K6BVbwhD1M4k=
|
||||
github.com/go-openapi/swag/pools v0.28.0 h1:HPMZWSAfce3rdVTFcjFiCIBtDg9h4x2QlRrHipwhxeU=
|
||||
github.com/go-openapi/swag/pools v0.28.0/go.mod h1:kVQefhSK5RWuRe7BXsL8htgBPAMpN7HDGpGEknqugeE=
|
||||
github.com/go-openapi/swag/stringutils v0.28.0 h1:ixsc9iYgDPubHL/8nSkbnryEHpD2VRlBMLKpQyPXcDU=
|
||||
github.com/go-openapi/swag/stringutils v0.28.0/go.mod h1:lzRN95CxXmA03XcDWHLOb6nOMcxCqR5rGY0lOgsfRoM=
|
||||
github.com/go-openapi/swag/typeutils v0.28.0 h1:nRBKSBXjDgf01VDPB3fWeD9nQuhCOVeIYAkUx2tbkyY=
|
||||
github.com/go-openapi/swag/typeutils v0.28.0/go.mod h1:Srm0xFNRZ1Y+vCxJclo5qzx8aj+1pAKda/YfFPrG0dQ=
|
||||
github.com/go-openapi/swag/yamlutils v0.28.0 h1:TV3JXH6DS46KUroDtMLAYHGkdWf5VDq3wVWFirmzROY=
|
||||
github.com/go-openapi/swag/yamlutils v0.28.0/go.mod h1:x0q/yndZHEgk9Rx3DyDqzFUmHy55KTvIZldvF2dTJXs=
|
||||
github.com/go-openapi/testify/enable/yaml/v2 v2.6.0 h1:gGHwAJ0R/5jU8BEGDbfRNR3hL68dAVi84WuOApp29B0=
|
||||
github.com/go-openapi/testify/enable/yaml/v2 v2.6.0/go.mod h1:tY+St1SGq4NFl0QIqdTY4aEdbChAHxhyB77XQi9iJCo=
|
||||
github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug=
|
||||
github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw=
|
||||
github.com/go-openapi/swag/conv v0.26.0 h1:5yGGsPYI1ZCva93U0AoKi/iZrNhaJEjr324YVsiD89I=
|
||||
github.com/go-openapi/swag/conv v0.26.0/go.mod h1:tpAmIL7X58VPnHHiSO4uE3jBeRamGsFsfdDeDtb5ECE=
|
||||
github.com/go-openapi/swag/jsonname v0.26.0 h1:gV1NFX9M8avo0YSpmWogqfQISigCmpaiNci8cGECU5w=
|
||||
github.com/go-openapi/swag/jsonname v0.26.0/go.mod h1:urBBR8bZNoDYGr653ynhIx+gTeIz0ARZxHkAPktJK2M=
|
||||
github.com/go-openapi/swag/jsonutils v0.26.0 h1:FawFML2iAXsPqmERscuMPIHmFsoP1tOqWkxBaKNMsnA=
|
||||
github.com/go-openapi/swag/jsonutils v0.26.0/go.mod h1:2VmA0CJlyFqgawOaPI9psnjFDqzyivIqLYN34t9p91E=
|
||||
github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.0 h1:apqeINu/ICHouqiRZbyFvuDge5jCmmLTqGQ9V95EaOM=
|
||||
github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.0/go.mod h1:AyM6QT8uz5IdKxk5akv0y6u4QvcL9GWERt0Jx/F/R8Y=
|
||||
github.com/go-openapi/swag/loading v0.26.0 h1:Apg6zaKhCJurpJer0DCxq99qwmhFddBhaMX7kilDcko=
|
||||
github.com/go-openapi/swag/loading v0.26.0/go.mod h1:dBxQ/6V2uBaAQdevN18VELE6xSpJWZxLX4txe12JwDg=
|
||||
github.com/go-openapi/swag/stringutils v0.26.0 h1:qZQngLxs5s7SLijc3N2ZO+fUq2o8LjuWAASSrJuh+xg=
|
||||
github.com/go-openapi/swag/stringutils v0.26.0/go.mod h1:sWn5uY+QIIspwPhvgnqJsH8xqFT2ZbYcvbcFanRyhFE=
|
||||
github.com/go-openapi/swag/typeutils v0.26.0 h1:2kdEwdiNWy+JJdOvu5MA2IIg2SylWAFuuyQIKYybfq4=
|
||||
github.com/go-openapi/swag/typeutils v0.26.0/go.mod h1:oovDuIUvTrEHVMqWilQzKzV4YlSKgyZmFh7AlfABNVE=
|
||||
github.com/go-openapi/swag/yamlutils v0.26.0 h1:H7O8l/8NJJQ/oiReEN+oMpnGMyt8G0hl460nRZxhLMQ=
|
||||
github.com/go-openapi/swag/yamlutils v0.26.0/go.mod h1:1evKEGAtP37Pkwcc7EWMF0hedX0/x3Rkvei2wtG/TbU=
|
||||
github.com/go-openapi/testify/enable/yaml/v2 v2.5.1 h1:q9NtHwK4qHF7yZziBPvZyv7zWAIk8ok88Gh2mR6Jpc8=
|
||||
github.com/go-openapi/testify/enable/yaml/v2 v2.5.1/go.mod h1:JW0MXIotCYps/XsgJnG3a8Q7rE5xAiBwoOD5OfaIQBk=
|
||||
github.com/go-openapi/testify/v2 v2.5.1 h1:TMdhCaw8fUNraVSf3Omoob1dO/AzBfhtFAPW0an6sBo=
|
||||
github.com/go-openapi/testify/v2 v2.5.1/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
@@ -417,8 +417,8 @@ github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArs
|
||||
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||
github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||
github.com/golang/geo v0.0.0-20260713102120-857a528af641 h1:cpoobkgVGCE6bC5kJkOfwfM6hAtZuvoBjnCLECxG4AU=
|
||||
github.com/golang/geo v0.0.0-20260713102120-857a528af641/go.mod h1:Mymr9kRGDc64JPr03TSZmuIBODZ3KyswLzm1xL0HFA8=
|
||||
github.com/golang/geo v0.0.0-20260605061815-58f45aa500f1 h1:vkAT/N8DPfmQ3ZltANiX95HhM0nv/tqoq5Innoimcwo=
|
||||
github.com/golang/geo v0.0.0-20260605061815-58f45aa500f1/go.mod h1:Mymr9kRGDc64JPr03TSZmuIBODZ3KyswLzm1xL0HFA8=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
@@ -585,6 +585,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ=
|
||||
github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY=
|
||||
github.com/jupiterrider/ffi v0.7.0 h1:RKsl6Ascal+3kyAqR5Qcbp83LceQMLc1VZbPfHWoNzs=
|
||||
github.com/jupiterrider/ffi v0.7.0/go.mod h1:9dauhpOfNqrqk28fxuu0kkdeFtT9Qr4vbfigiuIXN7c=
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0=
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY=
|
||||
github.com/kisielk/errcheck v1.10.0 h1:Lvs/YAHP24YKg08LA8oDw2z9fJVme090RAXd90S+rrw=
|
||||
@@ -598,8 +600,8 @@ github.com/kovidgoyal/go-parallel v1.1.1 h1:1OzpNjtrUkBPq3UaqrnvOoB2F9RttSt811ui
|
||||
github.com/kovidgoyal/go-parallel v1.1.1/go.mod h1:BJNIbe6+hxyFWv7n6oEDPj3PA5qSw5OCtf0hcVxWJiw=
|
||||
github.com/kovidgoyal/go-shm v1.0.0 h1:HJEel9D1F9YhULvClEHJLawoRSj/1u/EDV7MJbBPgQo=
|
||||
github.com/kovidgoyal/go-shm v1.0.0/go.mod h1:Yzb80Xf9L3kaoB2RGok9hHwMIt7Oif61kT6t3+VnZds=
|
||||
github.com/kovidgoyal/imaging v1.8.23 h1:4WsboyQ/E8tic2kX49P93Rvscg33SPsCwTBG5EZZF54=
|
||||
github.com/kovidgoyal/imaging v1.8.23/go.mod h1:k3Iot3H0v2rSWXIxQISfT3e9wIryqzAHLHCuhG7z9lM=
|
||||
github.com/kovidgoyal/imaging v1.8.21 h1:95S2+dowTeKJJHNpf6lnScvIennTr2H0zQotu+ptNQw=
|
||||
github.com/kovidgoyal/imaging v1.8.21/go.mod h1:976F+zjiQeZ7sd87Pxlm0a64S/w9bImSIWg3sSk1rdQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
@@ -628,8 +630,8 @@ github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYU
|
||||
github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI=
|
||||
github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc=
|
||||
github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ=
|
||||
github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0=
|
||||
github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY=
|
||||
github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA=
|
||||
github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4=
|
||||
@@ -658,12 +660,12 @@ github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
|
||||
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
|
||||
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=
|
||||
github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
|
||||
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
|
||||
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-sqlite3 v1.14.49 h1:B8jBHC3xhxZgxztrgruTuLucebnULQnx4W7cF7SAE9w=
|
||||
github.com/mattn/go-sqlite3 v1.14.49/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
|
||||
github.com/mattn/go-sqlite3 v1.14.45 h1:6KA/spDguL3KV8rnybG7ezSaE4SeMR3KC9VbUoAQaIk=
|
||||
github.com/mattn/go-sqlite3 v1.14.45/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mgechev/revive v1.15.0 h1:vJ0HzSBzfNyPbHKolgiFjHxLek9KUijhqh42yGoqZ8Q=
|
||||
@@ -926,8 +928,8 @@ go.augendre.info/arangolint v0.4.0/go.mod h1:l+f/b4plABuFISuKnTGD4RioXiCCgghv2xq
|
||||
go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE=
|
||||
go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw=
|
||||
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
|
||||
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
|
||||
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
|
||||
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
@@ -941,9 +943,8 @@ go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
|
||||
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
|
||||
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@@ -951,8 +952,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
|
||||
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
|
||||
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
|
||||
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -971,8 +972,8 @@ golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 h1:qWFG1Dj7TBjOjO
|
||||
golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
|
||||
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
|
||||
golang.org/x/image v0.41.0 h1:8wS72eGJMJaBxK6okTzd4WaXumUlTVlb753MlsSvTCo=
|
||||
golang.org/x/image v0.41.0/go.mod h1:uIc348UZMSvS5Z65CVZ7iDPaNobNFEPeJ4kbqTOszmA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -995,8 +996,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
|
||||
golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
|
||||
golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
|
||||
golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -1035,8 +1036,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
|
||||
golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
|
||||
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
|
||||
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
|
||||
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -1058,8 +1059,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1106,8 +1107,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
|
||||
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
@@ -1119,8 +1120,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
|
||||
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
|
||||
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
|
||||
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1173,8 +1174,8 @@ golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0t
|
||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
|
||||
golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
|
||||
golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8=
|
||||
golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0=
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM=
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY=
|
||||
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM=
|
||||
@@ -1291,20 +1292,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU=
|
||||
honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc=
|
||||
modernc.org/cc/v4 v4.29.1 h1:MKgdCV3WykTSPqpVrnxdEDS0HEd2FHpKZDzxzU5LyeI=
|
||||
modernc.org/cc/v4 v4.29.1/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
|
||||
modernc.org/ccgo/v4 v4.34.6 h1:sBgfIwyN0TQ9C5hwIeuqyeAKyMWnbvj2fvpF4L11uzU=
|
||||
modernc.org/ccgo/v4 v4.34.6/go.mod h1:SZ8YcN9NG7XVsQYdm6jYBvi8PQP1qi+kqB6OhjqI3Fk=
|
||||
modernc.org/cc/v4 v4.28.2 h1:3tQ0lf2ADtoby2EtSP+J7IE2SHwEJdP8ioR59wx7XpY=
|
||||
modernc.org/cc/v4 v4.28.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
|
||||
modernc.org/ccgo/v4 v4.34.2 h1:mxsy2FdrB6+qG3NfXefz1AmWv0ehOSDO4jxgxd7h9yo=
|
||||
modernc.org/ccgo/v4 v4.34.2/go.mod h1:1L7us56+kAKu04p25EATpmBBvhbcqqZ85ibqWVwVgog=
|
||||
modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM=
|
||||
modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU=
|
||||
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
|
||||
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
|
||||
modernc.org/gc/v3 v3.1.4 h1:2g65LGVSmFQrXeITAw97x7hCRvZFcyE1uDP+7Vng7JI=
|
||||
modernc.org/gc/v3 v3.1.4/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
|
||||
modernc.org/gc/v3 v3.1.3 h1:6QAplYyVO+KdPW3pGnqmJDUxtkec8ooEWvks/hhU3lc=
|
||||
modernc.org/gc/v3 v3.1.3/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
|
||||
modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=
|
||||
modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=
|
||||
modernc.org/libc v1.74.4 h1:fX1Omw4o2/1C2iRkkIsrQTasJQldLhRmuPreXLoWs9k=
|
||||
modernc.org/libc v1.74.4/go.mod h1:eeQAS9W3sZeKYMFubydxJpII9ybHWshk+7or7bLG9co=
|
||||
modernc.org/libc v1.72.5 h1:m2OGx9Ser1VvTS4Z9ZJlWs+CBMxutLaTiAWkNz+NB9U=
|
||||
modernc.org/libc v1.72.5/go.mod h1:np0N7KDJ7eUtMZmOqVZNldrZyG+DHLl2B5pg8Hbar3U=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
||||
@@ -1313,8 +1314,8 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
|
||||
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
|
||||
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
|
||||
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
|
||||
modernc.org/sqlite v1.55.0 h1:hIFh0MCH0rGinQ/4KYb5/UbCkRkb+UP+OkLCVWa5MTM=
|
||||
modernc.org/sqlite v1.55.0/go.mod h1:4ntCLuNmnH8+GNqjka1wNg7KJd5/Hi5FYp8K+XQ7GZw=
|
||||
modernc.org/sqlite v1.51.0 h1:aH/MMSoayAIhozZ7uJbVTT9QO/VhzBf0J9tymmmuC/U=
|
||||
modernc.org/sqlite v1.51.0/go.mod h1:tcNzv5p84E0skkmJn038y+hWJbLQXQqEnQfeh5r2JLM=
|
||||
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
|
||||
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
|
||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
|
||||
@@ -91,7 +91,6 @@ func StartHttp(ctx context.Context, storage *bolt.BoltStore, shutdownComplete ch
|
||||
api.HandleFunc("GET /users", withUser(userGetHandler))
|
||||
api.HandleFunc("POST /users", withSelfOrAdmin(usersPostHandler))
|
||||
api.HandleFunc("PUT /users", withUser(userPutHandler))
|
||||
api.HandleFunc("PATCH /users/pinnedItems", withUser(userPatchPinnedItemsHandler))
|
||||
api.HandleFunc("DELETE /users", withSelfOrAdmin(userDeleteHandler))
|
||||
publicApi.HandleFunc("GET /users", withUser(userGetHandler))
|
||||
|
||||
@@ -166,7 +165,6 @@ func StartHttp(ctx context.Context, storage *bolt.BoltStore, shutdownComplete ch
|
||||
api.HandleFunc("PATCH /share", withPermShare(sharePatchHandler))
|
||||
api.HandleFunc("DELETE /share", withPermShare(shareDeleteHandler))
|
||||
publicApi.HandleFunc("GET /share/info", withOrWithoutUser(shareInfoHandler))
|
||||
publicApi.HandleFunc("PATCH /share/pinnedItems", withPermShare(sharePatchPinnedItemsHandler))
|
||||
publicApi.HandleFunc("GET /share/image", withHashFile(getShareImage))
|
||||
|
||||
// ========================================
|
||||
|
||||
@@ -137,8 +137,6 @@ func withHashFileHelper(fn handleFunc) handleFunc {
|
||||
ShowHidden: link.ShowHidden,
|
||||
HideFileExt: link.HideFileExt,
|
||||
FollowSymlinks: true,
|
||||
ShowPinnedItems: true,
|
||||
ShareHash: hash,
|
||||
}, store.Access, data.shareUser, store.Share)
|
||||
if err != nil {
|
||||
logger.Errorf("error fetching file info for share. hash=%v path=%v error=%v", hash, path, err)
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/gtsteffaniak/filebrowser/backend/adapters/fs/files"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/settings"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/utils"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/users"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/indexing"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/indexing/iteminfo"
|
||||
"github.com/gtsteffaniak/go-logger/logger"
|
||||
)
|
||||
@@ -482,7 +482,7 @@ func processOnlyOfficeCallback(w http.ResponseWriter, r *http.Request, d *reques
|
||||
//
|
||||
// When the document is fully closed by all editors,
|
||||
// the document key should no longer be re-used.
|
||||
deleteOfficeId(source, path, user)
|
||||
deleteOfficeId(source, path)
|
||||
|
||||
// Send log event for document closure and clean up log context
|
||||
if logContext := getOnlyOfficeLogContext(data.Key); logContext != nil {
|
||||
@@ -755,21 +755,14 @@ func getOnlyOfficeId(realpath string) (string, error) {
|
||||
return "", fmt.Errorf("document key not found")
|
||||
}
|
||||
|
||||
func deleteOfficeId(source, path string, user *users.User) {
|
||||
fi, err := files.FileInfoFaster(utils.FileOptions{
|
||||
Path: path,
|
||||
Source: source,
|
||||
Expand: false,
|
||||
FollowSymlinks: true,
|
||||
}, store.Access, user, store.Share)
|
||||
key := path
|
||||
if fi != nil && fi.RealPath != "" {
|
||||
key = fi.RealPath
|
||||
func deleteOfficeId(source, path string) {
|
||||
idx := indexing.GetIndex(source)
|
||||
if idx == nil {
|
||||
logger.Errorf("deleteOfficeId: failed to find source index for user home dir creation: %s", source)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
logger.Errorf("deleteOfficeId: failed to resolve realpath, source=%s, path=%s: %v", source, path, err)
|
||||
}
|
||||
utils.OnlyOfficeCache.Delete(key)
|
||||
realpath, _, _ := idx.GetRealPath(path)
|
||||
utils.OnlyOfficeCache.Delete(realpath)
|
||||
}
|
||||
|
||||
// parseOnlyOfficeJWT parses the JWT token from OnlyOffice callback
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"github.com/gtsteffaniak/filebrowser/backend/adapters/fs/files"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/utils"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/access"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/share"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/storage/bolt"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/users"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/indexing/iteminfo"
|
||||
)
|
||||
|
||||
func TestResolveOnlyOfficeDownloadURL(t *testing.T) {
|
||||
@@ -92,77 +83,6 @@ func TestResolveOnlyOfficeDownloadURL(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestDeleteOfficeId(t *testing.T) {
|
||||
const rawPath = "/docs/document.docx"
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
resolve func(utils.FileOptions) (*iteminfo.ExtendedFileInfo, error)
|
||||
deleteKey string
|
||||
remainKey string
|
||||
}{
|
||||
{
|
||||
name: "deletes resolved realpath",
|
||||
resolve: func(utils.FileOptions) (*iteminfo.ExtendedFileInfo, error) {
|
||||
return &iteminfo.ExtendedFileInfo{RealPath: "/some/path/document.docx"}, nil
|
||||
},
|
||||
deleteKey: "/some/path/document.docx",
|
||||
remainKey: rawPath,
|
||||
},
|
||||
{
|
||||
name: "fallback to raw path on error",
|
||||
resolve: func(utils.FileOptions) (*iteminfo.ExtendedFileInfo, error) {
|
||||
return nil, fmt.Errorf("could not resolve path")
|
||||
},
|
||||
deleteKey: rawPath,
|
||||
remainKey: "/some/path/document.docx",
|
||||
},
|
||||
{
|
||||
name: "also deletes realpath when partially resolved before erroring",
|
||||
resolve: func(utils.FileOptions) (*iteminfo.ExtendedFileInfo, error) {
|
||||
return &iteminfo.ExtendedFileInfo{RealPath: "/some/path/document.docx"}, fmt.Errorf("access check failed")
|
||||
},
|
||||
deleteKey: "/some/path/document.docx",
|
||||
remainKey: rawPath,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
origStore := store
|
||||
store = &bolt.BoltStore{Access: &access.Storage{}, Share: &share.Storage{}}
|
||||
t.Cleanup(func() { store = origStore })
|
||||
|
||||
origFunc := files.FileInfoFasterFunc
|
||||
t.Cleanup(func() { files.FileInfoFasterFunc = origFunc })
|
||||
files.FileInfoFasterFunc = func(opts utils.FileOptions, accessStore *access.Storage, user *users.User, shareStore *share.Storage) (*iteminfo.ExtendedFileInfo, error) {
|
||||
if opts.Path != rawPath {
|
||||
t.Errorf("expected opts.Path=%q, got %q", rawPath, opts.Path)
|
||||
}
|
||||
if opts.Source != "source" {
|
||||
t.Errorf("expected opts.Source=%q, got %q", "source", opts.Source)
|
||||
}
|
||||
if !opts.FollowSymlinks {
|
||||
t.Error("expected FollowSymlinks=true")
|
||||
}
|
||||
return tt.resolve(opts)
|
||||
}
|
||||
utils.OnlyOfficeCache.Set(tt.deleteKey, "document-key")
|
||||
utils.OnlyOfficeCache.Set(tt.remainKey, "other-key")
|
||||
t.Cleanup(func() {
|
||||
utils.OnlyOfficeCache.Delete(tt.deleteKey)
|
||||
utils.OnlyOfficeCache.Delete(tt.remainKey)
|
||||
})
|
||||
deleteOfficeId("source", rawPath, &users.User{})
|
||||
if _, err := getOnlyOfficeId(tt.deleteKey); err == nil {
|
||||
t.Errorf("expected cache entry %q to be deleted", tt.deleteKey)
|
||||
}
|
||||
if _, err := getOnlyOfficeId(tt.remainKey); err != nil {
|
||||
t.Errorf("expected cache entry %q to remain, but it was deleted", tt.remainKey)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestOnlyOfficeURLHostsMatch(t *testing.T) {
|
||||
mustParse := func(raw string) *url.URL {
|
||||
t.Helper()
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/utils"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/users"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/indexing"
|
||||
)
|
||||
|
||||
// pinnedItemPatchRequest is the JSON body for PATCH /api/users/pinnedItems.
|
||||
type pinnedItemPatchRequest struct {
|
||||
Source string `json:"source" validate:"required"`
|
||||
Path string `json:"path" validate:"required"` // scope-relative parent directory
|
||||
Name string `json:"name" validate:"required"` // item basename within path
|
||||
}
|
||||
|
||||
// sharePinnedItemPatchRequest is the JSON body for PATCH /public/api/share/pinnedItems.
|
||||
type sharePinnedItemPatchRequest struct {
|
||||
Path string `json:"path" validate:"required"` // share-relative parent directory
|
||||
Name string `json:"name" validate:"required"` // item basename within path
|
||||
}
|
||||
|
||||
// scopeRelativeDirToIndexPath maps a scope-relative directory to source and index paths.
|
||||
func scopeRelativeDirToIndexPath(sourceName, userScope, directoryPath string) (sourcePath, indexDirPath string, err error) {
|
||||
userScope = strings.TrimRight(userScope, "/")
|
||||
source, ok := users.ResolveSourceKey(sourceName)
|
||||
if !ok {
|
||||
return "", "", fmt.Errorf("source not found: %s", sourceName)
|
||||
}
|
||||
idx := indexing.GetIndex(source.Name)
|
||||
if idx == nil {
|
||||
return "", "", fmt.Errorf("index not found for source %s", source.Name)
|
||||
}
|
||||
|
||||
cleanDir, err := utils.SanitizeUserPath(directoryPath)
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("invalid path: %w", err)
|
||||
}
|
||||
|
||||
fullDirPath := utils.JoinPathAsUnix(userScope, cleanDir)
|
||||
return source.Path, idx.MakeIndexPath(fullDirPath, true), nil
|
||||
}
|
||||
|
||||
// normalizeShareRelativeDir returns a normalized share-relative directory path key.
|
||||
func normalizeShareRelativeDir(shareRelDir string) (string, error) {
|
||||
if shareRelDir == "" || shareRelDir == "/" {
|
||||
return "/", nil
|
||||
}
|
||||
cleanDir, err := utils.SanitizeUserPath(shareRelDir)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("invalid path: %w", err)
|
||||
}
|
||||
return utils.AddTrailingSlashIfNotExists(cleanDir), nil
|
||||
}
|
||||
|
||||
// pinnedItemAction returns the patch action query param, defaulting to "add".
|
||||
func pinnedItemAction(r *http.Request) string {
|
||||
action := strings.ToLower(strings.TrimSpace(r.URL.Query().Get("action")))
|
||||
if action == "" {
|
||||
return "add"
|
||||
}
|
||||
return action
|
||||
}
|
||||
|
||||
// userPatchPinnedItemsHandler adds or removes a single pinned item for the authenticated user.
|
||||
// @Summary Add or remove a pinned item
|
||||
// @Description Patches one pinned item at a time. Defaults to add; pass ?action=remove to unpin.
|
||||
// @Tags Users
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param action query string false "add (default) or remove"
|
||||
// @Param body body pinnedItemPatchRequest true "Pinned item"
|
||||
// @Success 204 "No Content"
|
||||
// @Failure 400 {object} map[string]string "Bad Request"
|
||||
// @Failure 403 {object} map[string]string "Forbidden"
|
||||
// @Failure 500 {object} map[string]string "Internal Server Error"
|
||||
// @Router /api/users/pinnedItems [patch]
|
||||
func userPatchPinnedItemsHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) {
|
||||
var body pinnedItemPatchRequest
|
||||
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
||||
return http.StatusBadRequest, fmt.Errorf("failed to decode body: %w", err)
|
||||
}
|
||||
defer r.Body.Close()
|
||||
|
||||
action := pinnedItemAction(r)
|
||||
if action != "add" && action != "remove" {
|
||||
return http.StatusBadRequest, fmt.Errorf("action must be add or remove")
|
||||
}
|
||||
|
||||
if body.Source == "" || body.Path == "" || body.Name == "" {
|
||||
return http.StatusBadRequest, fmt.Errorf("source, path, and name are required")
|
||||
}
|
||||
cleanPath, err := utils.SanitizeUserPath(body.Path)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, err
|
||||
}
|
||||
body.Path = cleanPath
|
||||
|
||||
cleanName, err := utils.SanitizeUserPath(body.Name)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, err
|
||||
}
|
||||
body.Name = cleanName
|
||||
|
||||
source, ok := users.ResolveSourceKey(body.Source)
|
||||
if !ok {
|
||||
return http.StatusBadRequest, fmt.Errorf("source not found: %s", body.Source)
|
||||
}
|
||||
if !d.user.HasSourceByPath(source.Path) {
|
||||
return http.StatusForbidden, fmt.Errorf("access denied to source %s", body.Source)
|
||||
}
|
||||
|
||||
userScope, err := d.user.GetScopeForSourcePath(source.Path)
|
||||
if err != nil {
|
||||
return http.StatusForbidden, err
|
||||
}
|
||||
|
||||
sourcePath, indexDirPath, err := scopeRelativeDirToIndexPath(body.Source, userScope, body.Path)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, err
|
||||
}
|
||||
|
||||
u, err := store.Users.Get(d.user.ID)
|
||||
if err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
||||
pinned := u.EnsurePinnedItems()
|
||||
switch action {
|
||||
case "add":
|
||||
pinned.Add(sourcePath, indexDirPath, body.Name)
|
||||
case "remove":
|
||||
pinned.Remove(sourcePath, indexDirPath, body.Name)
|
||||
}
|
||||
|
||||
if err := store.Users.Update(u, d.user.Permissions.Admin, "PinnedItems"); err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
||||
return http.StatusNoContent, nil
|
||||
}
|
||||
@@ -103,7 +103,6 @@ func resourceGetHandler(w http.ResponseWriter, r *http.Request, d *requestContex
|
||||
HideFileExt: d.user.HideFileExt,
|
||||
SkipExtendedAttrs: skipExtendedAttrs,
|
||||
ShowSharedAttr: true,
|
||||
ShowPinnedItems: true,
|
||||
}, store.Access, d.user, store.Share)
|
||||
if err != nil {
|
||||
return errToStatus(err), err
|
||||
|
||||
@@ -700,78 +700,3 @@ func redirectToShare(w http.ResponseWriter, r *http.Request, d *requestContext)
|
||||
http.Redirect(w, r, newURL, http.StatusMovedPermanently)
|
||||
return http.StatusMovedPermanently, nil
|
||||
}
|
||||
|
||||
// publicSharePatchPinnedItemsHandler adds or removes a pinned item on a share link.
|
||||
// @Summary Add or remove a pinned item on a share
|
||||
// @Description Patches one pinned item at a time for share owners. Defaults to add; pass ?action=remove to unpin.
|
||||
// @Tags Shares
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param hash query string true "Share hash"
|
||||
// @Param action query string false "add (default) or remove"
|
||||
// @Param body body sharePinnedItemPatchRequest true "Pinned item"
|
||||
// @Success 204 "No Content"
|
||||
// @Failure 400 {object} map[string]string "Bad Request"
|
||||
// @Failure 403 {object} map[string]string "Forbidden"
|
||||
// @Failure 404 {object} map[string]string "Share not found"
|
||||
// @Failure 500 {object} map[string]string "Internal Server Error"
|
||||
// @Router /public/api/share/pinnedItems [patch]
|
||||
func sharePatchPinnedItemsHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) {
|
||||
hash := r.URL.Query().Get("hash")
|
||||
if hash == "" {
|
||||
return http.StatusBadRequest, fmt.Errorf("hash is required")
|
||||
}
|
||||
|
||||
link, err := store.Share.GetByHash(hash)
|
||||
if err != nil {
|
||||
return http.StatusNotFound, fmt.Errorf("share hash not found")
|
||||
}
|
||||
|
||||
if d.user.Username == "anonymous" || !link.UserCanEdit(d.user) {
|
||||
return http.StatusForbidden, fmt.Errorf("share pin editing is not allowed for this user")
|
||||
}
|
||||
|
||||
if link.ShareType == "upload" {
|
||||
return http.StatusForbidden, fmt.Errorf("pinning is disabled for upload shares")
|
||||
}
|
||||
|
||||
var body sharePinnedItemPatchRequest
|
||||
if err = json.NewDecoder(r.Body).Decode(&body); err != nil {
|
||||
return http.StatusBadRequest, fmt.Errorf("failed to decode body: %w", err)
|
||||
}
|
||||
defer r.Body.Close()
|
||||
|
||||
action := pinnedItemAction(r)
|
||||
if action != "add" && action != "remove" {
|
||||
return http.StatusBadRequest, fmt.Errorf("action must be add or remove")
|
||||
}
|
||||
|
||||
if body.Path == "" || body.Name == "" {
|
||||
return http.StatusBadRequest, fmt.Errorf("path and name are required")
|
||||
}
|
||||
|
||||
shareRelDir, err := normalizeShareRelativeDir(body.Path)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, fmt.Errorf("invalid path: %s", body.Path)
|
||||
}
|
||||
|
||||
cleanName, err := utils.SanitizeUserPath(body.Name)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, fmt.Errorf("invalid name: %s", body.Name)
|
||||
}
|
||||
body.Name = cleanName
|
||||
|
||||
pinned := link.EnsurePinnedItems()
|
||||
switch action {
|
||||
case "add":
|
||||
pinned.Add(shareRelDir, body.Name)
|
||||
case "remove":
|
||||
pinned.Remove(shareRelDir, body.Name)
|
||||
}
|
||||
|
||||
if err := store.Share.Save(link); err != nil {
|
||||
return http.StatusInternalServerError, fmt.Errorf("failed to save share: %w", err)
|
||||
}
|
||||
|
||||
return http.StatusNoContent, nil
|
||||
}
|
||||
+4
-38
@@ -6,7 +6,6 @@ import (
|
||||
"html/template"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -97,17 +96,6 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
|
||||
shareHash := ""
|
||||
data := make(map[string]interface{})
|
||||
disableNavButtons := config.Frontend.DisableNavButtons
|
||||
if d.share != nil {
|
||||
shareHash = d.share.Hash
|
||||
}
|
||||
if shareHash == "" {
|
||||
shareHash = icons.ShareHashFromHTTPPath(r.URL.Path, config.Server.BaseURL)
|
||||
}
|
||||
if shareHash != "" && d.share == nil && store != nil {
|
||||
if link, err := store.Share.GetByHash(shareHash); err == nil {
|
||||
d.share = link
|
||||
}
|
||||
}
|
||||
if d.share != nil {
|
||||
if d.share.Favicon != "" {
|
||||
if strings.HasPrefix(d.share.Favicon, "http") {
|
||||
@@ -136,6 +124,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
|
||||
if shareFavicon != "" {
|
||||
favicon = shareFavicon
|
||||
}
|
||||
shareHash = d.share.Hash
|
||||
}
|
||||
// Set login icon URL
|
||||
loginIcon := staticURL + "/loginIcon"
|
||||
@@ -173,20 +162,6 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
|
||||
pwaIcon256 := staticURL + "/icons/pwa-icon-256.png"
|
||||
pwaIcon512 := staticURL + "/icons/pwa-icon-512.png"
|
||||
|
||||
manifestURL := staticURL + "/site.webmanifest"
|
||||
if shareHash != "" {
|
||||
pwaStartURL := config.Server.BaseURL + "public/share/" + shareHash + "/"
|
||||
query := url.Values{}
|
||||
query.Set("start", pwaStartURL)
|
||||
if title != config.Frontend.Name {
|
||||
query.Set("name", title)
|
||||
}
|
||||
if description != config.Frontend.Description {
|
||||
query.Set("description", description)
|
||||
}
|
||||
manifestURL = staticURL + "/site.webmanifest?" + query.Encode()
|
||||
}
|
||||
|
||||
data["htmlVars"] = map[string]interface{}{
|
||||
"title": title,
|
||||
"customCSS": template.CSS(config.Frontend.Styling.CustomCSSRaw),
|
||||
@@ -208,7 +183,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
|
||||
"pwaIcon192": pwaIcon192,
|
||||
"pwaIcon256": pwaIcon256,
|
||||
"pwaIcon512": pwaIcon512,
|
||||
"manifestURL": manifestURL,
|
||||
"manifestURL": staticURL + "/site.webmanifest",
|
||||
}
|
||||
|
||||
data["globalVars"] = map[string]interface{}{
|
||||
@@ -292,21 +267,12 @@ func setContentType(w http.ResponseWriter, path string) {
|
||||
}
|
||||
}
|
||||
|
||||
// manifestHandler serves the cached PWA manifest, optionally scoped to a public share.
|
||||
// manifestHandler serves the cached PWA manifest
|
||||
func manifestHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/manifest+json")
|
||||
w.Header().Set("Cache-Control", "public, max-age=3600") // Cache for 1 hour
|
||||
|
||||
manifest := icons.CachedManifest
|
||||
if startURL := r.URL.Query().Get("start"); startURL != "" {
|
||||
name := r.URL.Query().Get("name")
|
||||
description := r.URL.Query().Get("description")
|
||||
if shareManifest, ok := icons.ManifestForShare(config.Server.BaseURL, startURL, name, description); ok {
|
||||
manifest = shareManifest
|
||||
}
|
||||
}
|
||||
|
||||
if err := json.NewEncoder(w).Encode(manifest); err != nil {
|
||||
if err := json.NewEncoder(w).Encode(icons.CachedManifest); err != nil {
|
||||
http.Error(w, "Failed to serve manifest", http.StatusInternalServerError)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gtsteffaniak/filebrowser/backend/auth"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/errors"
|
||||
"github.com/gtsteffaniak/filebrowser/backend/database/users"
|
||||
"github.com/pquerna/otp/totp"
|
||||
)
|
||||
|
||||
func otpRequest(username, password, code string) *http.Request {
|
||||
req := httptest.NewRequest(http.MethodPost, "/api/auth/otp?username="+username, http.NoBody)
|
||||
req.Header.Set("X-Password", password)
|
||||
if code != "" {
|
||||
req.Header.Set("X-Secret", code)
|
||||
}
|
||||
return req
|
||||
}
|
||||
|
||||
func TestVerifyOTP_CachedSecretTakesPrecedence(t *testing.T) {
|
||||
setupTestEnv(t)
|
||||
|
||||
oldSecret := "SOMEOLDSECRET234"
|
||||
user := &users.User{
|
||||
ID: 1,
|
||||
Username: "test",
|
||||
NonAdminEditable: users.NonAdminEditable{Password: "testPass"},
|
||||
TOTPSecret: oldSecret,
|
||||
OtpEnabled: true,
|
||||
}
|
||||
if err := store.Users.Save(user, true, true); err != nil {
|
||||
t.Fatalf("failed to save user: %v", err)
|
||||
}
|
||||
t.Cleanup(func() { auth.TotpCache.Delete(user.Username) })
|
||||
|
||||
d := &requestContext{user: user}
|
||||
|
||||
rec := httptest.NewRecorder()
|
||||
if _, err := generateOTPHandler(rec, otpRequest(user.Username, "testPass", ""), d); err != nil {
|
||||
t.Fatalf("genration failed: %v", err)
|
||||
}
|
||||
var resp map[string]string
|
||||
if err := json.Unmarshal(rec.Body.Bytes(), &resp); err != nil {
|
||||
t.Fatalf("failed to decode response: %v", err)
|
||||
}
|
||||
u, err := url.Parse(resp["url"])
|
||||
if err != nil {
|
||||
t.Fatalf("failed to parse url: %v", err)
|
||||
}
|
||||
newSecret := u.Query().Get("secret")
|
||||
if newSecret == oldSecret {
|
||||
t.Fatal("expected a fresh secret")
|
||||
}
|
||||
oldCode, err := totp.GenerateCode(oldSecret, time.Now())
|
||||
if err != nil {
|
||||
t.Fatalf("failed to generate old code: %v", err)
|
||||
}
|
||||
if _, verifyErr := verifyOTPHandler(httptest.NewRecorder(), otpRequest(user.Username, "testPass", oldCode), d); verifyErr == nil {
|
||||
t.Error("expected old secret to be rejected")
|
||||
}
|
||||
newCode, err := totp.GenerateCode(newSecret, time.Now())
|
||||
if err != nil {
|
||||
t.Fatalf("failed to generate new code: %v", err)
|
||||
}
|
||||
if _, verifyErr := verifyOTPHandler(httptest.NewRecorder(), otpRequest(user.Username, "testPass", newCode), d); verifyErr != nil {
|
||||
t.Fatalf("expected new secret to be accepted: %v", verifyErr)
|
||||
}
|
||||
updated, err := store.Users.Get(user.Username)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to reload user: %v", err)
|
||||
}
|
||||
if updated.TOTPSecret != newSecret {
|
||||
t.Error("expected TOTPSecret to be updated to the new secret")
|
||||
}
|
||||
if _, found := auth.TotpCache.Get(user.Username); found {
|
||||
t.Error("expected cache to be cleared after verification")
|
||||
}
|
||||
}
|
||||
|
||||
func TestLogin_EnforcedOtp(t *testing.T) {
|
||||
setupTestEnv(t)
|
||||
config.Auth.Key = "test-key"
|
||||
config.Auth.TokenExpirationHours = 1
|
||||
config.Auth.Methods.PasswordAuth.EnforcedOtp = true
|
||||
|
||||
user := &users.User{ID: 2, Username: "loginuser", LoginMethod: users.LoginMethodPassword}
|
||||
d := &requestContext{user: user}
|
||||
|
||||
status, err := loginHandler(httptest.NewRecorder(), otpRequest(user.Username, "", ""), d)
|
||||
if status != http.StatusForbidden || err != errors.ErrNoTotpConfigured {
|
||||
t.Fatalf("expected login without TOTP to fail, got=%d err=%v", status, err)
|
||||
}
|
||||
|
||||
user.TOTPSecret = "SOMESECRET123456"
|
||||
if _, loginErr := loginHandler(httptest.NewRecorder(), otpRequest(user.Username, "", ""), d); loginErr != nil {
|
||||
t.Fatalf("expected login with TOTP to succed, got err=%v", loginErr)
|
||||
}
|
||||
}
|
||||
+17
-1
@@ -99,8 +99,8 @@ func prepForFrontend(u *users.User) {
|
||||
u.TOTPSecret = ""
|
||||
u.TOTPNonce = ""
|
||||
u.Scopes = u.GetFrontendScopes()
|
||||
u.PinnedItems = u.GetFrontendPinnedItems()
|
||||
u.SidebarLinks = GetFrontendSidebarLinks(u.SidebarLinks, u.ShowToolsInSidebar)
|
||||
u.PinnedItems = nil
|
||||
u.Locale = normalizeLocale(u.Locale)
|
||||
for i := range u.PasskeyCredentials {
|
||||
u.PasskeyCredentials[i].PublicKey = ""
|
||||
@@ -356,6 +356,10 @@ func userPutOnlyNonAdminEditableFields(which []string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func userPutOnlyPinnedItems(which []string) bool {
|
||||
return len(which) == 1 && strings.EqualFold(strings.TrimSpace(which[0]), "PinnedItems")
|
||||
}
|
||||
|
||||
// verifyActorPasswordForUserPut requires URL-encoded X-Password when the authenticated actor uses
|
||||
// password login. Callers should invoke this only when the update requires re-authentication.
|
||||
func verifyActorPasswordForUserActions(r *http.Request, d *requestContext) (int, error) {
|
||||
@@ -454,6 +458,18 @@ func userPutHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (
|
||||
}
|
||||
}
|
||||
|
||||
if userPutOnlyPinnedItems(req.Which) {
|
||||
adjustedPinnedItems, err2 := req.User.GetBackendPinnedItems()
|
||||
if err2 != nil {
|
||||
return http.StatusBadRequest, err2
|
||||
}
|
||||
oldUser.PinnedItems = adjustedPinnedItems
|
||||
if err2 := store.Users.Save(oldUser, false, false); err2 != nil {
|
||||
return http.StatusBadRequest, err2
|
||||
}
|
||||
return http.StatusNoContent, nil
|
||||
}
|
||||
|
||||
err = store.Users.Update(&req.User, d.user.Permissions.Admin, req.Which...)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, err
|
||||
|
||||
+12
-21
@@ -1,16 +1,13 @@
|
||||
package icons
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/settings"
|
||||
)
|
||||
|
||||
// PWAManifest represents the web app manifest structure
|
||||
type PWAManifest struct {
|
||||
Name string `json:"name"`
|
||||
ID string `json:"id"`
|
||||
Scope string `json:"scope"`
|
||||
ShortName string `json:"short_name"`
|
||||
Icons []PWAIcon `json:"icons"`
|
||||
StartURL string `json:"start_url"`
|
||||
Display string `json:"display"`
|
||||
@@ -30,25 +27,19 @@ type PWAIcon struct {
|
||||
// CachedManifest holds the generated PWA manifest at startup
|
||||
var CachedManifest PWAManifest
|
||||
|
||||
const pwaManifestNameMaxLen = 30
|
||||
|
||||
// pwaManifestName returns the app title for the web app manifest.
|
||||
// Names longer than 30 characters are truncated to fit common mobile launcher limits.
|
||||
func pwaManifestName(name string) string {
|
||||
name = strings.TrimSpace(name)
|
||||
runes := []rune(name)
|
||||
if len(runes) > pwaManifestNameMaxLen {
|
||||
return string(runes[:pwaManifestNameMaxLen])
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
// generatePWAManifest creates the PWA manifest structure.
|
||||
// generatePWAManifest creates the PWA manifest structure
|
||||
func generatePWAManifest(name, description, baseURL, themeColor, pwaIcon192, pwaIcon256, pwaIcon512 string) PWAManifest {
|
||||
shortName := name
|
||||
if len(name) > 12 {
|
||||
shortName = name[:12]
|
||||
}
|
||||
if name == "FileBrowser Quantum" {
|
||||
shortName = "FBQ"
|
||||
}
|
||||
|
||||
return PWAManifest{
|
||||
Name: pwaManifestName(name),
|
||||
ID: baseURL,
|
||||
Scope: baseURL,
|
||||
Name: name,
|
||||
ShortName: shortName,
|
||||
StartURL: baseURL,
|
||||
Display: "standalone",
|
||||
BackgroundColor: "#ffffff",
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
package icons
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gtsteffaniak/filebrowser/backend/common/utils"
|
||||
)
|
||||
|
||||
const maxManifestTextLen = 256
|
||||
|
||||
func isValidShareHash(hash string) bool {
|
||||
if len(hash) < 8 || len(hash) > 64 {
|
||||
return false
|
||||
}
|
||||
if strings.Contains(hash, "..") || strings.Contains(hash, "/") {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// ShareRootFromStartURL validates a share PWA start URL and returns the share root
|
||||
// used for manifest scope/id plus the normalized start URL.
|
||||
func ShareRootFromStartURL(baseURL, startURL string) (shareRoot, normalizedStart string, ok bool) {
|
||||
if startURL == "" || !strings.HasPrefix(startURL, baseURL) {
|
||||
return "", "", false
|
||||
}
|
||||
|
||||
rel := strings.TrimPrefix(startURL, baseURL)
|
||||
if !strings.HasPrefix(rel, "public/share/") {
|
||||
return "", "", false
|
||||
}
|
||||
|
||||
rest := strings.TrimPrefix(rel, "public/share/")
|
||||
hash, subPath, _ := strings.Cut(rest, "/")
|
||||
if !isValidShareHash(hash) {
|
||||
return "", "", false
|
||||
}
|
||||
if subPath != "" {
|
||||
if _, err := utils.SanitizeUserPath(subPath); err != nil {
|
||||
return "", "", false
|
||||
}
|
||||
}
|
||||
|
||||
shareRoot = baseURL + "public/share/" + hash + "/"
|
||||
normalizedStart = startURL
|
||||
if !strings.HasPrefix(normalizedStart, shareRoot) && normalizedStart != strings.TrimSuffix(shareRoot, "/") {
|
||||
return "", "", false
|
||||
}
|
||||
if normalizedStart == baseURL+"public/share/"+hash {
|
||||
normalizedStart = shareRoot
|
||||
}
|
||||
|
||||
return shareRoot, normalizedStart, true
|
||||
}
|
||||
|
||||
// ShareHashFromHTTPPath extracts a share hash from common FileBrowser share routes.
|
||||
func ShareHashFromHTTPPath(path, baseURL string) string {
|
||||
prefixes := []string{
|
||||
strings.TrimSuffix(baseURL, "/") + "/public/share/",
|
||||
"/public/share/",
|
||||
"/share/",
|
||||
}
|
||||
for _, prefix := range prefixes {
|
||||
if !strings.HasPrefix(path, prefix) {
|
||||
continue
|
||||
}
|
||||
rest := strings.TrimPrefix(path, prefix)
|
||||
hash, _, _ := strings.Cut(rest, "/")
|
||||
if isValidShareHash(hash) {
|
||||
return hash
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func sanitizeManifestText(value string) string {
|
||||
if len(value) > maxManifestTextLen {
|
||||
return value[:maxManifestTextLen]
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
// ManifestForShare returns a manifest scoped to a single public share link.
|
||||
func ManifestForShare(baseURL, startURL, name, description string) (PWAManifest, bool) {
|
||||
shareRoot, normalizedStart, ok := ShareRootFromStartURL(baseURL, startURL)
|
||||
if !ok {
|
||||
return PWAManifest{}, false
|
||||
}
|
||||
|
||||
manifest := CachedManifest
|
||||
manifest.StartURL = normalizedStart
|
||||
manifest.Scope = shareRoot
|
||||
manifest.ID = shareRoot
|
||||
|
||||
if name = sanitizeManifestText(strings.TrimSpace(name)); name != "" {
|
||||
manifest.Name = pwaManifestName(name)
|
||||
}
|
||||
if description = sanitizeManifestText(strings.TrimSpace(description)); description != "" {
|
||||
manifest.Description = description
|
||||
}
|
||||
|
||||
return manifest, true
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package icons
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestShareRootFromStartURL(t *testing.T) {
|
||||
baseURL := "/testing/"
|
||||
startURL := "/testing/public/share/abc123XYZ-_/"
|
||||
shareRoot, normalizedStart, ok := ShareRootFromStartURL(baseURL, startURL)
|
||||
if !ok {
|
||||
t.Fatal("expected valid share start URL")
|
||||
}
|
||||
if shareRoot != "/testing/public/share/abc123XYZ-_/" {
|
||||
t.Fatalf("unexpected share root: %q", shareRoot)
|
||||
}
|
||||
if normalizedStart != startURL {
|
||||
t.Fatalf("unexpected normalized start: %q", normalizedStart)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShareRootFromStartURLRejectsTraversal(t *testing.T) {
|
||||
baseURL := "/testing/"
|
||||
startURL := "/testing/public/share/abc123XYZ-_/../secret/"
|
||||
_, _, ok := ShareRootFromStartURL(baseURL, startURL)
|
||||
if ok {
|
||||
t.Fatal("expected traversal path to be rejected")
|
||||
}
|
||||
}
|
||||
|
||||
func TestShareHashFromHTTPPath(t *testing.T) {
|
||||
baseURL := "/testing/"
|
||||
paths := []string{
|
||||
"/testing/public/share/hash1234567890abcdef/",
|
||||
"/public/share/hash1234567890abcdef/files",
|
||||
"/share/hash1234567890abcdef/",
|
||||
}
|
||||
for _, path := range paths {
|
||||
hash := ShareHashFromHTTPPath(path, baseURL)
|
||||
if hash != "hash1234567890abcdef" {
|
||||
t.Fatalf("path %q: got hash %q", path, hash)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestShareHashFromHTTPPathRejectsEmbeddedPrefix(t *testing.T) {
|
||||
baseURL := "/testing/"
|
||||
path := "/evil/route/share/hash1234567890abcdef/"
|
||||
hash := ShareHashFromHTTPPath(path, baseURL)
|
||||
if hash != "" {
|
||||
t.Fatalf("expected empty hash for non-prefixed path, got %q", hash)
|
||||
}
|
||||
}
|
||||
|
||||
func TestManifestForShare(t *testing.T) {
|
||||
CachedManifest = PWAManifest{
|
||||
Name: "FileBrowser Quantum",
|
||||
StartURL: "/testing/",
|
||||
Scope: "/testing/",
|
||||
ID: "/testing/",
|
||||
}
|
||||
|
||||
manifest, ok := ManifestForShare(
|
||||
"/testing/",
|
||||
"/testing/public/share/hash1234567890abcdef/",
|
||||
"My Share",
|
||||
"Shared files",
|
||||
)
|
||||
if !ok {
|
||||
t.Fatal("expected share manifest")
|
||||
}
|
||||
if manifest.StartURL != "/testing/public/share/hash1234567890abcdef/" {
|
||||
t.Fatalf("unexpected start_url: %q", manifest.StartURL)
|
||||
}
|
||||
if manifest.Scope != "/testing/public/share/hash1234567890abcdef/" {
|
||||
t.Fatalf("unexpected scope: %q", manifest.Scope)
|
||||
}
|
||||
if manifest.Name != "My Share" {
|
||||
t.Fatalf("unexpected name: %q", manifest.Name)
|
||||
}
|
||||
}
|
||||
|
||||
func TestManifestForShareTruncatesLongName(t *testing.T) {
|
||||
CachedManifest = PWAManifest{
|
||||
Name: "FileBrowser Quantum",
|
||||
StartURL: "/testing/",
|
||||
Scope: "/testing/",
|
||||
ID: "/testing/",
|
||||
}
|
||||
|
||||
longName := "Shared files - quarterly backup archive 2026"
|
||||
want := "Shared files - quarterly backu"
|
||||
manifest, ok := ManifestForShare(
|
||||
"/testing/",
|
||||
"/testing/public/share/hash1234567890abcdef/",
|
||||
longName,
|
||||
"",
|
||||
)
|
||||
if !ok {
|
||||
t.Fatal("expected share manifest")
|
||||
}
|
||||
if manifest.Name != want {
|
||||
t.Fatalf("expected name %q, got %q", want, manifest.Name)
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,12 @@ func (s *Scanner) executeScan() {
|
||||
s.fullScanCounter = 0
|
||||
}
|
||||
})
|
||||
scanMode := "full"
|
||||
if quick {
|
||||
scanMode = "quick"
|
||||
}
|
||||
logger.Debugf("[%s] scanner [%s] starting %s scan (full/quick cadence step %d of 5)", s.idx.Name, s.scanPath, scanMode, pre+1)
|
||||
|
||||
s.runIndexing(quick)
|
||||
s.updateSchedule()
|
||||
}
|
||||
|
||||
@@ -67,5 +67,4 @@ type ExtendedFileInfo struct {
|
||||
Source string `json:"source,omitempty"` // associated index source for the file
|
||||
Hash string `json:"hash,omitempty"` // hash for the file -- used for sharing
|
||||
RealPath string `json:"-"`
|
||||
PinnedItems []string `json:"pinnedItems,omitempty"` // pinned item names in this directory listing
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package iteminfo
|
||||
|
||||
import "strings"
|
||||
|
||||
type namePatternMode int
|
||||
|
||||
const (
|
||||
patternLazyDefault namePatternMode = iota
|
||||
patternQuotedLiteral
|
||||
patternUserGlob
|
||||
)
|
||||
|
||||
func escapeGlobLiteral(s string) string {
|
||||
var b strings.Builder
|
||||
for _, r := range s {
|
||||
switch r {
|
||||
case '*', '?', '[', '\\':
|
||||
b.WriteByte('\\')
|
||||
b.WriteRune(r)
|
||||
default:
|
||||
b.WriteRune(r)
|
||||
}
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func wrapGlobPattern(s string) string {
|
||||
return "*" + s + "*"
|
||||
}
|
||||
|
||||
// BuildNameGlobPattern converts a search term into a SQLite GLOB pattern for indexed file names.
|
||||
func BuildNameGlobPattern(term string, quoted, useWildcard, exactCase bool) string {
|
||||
if term == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
var mode namePatternMode
|
||||
switch {
|
||||
case useWildcard:
|
||||
mode = patternUserGlob
|
||||
case quoted:
|
||||
mode = patternQuotedLiteral
|
||||
default:
|
||||
mode = patternLazyDefault
|
||||
}
|
||||
|
||||
var pattern string
|
||||
switch mode {
|
||||
case patternUserGlob:
|
||||
pattern = term
|
||||
case patternQuotedLiteral:
|
||||
pattern = wrapGlobPattern(escapeGlobLiteral(term))
|
||||
case patternLazyDefault:
|
||||
parts := strings.Fields(term)
|
||||
if len(parts) == 0 {
|
||||
return ""
|
||||
}
|
||||
escaped := make([]string, len(parts))
|
||||
for i, p := range parts {
|
||||
escaped[i] = escapeGlobLiteral(p)
|
||||
}
|
||||
pattern = wrapGlobPattern(strings.Join(escaped, "*"))
|
||||
}
|
||||
|
||||
if !exactCase {
|
||||
pattern = strings.ToLower(pattern)
|
||||
}
|
||||
return pattern
|
||||
}
|
||||
|
||||
// NameGlobPatternsForSearch builds SQLite name GLOB patterns for the given search options.
|
||||
func NameGlobPatternsForSearch(opts SearchOptions, useWildcard, largest bool) []string {
|
||||
if largest || len(opts.Terms) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
exactCase := opts.Conditions["exact"]
|
||||
var patterns []string
|
||||
for _, t := range opts.Terms {
|
||||
if t == "" {
|
||||
continue
|
||||
}
|
||||
p := BuildNameGlobPattern(t, opts.Quoted, useWildcard, exactCase)
|
||||
if p != "" {
|
||||
patterns = append(patterns, p)
|
||||
}
|
||||
}
|
||||
if len(patterns) == 0 {
|
||||
return nil
|
||||
}
|
||||
return patterns
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package iteminfo
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestBuildNameGlobPattern(t *testing.T) {
|
||||
tests := []struct {
|
||||
term string
|
||||
quoted bool
|
||||
useWildcard bool
|
||||
exactCase bool
|
||||
want string
|
||||
}{
|
||||
{"cons", false, false, false, "*cons*"},
|
||||
{"new folder", false, false, false, "*new*folder*"},
|
||||
{"new folder", true, false, false, "*new folder*"},
|
||||
{"new*folder", false, true, false, "new*folder"},
|
||||
{"Blade Runner", false, false, false, "*blade*runner*"},
|
||||
{"Blade Runner", false, false, true, "*Blade*Runner*"},
|
||||
{"test[1]", false, false, false, "*test\\[1]*"},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
got := BuildNameGlobPattern(tt.term, tt.quoted, tt.useWildcard, tt.exactCase)
|
||||
if got != tt.want {
|
||||
t.Errorf("BuildNameGlobPattern(%q, quoted=%v, wildcard=%v, exact=%v) = %q, want %q",
|
||||
tt.term, tt.quoted, tt.useWildcard, tt.exactCase, got, tt.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNameGlobPatternsForSearch(t *testing.T) {
|
||||
opts := SearchOptions{
|
||||
Terms: []string{"house", "car"},
|
||||
}
|
||||
patterns := NameGlobPatternsForSearch(opts, false, false)
|
||||
if len(patterns) != 2 || patterns[0] != "*house*" || patterns[1] != "*car*" {
|
||||
t.Fatalf("unexpected patterns: %#v", patterns)
|
||||
}
|
||||
|
||||
optsQuoted := SearchOptions{
|
||||
Terms: []string{"new folder"},
|
||||
Quoted: true,
|
||||
}
|
||||
patterns = NameGlobPatternsForSearch(optsQuoted, false, false)
|
||||
if len(patterns) != 1 || patterns[0] != "*new folder*" {
|
||||
t.Fatalf("unexpected quoted patterns: %#v", patterns)
|
||||
}
|
||||
|
||||
optsLargest := SearchOptions{Terms: []string{"test"}}
|
||||
if p := NameGlobPatternsForSearch(optsLargest, false, true); p != nil {
|
||||
t.Fatalf("largest mode should return nil patterns, got %#v", p)
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,6 @@ type SearchOptions struct {
|
||||
// MatchAllTerms, when true and non-wildcard search, an item must contain every term (AND). When false (default), any term matches (OR).
|
||||
// For name GLOB wildcard search, name must match every pattern when true; when false, patterns are OR-combined in SQL.
|
||||
MatchAllTerms bool
|
||||
// Quoted is true when the search query was a double-quoted phrase; spaces are kept literal in name matching.
|
||||
Quoted bool
|
||||
}
|
||||
|
||||
// BuildSearchOptionsFromQuery merges optional repeated literal terms (HTTP "terms" parameters) with structured filter text ("query" prefix).
|
||||
@@ -121,7 +119,6 @@ func ParseSearch(value string) SearchOptions {
|
||||
unique = strings.TrimSuffix(unique, "\"")
|
||||
|
||||
opts.Terms = []string{unique}
|
||||
opts.Quoted = true
|
||||
return opts
|
||||
}
|
||||
value = strings.TrimSpace(value)
|
||||
|
||||
+27
-12
@@ -55,11 +55,10 @@ func (idx *Index) SearchParsed(baseOpts iteminfo.SearchOptions, scope string, so
|
||||
searchOptions.Terms = []string{""}
|
||||
}
|
||||
|
||||
nameGlobPatterns := iteminfo.NameGlobPatternsForSearch(searchOptions, useWildcard, largest)
|
||||
caseExact := searchOptions.Conditions["exact"]
|
||||
globAnd := len(nameGlobPatterns) > 0 && searchOptions.MatchAllTerms
|
||||
nameGlobPatterns := nameGlobPatternsForSearch(searchOptions, useWildcard, largest)
|
||||
globAnd := useWildcard && searchOptions.MatchAllTerms
|
||||
|
||||
rows, err := idx.db.SearchItems(idx.Name, scope, largest, nameGlobPatterns, globAnd, caseExact)
|
||||
rows, err := idx.db.SearchItems(idx.Name, scope, largest, nameGlobPatterns, globAnd)
|
||||
if err != nil {
|
||||
return []*SearchResult{}
|
||||
}
|
||||
@@ -96,7 +95,7 @@ func (idx *Index) SearchParsed(baseOpts iteminfo.SearchOptions, scope string, so
|
||||
HasPreview: hasPreview,
|
||||
}
|
||||
|
||||
matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, nameGlobPatterns)
|
||||
matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, useWildcard, nameGlobPatterns)
|
||||
|
||||
if matches {
|
||||
resType := mimeType
|
||||
@@ -128,7 +127,7 @@ func (idx *Index) SearchParsed(baseOpts iteminfo.SearchOptions, scope string, so
|
||||
return sortedKeys
|
||||
}
|
||||
|
||||
func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions iteminfo.SearchOptions, largest bool, nameGlobPatterns []string) bool {
|
||||
func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions iteminfo.SearchOptions, largest, useWildcard bool, nameGlobPatterns []string) bool {
|
||||
if largest {
|
||||
largerThan := int64(searchOptions.LargerThan) * 1024 * 1024
|
||||
sizeMatches := largerThan == 0 || item.Size > largerThan
|
||||
@@ -142,7 +141,7 @@ func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions
|
||||
dateMatches := searchDateMatches(item.ModTime.Unix(), searchOptions)
|
||||
return sizeMatches && typeMatches && dateMatches
|
||||
}
|
||||
if len(nameGlobPatterns) > 0 {
|
||||
if useWildcard && len(nameGlobPatterns) > 0 {
|
||||
return item.MatchesSearchAuxiliaryFilters(searchOptions)
|
||||
}
|
||||
if searchOptions.MatchAllTerms {
|
||||
@@ -169,6 +168,23 @@ func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions
|
||||
return false
|
||||
}
|
||||
|
||||
// nameGlobPatternsForSearch builds non-empty parsed terms for SQLite name GLOB OR clauses.
|
||||
func nameGlobPatternsForSearch(opts iteminfo.SearchOptions, useWildcard, largest bool) []string {
|
||||
if largest || !useWildcard || len(opts.Terms) == 0 {
|
||||
return nil
|
||||
}
|
||||
var patterns []string
|
||||
for _, t := range opts.Terms {
|
||||
if t != "" {
|
||||
patterns = append(patterns, t)
|
||||
}
|
||||
}
|
||||
if len(patterns) == 0 {
|
||||
return nil
|
||||
}
|
||||
return patterns
|
||||
}
|
||||
|
||||
func searchDateMatches(modUnix int64, opts iteminfo.SearchOptions) bool {
|
||||
if opts.ModifiedNewerThan > 0 && modUnix < opts.ModifiedNewerThan {
|
||||
return false
|
||||
@@ -218,11 +234,10 @@ func SearchMultiSourcesParsed(baseOpts iteminfo.SearchOptions, sources []string,
|
||||
searchOptions.Terms = []string{""}
|
||||
}
|
||||
|
||||
nameGlobPatterns := iteminfo.NameGlobPatternsForSearch(searchOptions, useWildcard, largest)
|
||||
caseExact := searchOptions.Conditions["exact"]
|
||||
globAnd := len(nameGlobPatterns) > 0 && searchOptions.MatchAllTerms
|
||||
nameGlobPatterns := nameGlobPatternsForSearch(searchOptions, useWildcard, largest)
|
||||
globAnd := useWildcard && searchOptions.MatchAllTerms
|
||||
|
||||
rows, err := db.SearchItemsMultiSource(sources, normalizedScopes, largest, nameGlobPatterns, globAnd, caseExact)
|
||||
rows, err := db.SearchItemsMultiSource(sources, normalizedScopes, largest, nameGlobPatterns, globAnd)
|
||||
if err != nil {
|
||||
return []*SearchResult{}
|
||||
}
|
||||
@@ -260,7 +275,7 @@ func SearchMultiSourcesParsed(baseOpts iteminfo.SearchOptions, sources []string,
|
||||
HasPreview: hasPreview,
|
||||
}
|
||||
|
||||
matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, nameGlobPatterns)
|
||||
matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, useWildcard, nameGlobPatterns)
|
||||
|
||||
if matches {
|
||||
resType := mimeType
|
||||
|
||||
@@ -116,14 +116,6 @@ func TestParseSearch(t *testing.T) {
|
||||
Terms: []string{"thisfile"},
|
||||
},
|
||||
},
|
||||
{
|
||||
input: `"new folder"`,
|
||||
want: iteminfo.SearchOptions{
|
||||
Conditions: map[string]bool{"exact": false},
|
||||
Terms: []string{"new folder"},
|
||||
Quoted: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
input: "type:olderThan=2024-06-01 type:newerThan=2024-01-01 findme",
|
||||
want: iteminfo.SearchOptions{
|
||||
@@ -274,13 +266,6 @@ func TestSearchIndexes(t *testing.T) {
|
||||
{ItemInfo: iteminfo.ItemInfo{Name: "toggle.gif", Size: 65536, Type: "image/gif"}},
|
||||
},
|
||||
},
|
||||
"/media/": {
|
||||
ItemInfo: iteminfo.ItemInfo{Name: "media", Type: "directory"},
|
||||
Files: []iteminfo.ExtendedItemInfo{
|
||||
{ItemInfo: iteminfo.ItemInfo{Name: "Blade.Runner.mkv", Type: "video"}},
|
||||
{ItemInfo: iteminfo.ItemInfo{Name: "new.folder.txt", Type: "text"}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Insert all directories and files into database
|
||||
@@ -477,65 +462,6 @@ func TestSearchIndexes(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
search: "Blade Runner",
|
||||
scope: "/media/",
|
||||
expectedResult: []*SearchResult{
|
||||
{
|
||||
Path: "/media/Blade.Runner.mkv",
|
||||
Type: "video",
|
||||
Size: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
search: "new folder",
|
||||
scope: "/media/",
|
||||
expectedResult: []*SearchResult{
|
||||
{
|
||||
Path: "/media/new.folder.txt",
|
||||
Type: "text",
|
||||
Size: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
search: "new folder",
|
||||
scope: "/",
|
||||
expectedResult: []*SearchResult{
|
||||
{
|
||||
Path: "/new+folder/",
|
||||
Type: "directory",
|
||||
Size: 0,
|
||||
},
|
||||
{
|
||||
Path: "/media/new.folder.txt",
|
||||
Type: "text",
|
||||
Size: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
search: `"new folder"`,
|
||||
scope: "/media/",
|
||||
expectedResult: []*SearchResult{},
|
||||
},
|
||||
{
|
||||
search: "VIDEO",
|
||||
scope: "/new/test/",
|
||||
expectedResult: []*SearchResult{
|
||||
{
|
||||
Path: "/new/test/video.MP4",
|
||||
Type: "video",
|
||||
Size: 0,
|
||||
},
|
||||
{
|
||||
Path: "/new/test/video.mp4",
|
||||
Type: "video",
|
||||
Size: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
@@ -555,59 +481,6 @@ func TestSearchIndexes(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSearchUserGlob(t *testing.T) {
|
||||
if indexDB == nil {
|
||||
var err error
|
||||
indexDB, _, err = dbsql.NewIndexDB("test_search_glob", "OFF", 1000, 32, false)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create test database: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
index := Index{
|
||||
Source: settings.Source{
|
||||
Name: "test_search_glob",
|
||||
Path: "/mock/path",
|
||||
},
|
||||
db: indexDB,
|
||||
mock: true,
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
directories := map[string]*iteminfo.FileInfo{
|
||||
"/media/": {
|
||||
ItemInfo: iteminfo.ItemInfo{Name: "media", Type: "directory"},
|
||||
Files: []iteminfo.ExtendedItemInfo{
|
||||
{ItemInfo: iteminfo.ItemInfo{Name: "NEW-folder", Type: "text"}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for path, dirInfo := range directories {
|
||||
dirInfo.Path = path
|
||||
if dirInfo.ModTime.IsZero() {
|
||||
dirInfo.ModTime = now
|
||||
}
|
||||
_ = index.db.InsertItem("test_search_glob", path, dirInfo)
|
||||
for _, file := range dirInfo.Files {
|
||||
filePath := strings.TrimSuffix(path, "/") + "/" + file.Name
|
||||
fileInfo := &iteminfo.FileInfo{
|
||||
Path: filePath,
|
||||
ItemInfo: file.ItemInfo,
|
||||
}
|
||||
if fileInfo.ModTime.IsZero() {
|
||||
fileInfo.ModTime = now
|
||||
}
|
||||
_ = index.db.InsertItem("test_search_glob", filePath, fileInfo)
|
||||
}
|
||||
}
|
||||
|
||||
result := index.Search("new*folder", "/media/", "", false, DefaultSearchResults, 0, 0, true)
|
||||
if len(result) != 1 || result[0].Path != "/media/NEW-folder" {
|
||||
t.Fatalf("expected new*folder to match NEW-folder, got %#v", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSearchLargestModeExcludesRoot(t *testing.T) {
|
||||
// Initialize the database if not already done
|
||||
if indexDB == nil {
|
||||
|
||||
@@ -3600,70 +3600,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/users/pinnedItems": {
|
||||
"patch": {
|
||||
"description": "Patches one pinned item at a time. Defaults to add; pass ?action=remove to unpin.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"summary": "Add or remove a pinned item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "add (default) or remove",
|
||||
"name": "action",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"description": "Pinned item",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/http.pinnedItemPatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
"get": {
|
||||
"description": "Returns the health status of the API.",
|
||||
@@ -4630,86 +4566,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/public/api/share/pinnedItems": {
|
||||
"patch": {
|
||||
"description": "Patches one pinned item at a time for share owners. Defaults to add; pass ?action=remove to unpin.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Shares"
|
||||
],
|
||||
"summary": "Add or remove a pinned item on a share",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Share hash",
|
||||
"name": "hash",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "add (default) or remove",
|
||||
"name": "action",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"description": "Pinned item",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/http.sharePinnedItemPatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Share not found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -5003,9 +4859,6 @@ const docTemplate = `{
|
||||
"perUserDownloadLimit": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"$ref": "#/definitions/share.PinnedItems"
|
||||
},
|
||||
"quickDownload": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -5181,44 +5034,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"http.pinnedItemPatchRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"path",
|
||||
"source"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "item basename within path",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "scope-relative parent directory",
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"http.sharePinnedItemPatchRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "item basename within path",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "share-relative parent directory",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"http.unarchiveRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5335,13 +5150,6 @@ const docTemplate = `{
|
||||
"description": "path scoped to the associated index",
|
||||
"type": "string"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"description": "pinned item names in this directory listing",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"description": "length in bytes for regular files",
|
||||
"type": "integer"
|
||||
@@ -5784,7 +5592,7 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "display name, PWA installation name is capped at 30 characters",
|
||||
"description": "display name",
|
||||
"type": "string"
|
||||
},
|
||||
"oidcLoginButtonText": {
|
||||
@@ -7383,9 +7191,6 @@ const docTemplate = `{
|
||||
"perUserDownloadLimit": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"$ref": "#/definitions/share.PinnedItems"
|
||||
},
|
||||
"quickDownload": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -7446,15 +7251,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"share.PinnedItems": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"users.AuthToken": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7794,7 +7590,12 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/users.Permissions"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"$ref": "#/definitions/users.PinnedItems"
|
||||
"description": "pinned items organized by source and directory path",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/users.PinnedItems"
|
||||
}
|
||||
]
|
||||
},
|
||||
"preferEditorForMarkdown": {
|
||||
"description": "prefer editor first for markdown files instead of the Markdown Viewer",
|
||||
|
||||
@@ -3589,70 +3589,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/users/pinnedItems": {
|
||||
"patch": {
|
||||
"description": "Patches one pinned item at a time. Defaults to add; pass ?action=remove to unpin.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"summary": "Add or remove a pinned item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "add (default) or remove",
|
||||
"name": "action",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"description": "Pinned item",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/http.pinnedItemPatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
"get": {
|
||||
"description": "Returns the health status of the API.",
|
||||
@@ -4619,86 +4555,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/public/api/share/pinnedItems": {
|
||||
"patch": {
|
||||
"description": "Patches one pinned item at a time for share owners. Defaults to add; pass ?action=remove to unpin.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Shares"
|
||||
],
|
||||
"summary": "Add or remove a pinned item on a share",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Share hash",
|
||||
"name": "hash",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "add (default) or remove",
|
||||
"name": "action",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"description": "Pinned item",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/http.sharePinnedItemPatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Share not found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -4992,9 +4848,6 @@
|
||||
"perUserDownloadLimit": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"$ref": "#/definitions/share.PinnedItems"
|
||||
},
|
||||
"quickDownload": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -5170,44 +5023,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"http.pinnedItemPatchRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"path",
|
||||
"source"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "item basename within path",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "scope-relative parent directory",
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"http.sharePinnedItemPatchRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "item basename within path",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "share-relative parent directory",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"http.unarchiveRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5324,13 +5139,6 @@
|
||||
"description": "path scoped to the associated index",
|
||||
"type": "string"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"description": "pinned item names in this directory listing",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"description": "length in bytes for regular files",
|
||||
"type": "integer"
|
||||
@@ -5773,7 +5581,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "display name, PWA installation name is capped at 30 characters",
|
||||
"description": "display name",
|
||||
"type": "string"
|
||||
},
|
||||
"oidcLoginButtonText": {
|
||||
@@ -7372,9 +7180,6 @@
|
||||
"perUserDownloadLimit": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"$ref": "#/definitions/share.PinnedItems"
|
||||
},
|
||||
"quickDownload": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -7435,15 +7240,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"share.PinnedItems": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"users.AuthToken": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7783,7 +7579,12 @@
|
||||
"$ref": "#/definitions/users.Permissions"
|
||||
},
|
||||
"pinnedItems": {
|
||||
"$ref": "#/definitions/users.PinnedItems"
|
||||
"description": "pinned items organized by source and directory path",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/users.PinnedItems"
|
||||
}
|
||||
]
|
||||
},
|
||||
"preferEditorForMarkdown": {
|
||||
"description": "prefer editor first for markdown files instead of the Markdown Viewer",
|
||||
|
||||
@@ -193,8 +193,6 @@ definitions:
|
||||
type: boolean
|
||||
perUserDownloadLimit:
|
||||
type: boolean
|
||||
pinnedItems:
|
||||
$ref: '#/definitions/share.PinnedItems'
|
||||
quickDownload:
|
||||
type: boolean
|
||||
shareTheme:
|
||||
@@ -326,33 +324,6 @@ definitions:
|
||||
- $ref: '#/definitions/http.fileWatchMetadata'
|
||||
description: File metadata for non-text files
|
||||
type: object
|
||||
http.pinnedItemPatchRequest:
|
||||
properties:
|
||||
name:
|
||||
description: item basename within path
|
||||
type: string
|
||||
path:
|
||||
description: scope-relative parent directory
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- path
|
||||
- source
|
||||
type: object
|
||||
http.sharePinnedItemPatchRequest:
|
||||
properties:
|
||||
name:
|
||||
description: item basename within path
|
||||
type: string
|
||||
path:
|
||||
description: share-relative parent directory
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- path
|
||||
type: object
|
||||
http.unarchiveRequest:
|
||||
properties:
|
||||
deleteAfter:
|
||||
@@ -439,11 +410,6 @@ definitions:
|
||||
path:
|
||||
description: path scoped to the associated index
|
||||
type: string
|
||||
pinnedItems:
|
||||
description: pinned item names in this directory listing
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
size:
|
||||
description: length in bytes for regular files
|
||||
type: integer
|
||||
@@ -784,7 +750,7 @@ definitions:
|
||||
description: path to an image file for the login page icon
|
||||
type: string
|
||||
name:
|
||||
description: display name, PWA installation name is capped at 30 characters
|
||||
description: display name
|
||||
type: string
|
||||
oidcLoginButtonText:
|
||||
description: text to display on the OIDC login button
|
||||
@@ -1981,8 +1947,6 @@ definitions:
|
||||
type: string
|
||||
perUserDownloadLimit:
|
||||
type: boolean
|
||||
pinnedItems:
|
||||
$ref: '#/definitions/share.PinnedItems'
|
||||
quickDownload:
|
||||
type: boolean
|
||||
shareTheme:
|
||||
@@ -2029,12 +1993,6 @@ definitions:
|
||||
"gallery"'
|
||||
type: string
|
||||
type: object
|
||||
share.PinnedItems:
|
||||
additionalProperties:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
users.AuthToken:
|
||||
properties:
|
||||
Permissions:
|
||||
@@ -2278,7 +2236,9 @@ definitions:
|
||||
permissions:
|
||||
$ref: '#/definitions/users.Permissions'
|
||||
pinnedItems:
|
||||
$ref: '#/definitions/users.PinnedItems'
|
||||
allOf:
|
||||
- $ref: '#/definitions/users.PinnedItems'
|
||||
description: pinned items organized by source and directory path
|
||||
preferEditorForMarkdown:
|
||||
description: prefer editor first for markdown files instead of the Markdown
|
||||
Viewer
|
||||
@@ -4898,49 +4858,6 @@ paths:
|
||||
summary: Update a user's details
|
||||
tags:
|
||||
- Users
|
||||
/api/users/pinnedItems:
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Patches one pinned item at a time. Defaults to add; pass ?action=remove
|
||||
to unpin.
|
||||
parameters:
|
||||
- description: add (default) or remove
|
||||
in: query
|
||||
name: action
|
||||
type: string
|
||||
- description: Pinned item
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/http.pinnedItemPatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Add or remove a pinned item
|
||||
tags:
|
||||
- Users
|
||||
/health:
|
||||
get:
|
||||
consumes:
|
||||
@@ -5609,58 +5526,4 @@ paths:
|
||||
summary: Get share information by hash
|
||||
tags:
|
||||
- Shares
|
||||
/public/api/share/pinnedItems:
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Patches one pinned item at a time for share owners. Defaults to
|
||||
add; pass ?action=remove to unpin.
|
||||
parameters:
|
||||
- description: Share hash
|
||||
in: query
|
||||
name: hash
|
||||
required: true
|
||||
type: string
|
||||
- description: add (default) or remove
|
||||
in: query
|
||||
name: action
|
||||
type: string
|
||||
- description: Pinned item
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/http.sharePinnedItemPatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"404":
|
||||
description: Share not found
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Add or remove a pinned item on a share
|
||||
tags:
|
||||
- Shares
|
||||
swagger: "2.0"
|
||||
@@ -5,7 +5,6 @@ import pluginVue from "eslint-plugin-vue";
|
||||
import vueI18n from '@intlify/eslint-plugin-vue-i18n';
|
||||
import vueParser from "vue-eslint-parser";
|
||||
import globals from "globals";
|
||||
import security from "eslint-plugin-security";
|
||||
|
||||
export default defineConfig(
|
||||
{
|
||||
@@ -13,7 +12,7 @@ export default defineConfig(
|
||||
"**/dist/**",
|
||||
"**/node_modules/**",
|
||||
"**/public/**",
|
||||
"**/*.json",
|
||||
"**/i18n/is.json",
|
||||
],
|
||||
},
|
||||
|
||||
@@ -22,7 +21,6 @@ export default defineConfig(
|
||||
...tseslint.configs.recommended,
|
||||
...pluginVue.configs["flat/essential"],
|
||||
...vueI18n.configs.recommended,
|
||||
security.configs.recommended,
|
||||
|
||||
// i18n
|
||||
{
|
||||
@@ -77,13 +75,8 @@ export default defineConfig(
|
||||
"prefer-template": "warn",
|
||||
"@typescript-eslint/consistent-type-definitions": "warn",
|
||||
"@typescript-eslint/prefer-optional-chain": "warn",
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-unnecessary-condition": "off", // this one is useful, but is pretty noisy and found lot of false positives
|
||||
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||
"@typescript-eslint/no-misused-promises": "error",
|
||||
"prefer-object-has-own": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-restricted-globals": [
|
||||
"error",
|
||||
{ name: "isNaN", message: "Use Number.isNaN instead." },
|
||||
@@ -125,20 +118,6 @@ export default defineConfig(
|
||||
"vue/require-v-for-key": "error",
|
||||
"vue/no-reserved-component-names": "off",
|
||||
"vue/no-unused-components": "warn",
|
||||
//"vue/no-v-html": "warn",
|
||||
"vue/no-v-text-v-html-on-component": "warn",
|
||||
},
|
||||
},
|
||||
// Relax the rules a bit for tests files
|
||||
{
|
||||
files: ["tests/**/*.ts", "**/*.spec.ts", "**/*.test.ts"],
|
||||
rules: {
|
||||
"preserve-caught-error": "off",
|
||||
"no-empty-pattern": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "none" }],
|
||||
"no-unused-expressions": "off",
|
||||
"security/detect-non-literal-regexp": "off",
|
||||
},
|
||||
},
|
||||
);
|
||||
Generated
+471
-576
File diff suppressed because it is too large.
Load diff
@@ -50,12 +50,10 @@
|
||||
"@intlify/eslint-plugin-vue-i18n": "^4.4.0",
|
||||
"@intlify/unplugin-vue-i18n": "^11.2.3",
|
||||
"@playwright/test": "^1.54.1",
|
||||
"@types/eslint-plugin-security": "^3.0.1",
|
||||
"@types/node": "^24.1.0",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"deepl-node": "^1.16.0",
|
||||
"eslint": "^10.4.0",
|
||||
"eslint-plugin-security": "^4.0.0",
|
||||
"eslint-plugin-vue": "^10.9.1",
|
||||
"fs-extra": "^11.3.0",
|
||||
"globals": "^17.6.0",
|
||||
|
||||
@@ -131,7 +131,7 @@ auth:
|
||||
adminPassword: "admin" # secret: the password of the admin user. If not set, the default is "admin".
|
||||
totpSecret: "" # secret: secret used to encrypt TOTP secrets
|
||||
frontend:
|
||||
name: "FileBrowser Quantum" # display name, PWA installation name is capped at 30 characters
|
||||
name: "FileBrowser Quantum" # display name
|
||||
disableDefaultLinks: false # disable default links in the sidebar
|
||||
disableUsedPercentage: false # disable used percentage for the sources in the sidebar
|
||||
externalLinks:
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<meta name="theme-color" content="{{ .htmlVars.color }}">
|
||||
|
||||
<!-- Add to home screen for Safari on iOS/iPadOS -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="assets">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ .htmlVars.appIcon }}">
|
||||
@@ -52,12 +51,6 @@
|
||||
<!-- Injected variables come from backend server -->
|
||||
<script>
|
||||
window.globalVars = {{ .globalVars }};
|
||||
window.__pwaDeferredPrompt = null;
|
||||
window.addEventListener("beforeinstallprompt", function (event) {
|
||||
event.preventDefault();
|
||||
window.__pwaDeferredPrompt = event;
|
||||
window.dispatchEvent(new Event("pwa-install-available"));
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable security/detect-object-injection */
|
||||
// scripts/sync-translations.js
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { fetchURL } from "./utils";
|
||||
*/
|
||||
export async function createArchive(opts) {
|
||||
const { fromSource, toSource, paths, destination, format, compression, deleteAfter } = opts;
|
||||
if (!fromSource || !Array.isArray(paths) || paths.length === 0 || !destination) {
|
||||
if (!fromSource || !paths?.length || !destination) {
|
||||
throw new Error("fromSource, paths, and destination are required");
|
||||
}
|
||||
const body = {
|
||||
|
||||
+27
-28
@@ -14,33 +14,29 @@ export async function login(username, password, recaptcha, otp) {
|
||||
password = ''
|
||||
}
|
||||
|
||||
const params = { username, recaptcha };
|
||||
const apiPath = getApiPath('auth/login', params);
|
||||
const res = await fetch(apiPath, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'X-Password': encodeURIComponent(password),
|
||||
'X-Secret': otp,
|
||||
}
|
||||
});
|
||||
|
||||
const bodyText = await res.text();
|
||||
let body;
|
||||
|
||||
try {
|
||||
const params = { username, recaptcha };
|
||||
const apiPath = getApiPath('auth/login', params);
|
||||
const res = await fetch(apiPath, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'X-Password': encodeURIComponent(password),
|
||||
'X-Secret': otp,
|
||||
}
|
||||
});
|
||||
body = JSON.parse(bodyText);
|
||||
} catch {
|
||||
body = { message: bodyText };
|
||||
}
|
||||
|
||||
const bodyText = await res.text();
|
||||
let body;
|
||||
|
||||
try {
|
||||
body = JSON.parse(bodyText);
|
||||
} catch {
|
||||
body = { message: bodyText };
|
||||
}
|
||||
|
||||
if (res.status !== 200) {
|
||||
const msg = body.message || 'Forbidden';
|
||||
throw new Error(msg);
|
||||
}
|
||||
} catch (err) {
|
||||
throw err instanceof Error ? err : new Error(String(err));
|
||||
if (res.status !== 200) {
|
||||
const msg = body.message || 'Forbidden';
|
||||
throw new Error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,10 +171,10 @@ export async function createApiKey(params) {
|
||||
}
|
||||
|
||||
// DELETE /api/auth/token
|
||||
export async function deleteApiKey(params) {
|
||||
export function deleteApiKey(params) {
|
||||
try {
|
||||
const apiPath = getApiPath('auth/token', params)
|
||||
await fetchURL(apiPath, {
|
||||
fetchURL(apiPath, {
|
||||
method: 'DELETE'
|
||||
})
|
||||
} catch (err) {
|
||||
@@ -201,7 +197,10 @@ function base64ToArrayBuffer(base64url) {
|
||||
let base64 = base64url.replace(/-/g, '+').replace(/_/g, '/')
|
||||
while (base64.length % 4) base64 += '='
|
||||
const binary = atob(base64)
|
||||
const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0))
|
||||
const bytes = new Uint8Array(binary.length)
|
||||
for (let i = 0; i < binary.length; i++) {
|
||||
bytes[i] = binary.charCodeAt(i)
|
||||
}
|
||||
return bytes.buffer
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export async function getConfig(req) {
|
||||
}
|
||||
|
||||
// POST /api/office/callback or /public/api/office/callback
|
||||
export async function callback(params, hash) {
|
||||
export async function callback(params, hash = null) {
|
||||
try {
|
||||
let apiPath
|
||||
if (hash) {
|
||||
|
||||
@@ -2,13 +2,8 @@ import { notify } from '@/notify'
|
||||
import { mutations, state } from '@/store'
|
||||
import { globalVars } from '@/utils/constants'
|
||||
import { downloadManager } from '@/utils/downloadManager'
|
||||
import {
|
||||
notifyDownloadComplete,
|
||||
notifyDownloadError,
|
||||
} from '@/utils/appNotifications'
|
||||
import { getApiPath, getPublicApiPath } from '@/utils/url.js'
|
||||
import { adjustedData, fetchURL } from './utils'
|
||||
import { getObjectProperty } from '@/utils/object'
|
||||
|
||||
export { fetchPreviewImage } from '@/utils/previewRequests'
|
||||
|
||||
@@ -58,7 +53,7 @@ export async function getItems(source, path, only = "") {
|
||||
* Registers a graceful pause for the active chunked upload at this path.
|
||||
* Call immediately before aborting the chunk XHR so the server keeps partial data.
|
||||
*/
|
||||
export async function signalUploadPause(source, path, shareHash) {
|
||||
export async function signalUploadPause(source, path, shareHash = null) {
|
||||
if (shareHash) {
|
||||
const apiPath = getPublicApiPath('resources/pause', {
|
||||
hash: shareHash,
|
||||
@@ -502,7 +497,7 @@ async function downloadChunkedArchive(url, format, files, filePaths, source, sha
|
||||
|
||||
downloadManager.setStatus(downloadId, 'downloading')
|
||||
|
||||
const hasDownloadPrompt = state.prompts.some((h) => h.name === 'download')
|
||||
const hasDownloadPrompt = state.prompts?.some((h) => h.name === 'download')
|
||||
if (!hasDownloadPrompt) {
|
||||
mutations.showPrompt({ name: 'download' })
|
||||
}
|
||||
@@ -535,7 +530,6 @@ async function downloadChunkedArchive(url, format, files, filePaths, source, sha
|
||||
|
||||
downloadManager.setStatus(downloadId, 'completed')
|
||||
downloadManager.updateProgress(downloadId, fileSize, fileSize)
|
||||
notifyDownloadComplete(fileName, fileSize)
|
||||
|
||||
setTimeout(() => {
|
||||
document.body.removeChild(link)
|
||||
@@ -550,7 +544,6 @@ async function downloadChunkedArchive(url, format, files, filePaths, source, sha
|
||||
const message =
|
||||
error instanceof Error ? error.message || 'Unknown error' : String(error)
|
||||
downloadManager.setError(downloadId, message)
|
||||
notifyDownloadError(fileName, message)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -592,7 +585,7 @@ async function downloadChunked(file, shareHash = "") {
|
||||
downloadManager.setStatus(downloadId, "downloading")
|
||||
|
||||
// Show download prompt if not already shown (it should already be shown by downloadFiles, but check to be safe)
|
||||
const hasDownloadPrompt = state.prompts.some(h => h.name === 'download');
|
||||
const hasDownloadPrompt = state.prompts?.some(h => h.name === 'download');
|
||||
|
||||
if (!hasDownloadPrompt) {
|
||||
mutations.showPrompt({ name: 'download' })
|
||||
@@ -627,7 +620,6 @@ async function downloadChunked(file, shareHash = "") {
|
||||
const dlDone = downloadManager.findById(downloadId)
|
||||
const finalSize = dlDone?.size ?? fileSize
|
||||
downloadManager.updateProgress(downloadId, finalSize, finalSize)
|
||||
notifyDownloadComplete(fileName, finalSize)
|
||||
|
||||
setTimeout(() => {
|
||||
document.body.removeChild(link)
|
||||
@@ -644,7 +636,6 @@ async function downloadChunked(file, shareHash = "") {
|
||||
const message =
|
||||
error instanceof Error ? error.message || "Unknown error" : String(error)
|
||||
downloadManager.setError(downloadId, message)
|
||||
notifyDownloadError(fileName, message)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -672,9 +663,9 @@ export function post(
|
||||
const request = new XMLHttpRequest();
|
||||
request.open("POST", apiPath, true);
|
||||
|
||||
Object.entries(headers).forEach(([header, value]) => {
|
||||
request.setRequestHeader(header, value);
|
||||
});
|
||||
for (const header in headers) {
|
||||
request.setRequestHeader(header, headers[header]);
|
||||
}
|
||||
|
||||
if (typeof onupload === "function") {
|
||||
request.upload.onprogress = (event) => {
|
||||
@@ -817,7 +808,7 @@ export async function checksum(source, path, algo) {
|
||||
const apiPath = getApiPath('resources', params)
|
||||
const res = await fetchURL(apiPath)
|
||||
const data = await res.json()
|
||||
return getObjectProperty(data.checksums, algo)
|
||||
return data.checksums[algo]
|
||||
} catch (err) {
|
||||
notify.showError(err.message || 'Error fetching checksum')
|
||||
throw err
|
||||
@@ -871,7 +862,7 @@ export function getPreviewURL(source, path, modified) {
|
||||
// POST /api/resources/archive - Create an archive
|
||||
export async function createArchive(opts) {
|
||||
const { fromSource, toSource, paths, destination, format, compression, deleteAfter } = opts;
|
||||
if (!fromSource || !Array.isArray(paths) || paths.length === 0 || !destination) {
|
||||
if (!fromSource || !paths?.length || !destination) {
|
||||
throw new Error("fromSource, paths, and destination are required");
|
||||
}
|
||||
const body = {
|
||||
@@ -1060,10 +1051,9 @@ export function postPublic(
|
||||
const request = new XMLHttpRequest();
|
||||
request.open("POST", apiPath, true);
|
||||
|
||||
Object.entries(headers).forEach(([header, value]) => {
|
||||
request.setRequestHeader(header, value);
|
||||
});
|
||||
|
||||
for (const header in headers) {
|
||||
request.setRequestHeader(header, headers[header]);
|
||||
}
|
||||
if (typeof onupload === "function") {
|
||||
request.upload.onprogress = (event) => {
|
||||
if (event.lengthComputable) {
|
||||
@@ -1174,7 +1164,7 @@ export async function bulkDeletePublic(items) {
|
||||
throw new Error('items array is required and must not be empty')
|
||||
}
|
||||
|
||||
const hash = state.shareInfo.hash;
|
||||
const hash = state.shareInfo?.hash;
|
||||
if (!hash) {
|
||||
throw new Error('share hash is required')
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ export async function create(bodyObj = {}) {
|
||||
const apiPath = getApiPath("share");
|
||||
return await fetchJSON(apiPath, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(bodyObj),
|
||||
body: JSON.stringify(bodyObj || {}),
|
||||
});
|
||||
} catch (/** @type {any} */ err) {
|
||||
notify.showError(err.message || "Error creating share");
|
||||
@@ -124,14 +124,3 @@ export async function getShareInfoPublic(hash) {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
// PATCH /public/api/share/pinnedItems (add by default; ?action=remove to unpin)
|
||||
export async function patchPinnedItem({ hash, path, name, action = 'add' }) {
|
||||
const params = { hash, action }
|
||||
const apiPath = getPublicApiPath('share/pinnedItems', params)
|
||||
await fetchURL(apiPath, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ path, name }),
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
})
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { fetchURL, fetchJSON } from '@/api/utils'
|
||||
import { getApiPath, getPublicApiPath } from '@/utils/url.js'
|
||||
import { getObjectProperty, setObjectProperty } from '@/utils/object'
|
||||
import { notify } from '@/notify'
|
||||
import { state } from '@/store/state.js'
|
||||
import { mutations } from '@/store/mutations.js'
|
||||
@@ -108,9 +107,8 @@ export async function update(user, which = ['all'], options = {}) {
|
||||
if (which.length !== 1 || which[0] !== 'all') {
|
||||
userData = {}
|
||||
which.forEach(key => {
|
||||
const value = getObjectProperty(user, key)
|
||||
if (value !== undefined) {
|
||||
userData = setObjectProperty(userData, key, value)
|
||||
if (key in user) {
|
||||
userData[key] = user[key]
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -168,16 +166,6 @@ export async function update(user, which = ['all'], options = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
// PATCH /api/users/pinnedItems (add by default; ?action=remove to unpin)
|
||||
export async function patchPinnedItem({ source, path, name, action = 'add' }) {
|
||||
const params = { action }
|
||||
const apiPath = getApiPath('users/pinnedItems', params)
|
||||
await fetchURL(apiPath, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ source, path, name }),
|
||||
})
|
||||
}
|
||||
|
||||
// DELETE /api/users (remove user)
|
||||
// Password-login: tries without X-Password first; on 401 requiring X-Password, opens the prompt and retries.
|
||||
// options.skipActorPasswordConfirm / pre-set X-Password skip that flow.
|
||||
|
||||
@@ -52,7 +52,6 @@ export async function fetchJSON(url, opts) {
|
||||
|
||||
export function adjustedData(data) {
|
||||
if (data.type === "directory") {
|
||||
const pinnedNames = new Set(data.pinnedItems || []);
|
||||
// Combine folders and files into items
|
||||
data.items = [...(data.folders || []), ...(data.files || [])];
|
||||
data.items = data.items.map((item) => {
|
||||
@@ -60,7 +59,6 @@ export function adjustedData(data) {
|
||||
if (item.isShared === undefined) {
|
||||
item.isShared = false;
|
||||
}
|
||||
item.pinned = pinnedNames.has(item.name);
|
||||
if (data.path === "/") {
|
||||
if (item.type === "directory") {
|
||||
item.path = `/${item.name}/`
|
||||
@@ -76,7 +74,6 @@ export function adjustedData(data) {
|
||||
}
|
||||
return item;
|
||||
});
|
||||
delete data.pinnedItems;
|
||||
}
|
||||
if (data.files) {
|
||||
data.files = []
|
||||
|
||||
@@ -54,10 +54,10 @@ describe('adjustedData', () => {
|
||||
folders: [],
|
||||
files: [],
|
||||
items: [
|
||||
{ isShared: false, name: "folder1", path: "/root/folder1/", source: undefined, type: "directory", pinned: false },
|
||||
{ isShared: false, name: "folder2", path: "/root/folder2/", source: undefined, type: "directory", pinned: false },
|
||||
{ isShared: false, name: "file1.txt", path: "/root/file1.txt", source: undefined, type: "file", pinned: false },
|
||||
{ isShared: false, name: "file2.txt", path: "/root/file2.txt", source: undefined, type: "file", pinned: false },
|
||||
{ isShared: false, name: "folder1", path: "/root/folder1/", source: undefined, type: "directory" },
|
||||
{ isShared: false, name: "folder2", path: "/root/folder2/", source: undefined, type: "directory" },
|
||||
{ isShared: false, name: "file1.txt", path: "/root/file1.txt", source: undefined, type: "file" },
|
||||
{ isShared: false, name: "file2.txt", path: "/root/file2.txt", source: undefined, type: "file" },
|
||||
],
|
||||
path: "/root/",
|
||||
};
|
||||
@@ -105,27 +105,5 @@ describe('adjustedData', () => {
|
||||
expect(adjustedData(input)).toEqual(expected);
|
||||
});
|
||||
|
||||
it('marks items as pinned from directory pinnedItems names', () => {
|
||||
const input = {
|
||||
type: "directory",
|
||||
path: "/",
|
||||
pinnedItems: ["alpha.txt"],
|
||||
folders: [{ name: "docs", type: "directory" }],
|
||||
files: [
|
||||
{ name: "alpha.txt", type: "file" },
|
||||
{ name: "beta.txt", type: "file" },
|
||||
],
|
||||
source: "Docs",
|
||||
};
|
||||
|
||||
const result = adjustedData(input);
|
||||
|
||||
expect(result.pinnedItems).toBeUndefined();
|
||||
expect(result.items).toEqual([
|
||||
{ isShared: false, name: "docs", path: "/docs/", source: "Docs", type: "directory", pinned: false },
|
||||
{ isShared: false, name: "alpha.txt", path: "/alpha.txt", source: "Docs", type: "file", pinned: true },
|
||||
{ isShared: false, name: "beta.txt", path: "/beta.txt", source: "Docs", type: "file", pinned: false },
|
||||
]);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -82,12 +82,6 @@
|
||||
:label="$t('general.download')"
|
||||
@action="startDownload"
|
||||
/>
|
||||
<action
|
||||
v-if="showSendToApp"
|
||||
icon="ios_share"
|
||||
:label="$t('buttons.sendToApp')"
|
||||
@action="sendToApp"
|
||||
/>
|
||||
<action
|
||||
v-if="showUnarchive"
|
||||
icon="unarchive"
|
||||
@@ -191,7 +185,6 @@
|
||||
<action v-if="isPreview && permissions.modify" icon="edit" :label="$t('general.rename')" @action="showRenamePromptForPreview" />
|
||||
<action v-if="showWatch" icon="visibility" :label="$t('buttons.watchFile')" @action="watchFile()" />
|
||||
<action v-if="hasDownload" icon="file_download" :label="$t('general.download')" @action="startDownload" />
|
||||
<action v-if="showSendToAppInPreview" icon="ios_share" :label="$t('buttons.sendToApp')" @action="sendToAppFromPreview" />
|
||||
<action v-if="showUnarchiveInOverflow" icon="folder_open" :label="$t('prompts.unarchive')" @action="showUnarchivePromptFromPreview" />
|
||||
<action v-if="showEdit" icon="edit" :label="$t('general.edit')" @action="edit()" />
|
||||
<action v-if="markdownPreview" icon="visibility" :label="$t('general.preview')" @action="switchToMarkdown" />
|
||||
@@ -202,7 +195,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { resourcesApi, shareApi, usersApi } from "@/api";
|
||||
import { resourcesApi } from "@/api";
|
||||
import Action from "@/components/Action.vue";
|
||||
import { notify } from "@/notify";
|
||||
import { getters, mutations, state } from "@/store";
|
||||
@@ -211,8 +204,6 @@ import buttons from "@/utils/buttons";
|
||||
import { copyToClipboard } from "@/utils/clipboard";
|
||||
import { globalVars } from "@/utils/constants.js";
|
||||
import downloadFiles from "@/utils/download";
|
||||
import { canNativeShare, nativeShareFile } from "@/utils/nativeShare";
|
||||
import { isRichTextPreviewMimeType } from "@/utils/mimetype";
|
||||
|
||||
function isArchivePath(pathOrName) {
|
||||
if (!pathOrName || typeof pathOrName !== "string") return false;
|
||||
@@ -263,9 +254,7 @@ export default {
|
||||
if (state.selected.length === 0) return [];
|
||||
// Map to actual items from state.req
|
||||
if (typeof state.selected[0] === 'number') {
|
||||
return state.selected
|
||||
.map(index => state.req.items.at(index))
|
||||
.filter(item => item !== null);
|
||||
return state.selected.map(index => state.req.items[index]);
|
||||
}
|
||||
return state.selected;
|
||||
},
|
||||
@@ -339,26 +328,13 @@ export default {
|
||||
if (this.showLimitedOptions) return false;
|
||||
return this.selectedCount <= 1 && this.showShare;
|
||||
},
|
||||
showSendToApp() {
|
||||
if (!canNativeShare()) return false;
|
||||
if (this.showLimitedOptions || this.showCreate) return false;
|
||||
if (!this.permissions.download || this.selectedCount !== 1) return false;
|
||||
const item = this.firstSelected;
|
||||
return item && !item.isDir && item.type !== "directory";
|
||||
},
|
||||
showSendToAppInPreview() {
|
||||
if (!canNativeShare()) return false;
|
||||
if (!this.hasDownload || this.req?.isDir) return false;
|
||||
return this.isPreview;
|
||||
},
|
||||
showRename() {
|
||||
if (this.showLimitedOptions) return false;
|
||||
return !this.showCreate && this.selectedCount === 1 && this.permissions.modify && !this.isSearchActive;
|
||||
},
|
||||
showPinAction() {
|
||||
if (this.showLimitedOptions) return false;
|
||||
if (!getters.isLoggedIn()) return false;
|
||||
if (getters.isShare() && !state.shareInfo?.canEditShare) return false;
|
||||
if (getters.isShare() || !getters.isLoggedIn()) return false;
|
||||
if (this.showCreate || this.isSearchActive) return false;
|
||||
if (this.selectedCount !== 1) return false;
|
||||
return getters.currentView() === "listingView";
|
||||
@@ -367,7 +343,10 @@ export default {
|
||||
return this.isPinnedSelection ? this.$t("buttons.unpinItem") : this.$t("buttons.pinItem");
|
||||
},
|
||||
isPinnedSelection() {
|
||||
return !!this.firstSelected?.pinned;
|
||||
if (!this.firstSelected) {
|
||||
return false;
|
||||
}
|
||||
return getters.isItemPinned(this.firstSelected);
|
||||
},
|
||||
showCopy() {
|
||||
if (this.showLimitedOptions) return false;
|
||||
@@ -502,7 +481,7 @@ export default {
|
||||
},
|
||||
markdownPreview() {
|
||||
if (getters.currentView() !== 'editor') return false;
|
||||
return isRichTextPreviewMimeType(state.req.type);
|
||||
return state.req.type === 'text/markdown';
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
@@ -716,17 +695,6 @@ export default {
|
||||
const items = this.providedItems;
|
||||
downloadFiles(items);
|
||||
},
|
||||
async sendToApp() {
|
||||
mutations.closeTopPrompt();
|
||||
const item = this.firstSelected;
|
||||
if (!item) return;
|
||||
await nativeShareFile(item);
|
||||
},
|
||||
async sendToAppFromPreview() {
|
||||
mutations.closeTopPrompt();
|
||||
if (!this.req) return;
|
||||
await nativeShareFile(this.req);
|
||||
},
|
||||
showDeletePrompt() {
|
||||
mutations.closeTopPrompt();
|
||||
mutations.showPrompt({
|
||||
@@ -756,43 +724,9 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
async togglePin() {
|
||||
const item = this.firstSelected;
|
||||
if (!item?.name || !getters.isLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
if (getters.isShare() && !state.shareInfo?.canEditShare) {
|
||||
return;
|
||||
}
|
||||
togglePin() {
|
||||
mutations.closeHovers();
|
||||
const directoryPath = state.req?.type === "directory"
|
||||
? state.req.path
|
||||
: url.getParentDir(item.path);
|
||||
const action = item.pinned ? "remove" : "add";
|
||||
try {
|
||||
if (getters.isShare()) {
|
||||
await shareApi.patchPinnedItem({
|
||||
hash: state.shareInfo.hash,
|
||||
path: directoryPath,
|
||||
name: item.name,
|
||||
action,
|
||||
});
|
||||
} else {
|
||||
const source = item.source || state.req?.source || state.sources.current;
|
||||
if (!source) {
|
||||
return;
|
||||
}
|
||||
await usersApi.patchPinnedItem({
|
||||
source,
|
||||
path: directoryPath,
|
||||
name: item.name,
|
||||
action,
|
||||
});
|
||||
}
|
||||
mutations.setReload(true);
|
||||
} catch (e) {
|
||||
notify.showError(e);
|
||||
}
|
||||
mutations.togglePinnedItem(this.firstSelected);
|
||||
},
|
||||
async copyPathToClipboard() {
|
||||
const item = this.firstSelected;
|
||||
|
||||
@@ -85,12 +85,6 @@
|
||||
:name="$t('search.useWildcardSearch')"
|
||||
:description="$t('search.useWildcardSearchDescription')"
|
||||
/>
|
||||
<ToggleSwitch
|
||||
class="item"
|
||||
v-model="caseExactSearch"
|
||||
:name="$t('search.caseExact')"
|
||||
:description="$t('search.caseExactDescription')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
@@ -179,7 +173,6 @@ export default {
|
||||
isTypeSelectDisabled: false,
|
||||
showPreviewImages: false,
|
||||
useWildcardSearch: false,
|
||||
caseExactSearch: false,
|
||||
folderSelect: [
|
||||
{ label: this.$t("search.onlyFolders"), value: "type:folder" },
|
||||
{ label: this.$t("search.onlyFiles"), value: "type:file" },
|
||||
@@ -219,9 +212,6 @@ export default {
|
||||
useWildcardSearch() {
|
||||
this.submit();
|
||||
},
|
||||
caseExactSearch() {
|
||||
this.submit();
|
||||
},
|
||||
searchTypes() {
|
||||
this.submit();
|
||||
},
|
||||
@@ -258,7 +248,7 @@ export default {
|
||||
|
||||
// Add keyboard event listener for "/" to activate search
|
||||
this.handleKeydown = (event) => {
|
||||
if ((event.key === '/' || event.key === ' ') && !state.isSearchActive && !getters.currentPrompt()) {
|
||||
if (event.key === '/' || event.key === ' ' && !state.isSearchActive && getters.currentPrompt() === null) {
|
||||
event.preventDefault();
|
||||
this.open();
|
||||
}
|
||||
@@ -291,7 +281,7 @@ export default {
|
||||
return getters.eventTheme();
|
||||
},
|
||||
disableSearchOptions() {
|
||||
return state.user?.disableSearchOptions;
|
||||
return state.user.disableSearchOptions;
|
||||
},
|
||||
foldersOnly() {
|
||||
return this.isTypeSelectDisabled;
|
||||
@@ -413,7 +403,7 @@ export default {
|
||||
},
|
||||
updateSource(event) {
|
||||
this.selectedSource = event.target.value;
|
||||
void this.submit();
|
||||
this.submit();
|
||||
},
|
||||
getItemUrl(s) {
|
||||
// Use source from result if available, otherwise fall back to selectedSource
|
||||
@@ -517,13 +507,6 @@ export default {
|
||||
if (this.useWildcardSearch) {
|
||||
dateParams.useWildcard = true;
|
||||
}
|
||||
let searchQuery = searchTypesFull + this.value;
|
||||
if (this.caseExactSearch) {
|
||||
searchQuery =
|
||||
searchTypesFull.trim() === ""
|
||||
? `case:exact ${this.value}`
|
||||
: `case:exact ${searchTypesFull}${this.value}`;
|
||||
}
|
||||
this.ongoing++;
|
||||
|
||||
// Determine which sources to search
|
||||
@@ -542,7 +525,7 @@ export default {
|
||||
this.results = await toolsApi.search(
|
||||
scope,
|
||||
sourcesToSearch,
|
||||
searchQuery,
|
||||
searchTypesFull + this.value,
|
||||
false,
|
||||
dateParams
|
||||
);
|
||||
@@ -637,9 +620,6 @@ export default {
|
||||
if (this.useWildcardSearch) {
|
||||
query.wildcard = "1";
|
||||
}
|
||||
if (this.caseExactSearch) {
|
||||
query.caseExact = "1";
|
||||
}
|
||||
if (this.isTypeSelectDisabled) {
|
||||
query.typeLock = "1";
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
name: "StatusBar",
|
||||
data() {
|
||||
return {
|
||||
gallerySize: state.user?.gallerySize,
|
||||
gallerySize: state.user.gallerySize,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -91,8 +91,8 @@ export default {
|
||||
}
|
||||
let total = 0;
|
||||
state.selected.forEach(index => {
|
||||
if (index >= 0 && index < state.req?.items.length) {
|
||||
const item = state.req.items.at(index);
|
||||
if (index >= 0 && index < state.req.items.length) {
|
||||
const item = state.req.items[index];
|
||||
if (item?.size) {
|
||||
total += item.size;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
// Only update if the mode actually changed
|
||||
if (newMode !== currentMode) {
|
||||
mutations.updateDisplayPreferences({ viewMode: newMode });
|
||||
void mutations.updateCurrentUser({ viewMode: newMode });
|
||||
mutations.updateCurrentUser({ viewMode: newMode });
|
||||
}
|
||||
},
|
||||
// Ctrl + Mouse Wheel to adjust the slider sizes
|
||||
@@ -215,7 +215,7 @@ export default {
|
||||
|
||||
const delta = event.deltaY > 0 ? 1 : -1; // Scroll down increases, up decreases
|
||||
|
||||
const advSearch = (state.route.path || "").startsWith("/tools/advancedSearch");
|
||||
const advSearch = (state.route?.path || "").startsWith("/tools/advancedSearch");
|
||||
if (this.currentView === "listingView" || advSearch) {
|
||||
event.preventDefault();
|
||||
const newSize = Math.min(9, Math.max(1, this.gallerySize - delta));
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
computed: {
|
||||
darkMode() { return getters.isDarkMode(); },
|
||||
queueCount() {
|
||||
return state.playbackQueue.queue.length || 0;
|
||||
return state.playbackQueue?.queue?.length || 0;
|
||||
},
|
||||
syncedLyrics() {
|
||||
return this.lyrics.length > 0 && !this.lyrics.every(line => line.timestamp === 0);
|
||||
|
||||
@@ -36,8 +36,6 @@ import { resourcesApi } from "@/api";
|
||||
import { notify } from "@/notify";
|
||||
import { getters, mutations, state } from "@/store";
|
||||
import { url } from "@/utils";
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
|
||||
export default {
|
||||
name: "breadcrumbs",
|
||||
@@ -71,7 +69,7 @@ export default {
|
||||
return state.req.hasUpdate;
|
||||
},
|
||||
isDroppable() {
|
||||
return getters.permissions().modify
|
||||
return getters.permissions()?.modify
|
||||
},
|
||||
homeLink() {
|
||||
return {
|
||||
@@ -82,12 +80,14 @@ export default {
|
||||
};
|
||||
},
|
||||
scrollRatio() {
|
||||
const ratio = state.listing.scrollRatio || 0;
|
||||
const ratio = state.listing?.scrollRatio || 0;
|
||||
return ratio;
|
||||
},
|
||||
items() {
|
||||
const req = state.req;
|
||||
if (!req.path) return [];
|
||||
if (!req.items || !req.path) {
|
||||
return [];
|
||||
}
|
||||
const encodedPathString = url.encodedPath(state.req.path);
|
||||
const originalParts = state.req.path.split("/");
|
||||
const encodedParts = encodedPathString.split("/");
|
||||
@@ -105,8 +105,8 @@ export default {
|
||||
let accumulatedPath = "";
|
||||
|
||||
for (let i = 0; i < originalParts.length; i++) {
|
||||
const origPart = getObjectProperty(originalParts, i);
|
||||
const encodedElement = getObjectProperty(encodedParts, i);
|
||||
const origPart = originalParts[i];
|
||||
const encodedElement = encodedParts[i];
|
||||
buildRef = `${buildRef + encodedElement}/`;
|
||||
accumulatedPath = accumulatedPath ? `${accumulatedPath}/${origPart}` : origPart;
|
||||
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
for (const i of state.selected) {
|
||||
if (i < 0 || i >= state.req.length) continue;
|
||||
|
||||
const selectedItem = state.req.items.at(i);
|
||||
const selectedItem = state.req.items[i];
|
||||
|
||||
let fromPath = selectedItem.path;
|
||||
|
||||
@@ -279,16 +279,17 @@ export default {
|
||||
await resourcesApi.moveCopy(itemsToMove, "move", overwrite, rename);
|
||||
}
|
||||
|
||||
const buttonAction = () => {
|
||||
url.goToItem(source, targetPath, {}, false, getters.isShare());
|
||||
};
|
||||
|
||||
notify.showSuccess(this.$t("prompts.moveSuccess"), {
|
||||
icon: "folder",
|
||||
buttons: [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
source,
|
||||
targetPath,
|
||||
getters.isShare()
|
||||
),
|
||||
],
|
||||
buttons: [{
|
||||
label: this.$t("buttons.goToItem"),
|
||||
primary: true,
|
||||
action: buttonAction
|
||||
}]
|
||||
});
|
||||
mutations.closeTopPrompt();
|
||||
mutations.setReload(true);
|
||||
@@ -307,7 +308,7 @@ export default {
|
||||
const rename = option === "rename";
|
||||
event.preventDefault();
|
||||
mutations.closeTopPrompt();
|
||||
void moveAction(overwrite, rename);
|
||||
moveAction(overwrite, rename);
|
||||
},
|
||||
});
|
||||
return;
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
:forceFilesApi="!!browseSource"
|
||||
:showLimitedOptions="true"
|
||||
:inlinePin="true"
|
||||
:pinned="item.pinned"
|
||||
@click.prevent="(event) => handleItemClick(item, index, event)"
|
||||
@dblclick.prevent="(event) => handleItemDblClick(item, index, event)"
|
||||
/>
|
||||
@@ -148,7 +147,7 @@ export default {
|
||||
},
|
||||
availableSources() {
|
||||
// Get all available sources from state.sources.info
|
||||
return state.sources.info ? Object.keys(state.sources.info) : [state.req.source];
|
||||
return state.sources?.info ? Object.keys(state.sources.info) : [state.req.source];
|
||||
},
|
||||
showSourceSelector() {
|
||||
if (this.hideDestinationSource) {
|
||||
@@ -280,7 +279,7 @@ export default {
|
||||
this.selectedSource = null;
|
||||
this.selectedType = null;
|
||||
// Fetch files for the new source
|
||||
void this.withLoading(() => resourcesApi.fetchFiles(newSource, newPath).then(this.fillOptions));
|
||||
this.withLoading(() => resourcesApi.fetchFiles(newSource, newPath).then(this.fillOptions));
|
||||
},
|
||||
resetToShare(newHash) {
|
||||
// Reset to the share root
|
||||
@@ -291,7 +290,21 @@ export default {
|
||||
this.selectedSource = null;
|
||||
this.selectedType = null;
|
||||
// Fetch files for the share
|
||||
void this.withLoading(() => resourcesApi.fetchFilesPublic("/", newHash).then(this.fillOptions));
|
||||
this.withLoading(() => resourcesApi.fetchFilesPublic("/", newHash).then(this.fillOptions));
|
||||
},
|
||||
// Sort items to make pinned items appear on top always (it was working before, but just for the first load)
|
||||
// after navigate the pinned was lost, this will also keep our sorting preference in all prompts that use FileList
|
||||
sortItemsWithPinned(items, source, path) {
|
||||
if (!items?.length) return items;
|
||||
const parentEntry = items.find(i => i.name === "..");
|
||||
const rest = items.filter(i => i.name !== "..");
|
||||
const dirs = rest.filter(i => i.type === 'directory');
|
||||
const files = rest.filter(i => i.type !== 'directory');
|
||||
const pinnedPaths = getters.pinnedPathsFor(source, path);
|
||||
const sorting = getters.sorting();
|
||||
const sortedDirs = sortedItems(dirs, sorting.by, sorting.asc, pinnedPaths);
|
||||
const sortedFiles = sortedItems(files, sorting.by, sorting.asc, pinnedPaths);
|
||||
return parentEntry ? [parentEntry, ...sortedDirs, ...sortedFiles] : [...sortedDirs, ...sortedFiles];
|
||||
},
|
||||
fillOptions(req) {
|
||||
// Sets the current path and resets the current items.
|
||||
@@ -308,38 +321,34 @@ export default {
|
||||
isValid: !this.requireFileSelection, // Folder is only valid if file is not required
|
||||
});
|
||||
|
||||
const entries = [];
|
||||
if (req.items && Array.isArray(req.items)) {
|
||||
for (const item of req.items) {
|
||||
if (!this.showFolders && item.type === "directory") continue;
|
||||
if (!this.showFiles && item.type !== "directory") continue;
|
||||
if (item.type !== "directory" && !this.isFileTypeAllowed(item.type)) continue;
|
||||
entries.push({
|
||||
name: item.name,
|
||||
path: item.path,
|
||||
source: item.source || req.source,
|
||||
type: item.type,
|
||||
pinned: !!item.pinned,
|
||||
originalItem: item,
|
||||
});
|
||||
}
|
||||
const sorting = getters.sorting();
|
||||
const dirs = entries.filter((item) => item.type === "directory");
|
||||
const files = entries.filter((item) => item.type !== "directory");
|
||||
this.items = [
|
||||
...sortedItems(dirs, sorting.by, sorting.asc),
|
||||
...sortedItems(files, sorting.by, sorting.asc),
|
||||
];
|
||||
}
|
||||
|
||||
// If the path isn't the root path,
|
||||
// show a button to navigate to the previous
|
||||
// directory (unless we are only displaying files).
|
||||
if (this.path !== "/" && this.showFolders) {
|
||||
this.items.unshift({
|
||||
this.items.push({
|
||||
name: "..",
|
||||
path: `${url.removeLastDir(this.path)}/`,
|
||||
source: this.source,
|
||||
type: "directory",
|
||||
});
|
||||
}
|
||||
|
||||
// If this folder has no items or items is not an array, finish here.
|
||||
if (!req.items || !Array.isArray(req.items)) return;
|
||||
for (const item of req.items) {
|
||||
if (!this.showFolders && item.type === "directory") continue;
|
||||
if (!this.showFiles && item.type !== "directory") continue;
|
||||
// Filter by file type if specified (only for files, not directories)
|
||||
if (item.type !== "directory" && !this.isFileTypeAllowed(item.type)) continue;
|
||||
this.items.push({
|
||||
name: item.name,
|
||||
path: item.path,
|
||||
source: item.source || req.source,
|
||||
type: item.type, // Store type for file selection
|
||||
originalItem: item, // Store original item for Icon component
|
||||
});
|
||||
}
|
||||
this.items = this.sortItemsWithPinned(this.items, this.source, this.path);
|
||||
},
|
||||
next: function (event) {
|
||||
// Retrieves the URL of the directory the user
|
||||
@@ -373,14 +382,14 @@ export default {
|
||||
if (this.browseSource) {
|
||||
// Explicitly browsing a source - use files API
|
||||
this.source = sourceToUse;
|
||||
void this.withLoading(() => resourcesApi.fetchFiles(sourceToUse, path).then(this.fillOptions));
|
||||
this.withLoading(() => resourcesApi.fetchFiles(sourceToUse, path).then(this.fillOptions));
|
||||
} else if (this.browseShare || getters.isShare()) {
|
||||
// Browsing a share - use public API
|
||||
const hashToUse = this.browseShare || state.shareInfo?.hash;
|
||||
void this.withLoading(() => resourcesApi.fetchFilesPublic(path, hashToUse).then(this.fillOptions));
|
||||
this.withLoading(() => resourcesApi.fetchFilesPublic(path, hashToUse).then(this.fillOptions));
|
||||
} else {
|
||||
this.source = sourceToUse;
|
||||
void this.withLoading(() => resourcesApi.fetchFiles(sourceToUse, path).then(this.fillOptions));
|
||||
this.withLoading(() => resourcesApi.fetchFiles(sourceToUse, path).then(this.fillOptions));
|
||||
}
|
||||
|
||||
},
|
||||
@@ -510,9 +519,13 @@ export default {
|
||||
this.selectedType = null;
|
||||
if (this.browseShare || getters.isShare()) {
|
||||
const hashToUse = this.browseShare || state.shareInfo?.hash;
|
||||
void this.withLoading(() => resourcesApi.fetchFilesPublic(p, hashToUse).then(this.fillOptions));
|
||||
this.withLoading(() =>
|
||||
resourcesApi.fetchFilesPublic(p, hashToUse).then(this.fillOptions)
|
||||
);
|
||||
} else {
|
||||
void this.withLoading(() => resourcesApi.fetchFiles(source, p).then(this.fillOptions));
|
||||
this.withLoading(() =>
|
||||
resourcesApi.fetchFiles(source, p).then(this.fillOptions)
|
||||
);
|
||||
}
|
||||
},
|
||||
fillFromList() {
|
||||
|
||||
@@ -81,9 +81,7 @@ import LoadingSpinner from '@/components/LoadingSpinner.vue';
|
||||
import { state, getters, mutations } from '@/store';
|
||||
import { eventBus } from '@/store/eventBus';
|
||||
import { goToItem, joinPath } from '@/utils/url';
|
||||
import { goToItemNotificationButton } from '@/utils/notificationActions';
|
||||
import { notify } from '@/notify';
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
|
||||
export default {
|
||||
name: 'FileTree',
|
||||
@@ -138,7 +136,7 @@ export default {
|
||||
return this.isRootInstance ? this.rootNodes : this.nodes;
|
||||
},
|
||||
canModify() {
|
||||
return getters.permissions().modify;
|
||||
return getters.permissions()?.modify;
|
||||
},
|
||||
showFiles() {
|
||||
// Defaults to true
|
||||
@@ -317,7 +315,7 @@ export default {
|
||||
// don't navigate to current item if we're already viewing it
|
||||
if (this.isCurrentItem(node)) {
|
||||
if (node.isDir) {
|
||||
void this.toggleExpand(node, false); // If the item is a folder, just expand/collapse instead of navigate again
|
||||
this.toggleExpand(node, false); // If the item is a folder, just expand/collapse instead of navigate again
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -381,7 +379,8 @@ export default {
|
||||
|
||||
let currentLevel = this.isRootInstance ? this.rootNodes : this.nodes;
|
||||
|
||||
for (const part of pathParts) {
|
||||
for (let i = 0; i < pathParts.length; i++) {
|
||||
const part = pathParts[i];
|
||||
const node = currentLevel.find(n => n.name === part && n.isDir);
|
||||
if (!node) break;
|
||||
|
||||
@@ -468,7 +467,7 @@ export default {
|
||||
}
|
||||
// Set a new timeout
|
||||
const timeout = setTimeout(() => {
|
||||
void this.toggleExpand(node, true); // expand without navigating
|
||||
this.toggleExpand(node, true); // expand without navigating
|
||||
this.expandTimeouts.delete(node);
|
||||
}, 800); // 800ms delay (we need to hover that time to auto expand when dragging a item)
|
||||
this.expandTimeouts.set(node, timeout);
|
||||
@@ -530,7 +529,7 @@ export default {
|
||||
// Build list of items to move
|
||||
const items = [];
|
||||
for (const index of selectedIndices) {
|
||||
const item = getObjectProperty(state.req?.items, index);
|
||||
const item = state.req.items[index];
|
||||
if (!item) continue;
|
||||
|
||||
// Prevent dropping onto itself or into its own subdirectory
|
||||
@@ -588,16 +587,20 @@ export default {
|
||||
} else {
|
||||
await resourcesApi.moveCopy(items, 'move', overwrite, rename);
|
||||
}
|
||||
const buttonAction = () => {
|
||||
if (this.isShare) {
|
||||
goToItem(this.shareHash, node.path, {}, false, true);
|
||||
} else {
|
||||
goToItem(this.currentSource, node.path, {});
|
||||
}
|
||||
};
|
||||
const buttonProps = {
|
||||
icon: 'folder',
|
||||
buttons: [
|
||||
goToItemNotificationButton(
|
||||
this.$t('buttons.goToItem'),
|
||||
this.isShare ? this.shareHash : this.currentSource,
|
||||
node.path,
|
||||
this.isShare
|
||||
),
|
||||
],
|
||||
buttons: [{
|
||||
label: this.$t('buttons.goToItem'),
|
||||
primary: true,
|
||||
action: buttonAction,
|
||||
}]
|
||||
};
|
||||
notify.showSuccess(this.$t('prompts.moveSuccess'), buttonProps);
|
||||
mutations.closeTopPrompt();
|
||||
@@ -654,7 +657,7 @@ export default {
|
||||
|
||||
// Compare node to each candidate (usually only one, but safe to loop)
|
||||
return candidates.some(selected => {
|
||||
if (!selected.path) return false;
|
||||
if (!selected?.path) return false;
|
||||
if (this.isShare) {
|
||||
return selected.path === node.path;
|
||||
} else {
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
import { fetchPreviewImage } from "@/api/resources";
|
||||
import { globalVars } from "@/utils/constants";
|
||||
import { getTypeInfo } from "@/utils/mimetype";
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
import { mutations, state, getters } from "@/store";
|
||||
import { setImageLoaded } from "@/utils/imageCache";
|
||||
import ThreeJs from "@/views/files/ThreeJs.vue";
|
||||
@@ -226,7 +225,7 @@ export default {
|
||||
},
|
||||
shouldUse3DPreview() {
|
||||
// Check if we should use 3D preview instead of regular icon
|
||||
if (this.mimetype === "directory" || !this.size || !this.path) return false;
|
||||
if (!this.isFile || !this.size || !this.path) return false;
|
||||
if (!getters.previewPerms().models) return false;
|
||||
|
||||
const MAX_SIZE = 250 * 1024; // 250KB in bytes
|
||||
@@ -241,7 +240,7 @@ export default {
|
||||
return `${state.user?.gallerySize || 1}-${getters.viewMode()}`;
|
||||
},
|
||||
routePath() {
|
||||
return state.route.path ?? "";
|
||||
return state.route?.path ?? "";
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -367,15 +366,14 @@ export default {
|
||||
}
|
||||
// Set the thumbnail or popup preview
|
||||
if (getters.previewPerms().popup) {
|
||||
mutations.setPreviewSource(getObjectProperty(sequence, index));
|
||||
mutations.setPreviewSource(sequence[index]);
|
||||
} else {
|
||||
this.currentThumbnail = getObjectProperty(sequence, index);
|
||||
this.currentThumbnail = sequence[index];
|
||||
}
|
||||
|
||||
// Preload the next frame (cancellable fetch warms HTTP cache)
|
||||
const nextIndex = (index + 1) % sequence.length;
|
||||
const frameUrl = sequence.at(nextIndex);
|
||||
if (!frameUrl) return;
|
||||
const frameUrl = sequence[nextIndex];
|
||||
const preloadController = new AbortController();
|
||||
this.preloadAbortControllers.push(preloadController);
|
||||
fetchPreviewImage(frameUrl, preloadController.signal)
|
||||
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
];
|
||||
},
|
||||
rows() {
|
||||
return buildIndexInfoRows(this.info, this.$t, state.user?.locale);
|
||||
return buildIndexInfoRows(this.info, this.$t, state.user.locale);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -142,13 +142,11 @@
|
||||
import { globalVars } from "@/utils/constants";
|
||||
import downloadFiles from "@/utils/download";
|
||||
import { getHumanReadableFilesize } from "@/utils/filesizes";
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
import { resourcesApi } from "@/api";
|
||||
import * as upload from "@/utils/upload";
|
||||
import { state, getters, mutations } from "@/store"; // Import your custom store
|
||||
import { url } from "@/utils";
|
||||
import { notify } from "@/notify";
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
import Icon from "@/components/files/Icon.vue";
|
||||
|
||||
export default {
|
||||
@@ -219,10 +217,6 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
pinned: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
displayName() {
|
||||
@@ -280,13 +274,15 @@ export default {
|
||||
if (this.readOnly === true) return false;
|
||||
|
||||
for (const i of this.selected) {
|
||||
const item = getObjectProperty(state.req.items, i);
|
||||
if (!item) continue;
|
||||
// Also check if we're trying to drop an item onto itself
|
||||
if (item.path === this.path && state.req.source === this.source) {
|
||||
if (
|
||||
state.req.items[i].path === this.path &&
|
||||
state.req.source === this.source
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (item.index === this.index) {
|
||||
|
||||
// Also check if we're trying to drop an item onto itself
|
||||
if (state.req.items[i].index === this.index) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -302,7 +298,7 @@ export default {
|
||||
let previewPath;
|
||||
if (this.path) {
|
||||
previewPath = this.path;
|
||||
} else if (state.req?.path && this.name) {
|
||||
} else if (state?.req?.path && this.name) {
|
||||
previewPath = url.joinPath(state.req.path, this.name);
|
||||
} else {
|
||||
return "";
|
||||
@@ -310,13 +306,13 @@ export default {
|
||||
|
||||
// If forceFilesApi is true, always use authenticated files API
|
||||
if (this.forceFilesApi) {
|
||||
return resourcesApi.getPreviewURL(this.source || state.req?.source, previewPath, this.modified);
|
||||
return resourcesApi.getPreviewURL(this.source || state?.req?.source, previewPath, this.modified);
|
||||
}
|
||||
|
||||
if (getters.isShare()) {
|
||||
return resourcesApi.getPreviewURLPublic(previewPath);
|
||||
}
|
||||
return resourcesApi.getPreviewURL(this.source || state.req?.source, previewPath, this.modified);
|
||||
return resourcesApi.getPreviewURL(this.source || state.req.source, previewPath, this.modified);
|
||||
},
|
||||
isThumbsEnabled() {
|
||||
return globalVars.enableThumbs;
|
||||
@@ -325,7 +321,10 @@ export default {
|
||||
return this.clickable;
|
||||
},
|
||||
isPinned() {
|
||||
return this.pinned;
|
||||
return getters.isItemPinned({
|
||||
path: this.path,
|
||||
source: this.source,
|
||||
});
|
||||
},
|
||||
// Computed properties for display values - Vue caches these automatically!
|
||||
humanSize() {
|
||||
@@ -553,14 +552,12 @@ export default {
|
||||
|
||||
let items = [];
|
||||
for (const i of state.selected) {
|
||||
const item = getObjectProperty(state.req.items, i);
|
||||
if (!item) continue;
|
||||
items.push({
|
||||
from: item.path,
|
||||
fromSource: item.source,
|
||||
to: url.joinPath(this.path, item.name),
|
||||
from: state.req.items[i].path,
|
||||
fromSource: state.req.items[i].source,
|
||||
to: url.joinPath(this.path, state.req.items[i].name),
|
||||
toSource: this.source,
|
||||
name: item.name,
|
||||
name: state.req.items[i].name,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -619,16 +616,18 @@ export default {
|
||||
await resourcesApi.moveCopy(items, "move", overwrite, rename);
|
||||
}
|
||||
// Notification to move into the folder
|
||||
const buttonAction = () => {
|
||||
this.open();
|
||||
};
|
||||
const buttonProps = {
|
||||
icon: "folder",
|
||||
buttons: [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
this.source,
|
||||
this.path,
|
||||
getters.isShare()
|
||||
),
|
||||
],
|
||||
{
|
||||
label: this.$t("buttons.goToItem"),
|
||||
primary: true,
|
||||
action: buttonAction
|
||||
}
|
||||
]
|
||||
};
|
||||
notify.showSuccess(this.$t("prompts.moveSuccess"), buttonProps);
|
||||
// Close the prompt after successful operation and reload items for reflect the changes
|
||||
@@ -705,7 +704,7 @@ export default {
|
||||
}
|
||||
|
||||
if (
|
||||
!state.user?.singleClick &&
|
||||
!state.user.singleClick &&
|
||||
getters.selectedCount() !== 0 &&
|
||||
event.button === 0
|
||||
) {
|
||||
@@ -767,7 +766,7 @@ export default {
|
||||
}
|
||||
|
||||
if (
|
||||
!state.user?.singleClick &&
|
||||
!state.user.singleClick &&
|
||||
!event.ctrlKey &&
|
||||
!event.metaKey &&
|
||||
!event.shiftKey &&
|
||||
@@ -802,15 +801,14 @@ export default {
|
||||
// Check if state.req.items exists and has the item at this index
|
||||
// This prevents errors when ListingItem is used outside of the main file listing (e.g., duplicate finder)
|
||||
let previousHistoryItem = null;
|
||||
const currentItem = getObjectProperty(state.req.items, this.index);
|
||||
if (currentItem) {
|
||||
if (state.req.items?.[this.index]) {
|
||||
previousHistoryItem = {
|
||||
name: currentItem.name,
|
||||
name: state.req.items[this.index].name,
|
||||
source: state.req.source,
|
||||
path: state.req.path,
|
||||
};
|
||||
}
|
||||
url.goToItem(this.source, this.path, previousHistoryItem, false, getters.isShare());
|
||||
url.goToItem(this.source, this.path, previousHistoryItem || {}, false, getters.isShare());
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
if (!state.shareInfo?.isPasswordProtected) {
|
||||
return true
|
||||
}
|
||||
return state.shareInfo?.passwordValid
|
||||
return state.shareInfo.passwordValid
|
||||
},
|
||||
shareInfo() {
|
||||
return state.shareInfo;
|
||||
|
||||
@@ -577,13 +577,13 @@ export default {
|
||||
case "ArrowRight":
|
||||
if (this.hasNext) {
|
||||
event.preventDefault();
|
||||
void this.next();
|
||||
this.next();
|
||||
}
|
||||
break;
|
||||
case "ArrowLeft":
|
||||
if (this.hasPrevious) {
|
||||
event.preventDefault();
|
||||
void this.prev();
|
||||
this.prev();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -786,9 +786,9 @@ export default {
|
||||
|
||||
// Navigate based on button type
|
||||
if (this.touchState.buttonType === 'previous' && this.hasPrevious) {
|
||||
void this.prev();
|
||||
this.prev();
|
||||
} else if (this.touchState.buttonType === 'next' && this.hasNext) {
|
||||
void this.next();
|
||||
this.next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,7 +916,7 @@ export default {
|
||||
}
|
||||
// Only navigate if this wasn't a drag
|
||||
if (!this.dragState.triggered) {
|
||||
void this.prev();
|
||||
this.prev();
|
||||
}
|
||||
this.resetDragState();
|
||||
},
|
||||
@@ -930,7 +930,7 @@ export default {
|
||||
}
|
||||
// Only navigate if this wasn't a drag
|
||||
if (!this.dragState.triggered) {
|
||||
void this.next();
|
||||
this.next();
|
||||
}
|
||||
this.resetDragState();
|
||||
},
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
async deleteApi() {
|
||||
// Dummy delete function, to be filled in later
|
||||
try {
|
||||
await authApi.deleteApiKey({ name: this.name });
|
||||
authApi.deleteApiKey({ name: this.name });
|
||||
// Emit event to refresh API tokens list
|
||||
setTimeout(() => {
|
||||
eventBus.emit('apiKeysChanged');
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
import { state, mutations, getters } from "@/store";
|
||||
import { notify } from "@/notify";
|
||||
import { resourcesApi } from "@/api";
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
import { goToItem } from "@/utils/url";
|
||||
import LoadingSpinner from "@/components/LoadingSpinner.vue";
|
||||
import FileList from "@/components/files/FileList.vue";
|
||||
import ToggleSwitch from "@/components/settings/ToggleSwitch.vue";
|
||||
@@ -180,7 +180,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
deleteAfter(newVal) {
|
||||
void mutations.updateCurrentUser({ deleteAfterArchive: newVal });
|
||||
mutations.updateCurrentUser({ deleteAfterArchive: newVal });
|
||||
},
|
||||
showFileList(newVal) {
|
||||
if (!newVal) {
|
||||
@@ -251,7 +251,7 @@ export default {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
if (this.newDirName && this.isDirNameValid) {
|
||||
void this.createDirectory();
|
||||
this.createDirectory();
|
||||
}
|
||||
},
|
||||
async createDirectory() {
|
||||
@@ -264,15 +264,15 @@ export default {
|
||||
? `${currentPath + this.newDirName}/`
|
||||
: `${currentPath}/${this.newDirName}/`;
|
||||
if (getters.isShare()) {
|
||||
await resourcesApi.postPublic(state.shareInfo.hash, fullPath, "", false, undefined, {}, true);
|
||||
await resourcesApi.postPublic(state.shareInfo?.hash, fullPath, "", false, undefined, {}, true);
|
||||
} else {
|
||||
await resourcesApi.post(currentSource, fullPath, "", false, undefined, {}, true);
|
||||
}
|
||||
if (getters.isShare()) {
|
||||
await resourcesApi.fetchFilesPublic(currentPath, state.shareInfo.hash)
|
||||
resourcesApi.fetchFilesPublic(currentPath, state.shareInfo?.hash)
|
||||
.then((req) => this.$refs.fileList.fillOptions(req, true));
|
||||
} else {
|
||||
await resourcesApi.fetchFiles(currentSource, currentPath)
|
||||
resourcesApi.fetchFiles(currentSource, currentPath)
|
||||
.then((req) => this.$refs.fileList.fillOptions(req, true));
|
||||
}
|
||||
mutations.setReload(true);
|
||||
@@ -312,18 +312,14 @@ export default {
|
||||
|
||||
const destSource = this.destSource || this.source;
|
||||
const archivePath = dest;
|
||||
const buttonAction = () => {
|
||||
if (archivePath) {
|
||||
goToItem(destSource || null, archivePath, {}, false, getters.isShare());
|
||||
}
|
||||
};
|
||||
notify.showSuccess(this.$t("prompts.archiveSuccess"), {
|
||||
icon: "folder",
|
||||
buttons: archivePath
|
||||
? [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
destSource,
|
||||
archivePath,
|
||||
getters.isShare()
|
||||
),
|
||||
]
|
||||
: undefined,
|
||||
buttons: archivePath ? [{ label: this.$t("buttons.goToItem"), primary: true, action: buttonAction }] : undefined,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -116,9 +116,8 @@ export default {
|
||||
// Only include permissions when customizing token
|
||||
if (this.customizeToken) {
|
||||
// Filter to get keys of permissions set to true and join them as a comma-separated string
|
||||
const permissionsString = Object.entries(this.localPerms)
|
||||
.filter(([, value]) => value)
|
||||
.map(([key]) => key)
|
||||
const permissionsString = Object.keys(this.localPerms)
|
||||
.filter((key) => this.localPerms[key])
|
||||
.join(",");
|
||||
params.permissions = permissionsString;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
|
||||
if (state.isSearchActive || getters.currentView() === "preview") {
|
||||
const selected = state.selected[0];
|
||||
const item = state.req.items?.at(selected) || selected;
|
||||
const item = state.req.items?.[selected] || selected;
|
||||
const previewUrl = this.getPreviewUrl(item.source || state.req.source, item.path, item.modified, item.type);
|
||||
items.push({
|
||||
source: item.source || state.req.source,
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
hasPreview: item.hasPreview,
|
||||
});
|
||||
} else if (!this.isListing) {
|
||||
const item = state.req.items.at(state.selected[0]);
|
||||
const item = state.req.items[state.selected[0]];
|
||||
const previewUrl = this.getPreviewUrl(item.source || state.req.source, item.path, item.modified, item.type);
|
||||
items.push({
|
||||
source: item.source || state.req.source,
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
for (const index of state.selected) {
|
||||
const item = state.req.items.at(index);
|
||||
const item = state.req.items[index];
|
||||
const previewUrl = this.getPreviewUrl(item.source || state.req.source, item.path, item.modified, item.type);
|
||||
items.push({
|
||||
source: item.source || state.req.source,
|
||||
|
||||
@@ -106,13 +106,13 @@ export default {
|
||||
return getters.currentPrompt();
|
||||
},
|
||||
downloads() {
|
||||
return downloadManager.queue || [];
|
||||
return downloadManager?.queue || [];
|
||||
},
|
||||
hasDownloads() {
|
||||
return (downloadManager.queue.length || 0) > 0;
|
||||
return (downloadManager?.queue?.length || 0) > 0;
|
||||
},
|
||||
hasClearable() {
|
||||
if (!downloadManager.queue) {
|
||||
if (!downloadManager?.queue) {
|
||||
return false;
|
||||
}
|
||||
return downloadManager.queue.some((download) =>
|
||||
@@ -173,7 +173,7 @@ export default {
|
||||
},
|
||||
close() {
|
||||
// Only close if no active downloads
|
||||
if (!downloadManager.hasActive()) {
|
||||
if (!downloadManager?.hasActive()) {
|
||||
const prompt = getters.currentPrompt();
|
||||
if (prompt?.name === 'download') {
|
||||
mutations.closeTopPrompt();
|
||||
|
||||
@@ -78,11 +78,7 @@ import buttons from "@/utils/buttons";
|
||||
import * as upload from "@/utils/upload";
|
||||
import { url } from "@/utils";
|
||||
import { notify } from "@/notify";
|
||||
import {
|
||||
notifyMoveCopyComplete,
|
||||
notifyOperationError,
|
||||
} from "@/utils/appNotifications";
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
import { goToItem } from "@/utils/url";
|
||||
import LoadingSpinner from "@/components/LoadingSpinner.vue";
|
||||
import PathPickerButton from "@/components/files/PathPickerButton.vue";
|
||||
import { eventBus } from '@/store/eventBus';
|
||||
@@ -164,7 +160,7 @@ export default {
|
||||
}));
|
||||
} else if (state.isSearchActive) {
|
||||
// Add null checks to prevent undefined values
|
||||
if (state.selected[0]?.path) {
|
||||
if (state.selected?.[0]?.path) {
|
||||
this.localItems = [
|
||||
{
|
||||
from: state.selected[0].path,
|
||||
@@ -176,7 +172,7 @@ export default {
|
||||
} else {
|
||||
if (state.selected && state.req?.items) {
|
||||
for (const item of state.selected) {
|
||||
const reqItem = state.req.items.at(item);
|
||||
const reqItem = state.req.items[item];
|
||||
if (reqItem?.path) {
|
||||
this.localItems.push({
|
||||
from: reqItem.path,
|
||||
@@ -225,7 +221,7 @@ export default {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
if (this.newDirName && this.isDirNameValid) {
|
||||
void this.createDirectory();
|
||||
this.createDirectory();
|
||||
}
|
||||
},
|
||||
async createDirectory() {
|
||||
@@ -243,10 +239,10 @@ export default {
|
||||
}
|
||||
// Refresh the file list while keeping the current navigation that we did in the prompt
|
||||
if (getters.isShare()) {
|
||||
await resourcesApi.fetchFilesPublic(currentPath, state.shareInfo.hash)
|
||||
resourcesApi.fetchFilesPublic(currentPath, state.shareInfo?.hash)
|
||||
.then((req) => this.$refs.fileList.fillOptions(req, true));
|
||||
} else {
|
||||
await resourcesApi.fetchFiles(currentSource, currentPath)
|
||||
resourcesApi.fetchFiles(currentSource, currentPath)
|
||||
.then((req) => this.$refs.fileList.fillOptions(req, true));
|
||||
}
|
||||
// Clicking create will also return the buttons to their normal state
|
||||
@@ -359,7 +355,6 @@ export default {
|
||||
// All operations failed - show error but DON'T close prompt
|
||||
const errorMessage = result.failed[0]?.message || this.$t("prompts.operationFailed");
|
||||
notify.showError(errorMessage);
|
||||
notifyOperationError(errorMessage);
|
||||
return;
|
||||
} else if (hasFailures && hasSuccesses) {
|
||||
// Partial failure - show warning and continue
|
||||
@@ -387,7 +382,6 @@ export default {
|
||||
|
||||
if (!hasFailures || hasSuccesses) {
|
||||
notify.showSuccessToast(this.$t("prompts.moveSuccess"));
|
||||
notifyMoveCopyComplete("move", this.localItems.length);
|
||||
}
|
||||
|
||||
// Navigate next, previous or parent dir (like when deleting)
|
||||
@@ -414,25 +408,27 @@ export default {
|
||||
const destSource = this.destSource;
|
||||
const destPath = this.destPath;
|
||||
|
||||
// Show success notification with optional button to navigate to destination
|
||||
// For shares, destSource might be null, but goToItem handles shares via state.shareInfo.hash
|
||||
const buttonAction = () => {
|
||||
if (destPath) {
|
||||
goToItem(destSource || state.shareInfo?.hash, destPath, {}, false, getters.isShare());
|
||||
}
|
||||
};
|
||||
const buttonProps = {
|
||||
icon: "folder",
|
||||
buttons: destPath
|
||||
? [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
destSource || state.shareInfo?.hash,
|
||||
destPath,
|
||||
getters.isShare()
|
||||
),
|
||||
]
|
||||
: undefined,
|
||||
buttons: destPath ? [
|
||||
{
|
||||
label: this.$t("buttons.goToItem"),
|
||||
primary: true,
|
||||
action: buttonAction
|
||||
}
|
||||
] : undefined
|
||||
};
|
||||
if (this.operation === "move") {
|
||||
notify.showSuccess(this.$t("prompts.moveSuccess"), buttonProps);
|
||||
notifyMoveCopyComplete("move", this.localItems.length);
|
||||
} else {
|
||||
notify.showSuccess(this.$t("prompts.copySuccess"), buttonProps);
|
||||
notifyMoveCopyComplete("copy", this.localItems.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,7 +454,6 @@ export default {
|
||||
}
|
||||
|
||||
notify.showError(errorMessage);
|
||||
notifyOperationError(errorMessage);
|
||||
} finally {
|
||||
this.isLoading = false; // Hide loading spinner
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ import { resourcesApi } from "@/api";
|
||||
import { getters, mutations, state } from "@/store"; // Import your custom store
|
||||
import { url } from "@/utils";
|
||||
import { notify } from "@/notify";
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
import LoadingSpinner from "@/components/LoadingSpinner.vue";
|
||||
export default {
|
||||
name: "new-dir",
|
||||
@@ -113,16 +112,16 @@ export default {
|
||||
},
|
||||
|
||||
showNotification(source, newPath) {
|
||||
const buttonAction = () => {
|
||||
url.goToItem(source, newPath, {}, false, getters.isShare());
|
||||
};
|
||||
const buttonProps = {
|
||||
icon: "folder",
|
||||
buttons: [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
source,
|
||||
newPath,
|
||||
getters.isShare()
|
||||
),
|
||||
],
|
||||
buttons: [{
|
||||
label: this.$t("buttons.goToItem"),
|
||||
primary: true,
|
||||
action: buttonAction
|
||||
}]
|
||||
};
|
||||
notify.showSuccess(this.$t("prompts.newDirSuccess"), buttonProps);
|
||||
},
|
||||
|
||||
@@ -37,7 +37,6 @@ import { resourcesApi } from "@/api";
|
||||
import { getters, mutations } from "@/store"; // Import your custom store
|
||||
import { notify } from "@/notify";
|
||||
import { url } from "@/utils";
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
import LoadingSpinner from "@/components/LoadingSpinner.vue";
|
||||
export default {
|
||||
name: "new-file",
|
||||
@@ -110,16 +109,16 @@ export default {
|
||||
},
|
||||
|
||||
showNotification(source, newPath) {
|
||||
const buttonAction = () => {
|
||||
url.goToItem(source, newPath, {}, false, getters.isShare());
|
||||
};
|
||||
const buttonProps = {
|
||||
icon: "insert_drive_file",
|
||||
buttons: [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
source,
|
||||
newPath,
|
||||
getters.isShare()
|
||||
),
|
||||
],
|
||||
buttons: [{
|
||||
label: this.$t("buttons.goToItem"),
|
||||
primary: true,
|
||||
action: buttonAction
|
||||
}]
|
||||
};
|
||||
notify.showSuccess(this.$t("prompts.newFileSuccess"), buttonProps);
|
||||
},
|
||||
|
||||
@@ -71,13 +71,13 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
playbackQueue() {
|
||||
return state.playbackQueue.queue;
|
||||
return state.playbackQueue?.queue || [];
|
||||
},
|
||||
currentQueueIndex() {
|
||||
return state.playbackQueue.currentIndex;
|
||||
return state.playbackQueue?.currentIndex ?? -1;
|
||||
},
|
||||
playbackMode() {
|
||||
return state.playbackQueue.mode || 'single';
|
||||
return state.playbackQueue?.mode || 'single';
|
||||
},
|
||||
queueCount() {
|
||||
return this.playbackQueue.length;
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
}));
|
||||
},
|
||||
isPlaying() {
|
||||
return state.playbackQueue.isPlaying || false;
|
||||
return state.playbackQueue?.isPlaying || false;
|
||||
},
|
||||
isPromptVisible() {
|
||||
// Check if this PlaybackQueue prompt is the current active prompt
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
},
|
||||
navigateToIndex(index) {
|
||||
if (index >= 0 && index < this.playbackQueue.length) {
|
||||
const item = this.playbackQueue.at(index);
|
||||
const item = this.playbackQueue[index];
|
||||
// Update store with new current index
|
||||
mutations.setPlaybackQueue({
|
||||
queue: this.playbackQueue,
|
||||
|
||||
@@ -111,7 +111,6 @@ import Unarchive from "./Unarchive.vue";
|
||||
import OfficeDebug from "./OfficeDebug.vue";
|
||||
import ThreeJSControls from "./ThreeJSControls.vue";
|
||||
import { state, getters, mutations } from "@/store";
|
||||
import { getObjectProperty, omitObjectProperty, setObjectProperty } from "@/utils/object.js";
|
||||
|
||||
export default {
|
||||
name: "Prompts",
|
||||
@@ -212,16 +211,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
triggerPromptBorderFlash(id) {
|
||||
const timer = getObjectProperty(this.flashBorderTimers, id);
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
if (this.flashBorderTimers[id]) {
|
||||
clearTimeout(this.flashBorderTimers[id]);
|
||||
}
|
||||
this.flashBorderIds = setObjectProperty(this.flashBorderIds, id, true);
|
||||
this.flashBorderTimers = setObjectProperty(this.flashBorderTimers, id, setTimeout(() => {
|
||||
const next = omitObjectProperty(this.flashBorderIds, id);
|
||||
this.flashBorderIds = { ...this.flashBorderIds, [id]: true };
|
||||
this.flashBorderTimers[id] = setTimeout(() => {
|
||||
const next = { ...this.flashBorderIds };
|
||||
delete next[id];
|
||||
this.flashBorderIds = next;
|
||||
this.flashBorderTimers = omitObjectProperty(this.flashBorderTimers, id);
|
||||
}, 500));
|
||||
delete this.flashBorderTimers[id];
|
||||
}, 500);
|
||||
},
|
||||
handleWindowResize() {
|
||||
const maxWidth = window.innerWidth * 0.9;
|
||||
@@ -366,7 +365,7 @@ export default {
|
||||
const promptToClose = state.prompts.find(p => p.id === id);
|
||||
if (!promptToClose) return;
|
||||
// Check if it's the upload prompt with active uploads
|
||||
if (promptToClose.name === "upload") {
|
||||
if (promptToClose?.name === "upload") {
|
||||
const hasActiveUploads = state.upload.isUploading;
|
||||
const hasWarningPrompt = state.prompts.some(p => p.name === "CloseWithActiveUploads");
|
||||
|
||||
@@ -395,11 +394,11 @@ export default {
|
||||
this.cleanupDragState(id);
|
||||
},
|
||||
cleanupDragState(id) {
|
||||
this.dragOffsets = omitObjectProperty(this.dragOffsets, id);
|
||||
this.dragStarts = omitObjectProperty(this.dragStarts, id);
|
||||
this.touchIds = omitObjectProperty(this.touchIds, id);
|
||||
delete this.dragOffsets[id];
|
||||
delete this.dragStarts[id];
|
||||
delete this.touchIds[id];
|
||||
this.draggingIds.delete(id);
|
||||
this.sizes = omitObjectProperty(this.sizes, id);
|
||||
delete this.sizes[id];
|
||||
},
|
||||
/**
|
||||
* Escape closes the top prompt. Enter clicks the last `.card-actions` button (far right in DOM).
|
||||
@@ -471,7 +470,7 @@ export default {
|
||||
const headerHeight = headerEl ? headerEl.getBoundingClientRect().height : 40;
|
||||
const rect = el.getBoundingClientRect();
|
||||
const windowHeight = rect.height;
|
||||
const offset = getObjectProperty(this.dragOffsets, id) || { x: 0, y: 0 };
|
||||
const offset = this.dragOffsets[id] || { x: 0, y: 0 };
|
||||
const centerX = viewportW / 2 + offset.x;
|
||||
const centerY = viewportH / 2 + offset.y;
|
||||
|
||||
@@ -482,10 +481,10 @@ export default {
|
||||
const clampedX = Math.max(minCenterX, Math.min(maxCenterX, centerX));
|
||||
const clampedY = Math.max(minCenterY, Math.min(maxCenterY, centerY));
|
||||
|
||||
this.dragOffsets = setObjectProperty(this.dragOffsets, id, {
|
||||
this.dragOffsets[id] = {
|
||||
x: clampedX - viewportW / 2,
|
||||
y: clampedY - viewportH / 2,
|
||||
});
|
||||
};
|
||||
},
|
||||
getPromptElement(id) {
|
||||
const windows = this.$refs.promptWindow;
|
||||
@@ -500,26 +499,14 @@ export default {
|
||||
this.makeTopPrompt(id);
|
||||
if (type === "mouse" && e.button !== 0) return;
|
||||
if (type === "touch") {
|
||||
const touchId = e.changedTouches?.[0]?.identifier;
|
||||
if (touchId !== undefined) {
|
||||
this.touchIds = setObjectProperty(this.touchIds, id, touchId);
|
||||
}
|
||||
this.touchIds[id] = e.changedTouches?.[0]?.identifier;
|
||||
}
|
||||
|
||||
const pos = this.getPointerPos(e, type);
|
||||
if (!pos) return;
|
||||
|
||||
let dragOffsets = this.dragOffsets;
|
||||
const existingOffset = getObjectProperty(dragOffsets, id);
|
||||
if (!existingOffset) {
|
||||
dragOffsets = setObjectProperty(dragOffsets, id, { x: 0, y: 0 });
|
||||
this.dragOffsets = dragOffsets;
|
||||
}
|
||||
const offset = getObjectProperty(this.dragOffsets, id);
|
||||
this.dragStarts = setObjectProperty(this.dragStarts, id, {
|
||||
x: pos.x - offset.x,
|
||||
y: pos.y - offset.y,
|
||||
});
|
||||
if (!this.dragOffsets[id]) this.dragOffsets[id] = { x: 0, y: 0 };
|
||||
this.dragStarts[id] = { x: pos.x - this.dragOffsets[id].x, y: pos.y - this.dragOffsets[id].y };
|
||||
this.draggingIds.add(id);
|
||||
|
||||
const move = (e) => this.onPointerMove(e, id, type);
|
||||
@@ -535,12 +522,11 @@ export default {
|
||||
}
|
||||
},
|
||||
onPointerMove(e, id, type) {
|
||||
const dragStart = getObjectProperty(this.dragStarts, id);
|
||||
if (!dragStart) return;
|
||||
if (!this.dragStarts[id]) return;
|
||||
let pos;
|
||||
if (type === "touch") {
|
||||
if (!e.touches) return;
|
||||
const t = Array.from(e.touches).find((touch) => touch.identifier === getObjectProperty(this.touchIds, id));
|
||||
const t = Array.from(e.touches).find((touch) => touch.identifier === this.touchIds[id]);
|
||||
if (!t) return;
|
||||
e.preventDefault();
|
||||
pos = { x: t.clientX, y: t.clientY };
|
||||
@@ -548,10 +534,10 @@ export default {
|
||||
pos = { x: e.clientX, y: e.clientY };
|
||||
}
|
||||
|
||||
this.dragOffsets = setObjectProperty(this.dragOffsets, id, {
|
||||
x: pos.x - dragStart.x,
|
||||
y: pos.y - dragStart.y,
|
||||
});
|
||||
this.dragOffsets[id] = {
|
||||
x: pos.x - this.dragStarts[id].x,
|
||||
y: pos.y - this.dragStarts[id].y,
|
||||
};
|
||||
|
||||
// Find the element for this prompt
|
||||
const windows = this.$refs.promptWindow;
|
||||
@@ -560,7 +546,7 @@ export default {
|
||||
},
|
||||
onPointerEnd(_e, id, type, moveHandler, endHandler) {
|
||||
if (type === "touch") {
|
||||
this.touchIds = omitObjectProperty(this.touchIds, id);
|
||||
delete this.touchIds[id];
|
||||
window.removeEventListener("touchmove", moveHandler);
|
||||
window.removeEventListener("touchend", endHandler);
|
||||
window.removeEventListener("touchcancel", endHandler);
|
||||
@@ -568,7 +554,7 @@ export default {
|
||||
window.removeEventListener("mousemove", moveHandler);
|
||||
window.removeEventListener("mouseup", endHandler);
|
||||
}
|
||||
this.dragStarts = omitObjectProperty(this.dragStarts, id);
|
||||
delete this.dragStarts[id];
|
||||
this.draggingIds.delete(id);
|
||||
},
|
||||
startResize(e, id, edge) {
|
||||
@@ -582,25 +568,20 @@ export default {
|
||||
: windows;
|
||||
if (!el) return;
|
||||
// Capture current size (if not already fixed, set it)
|
||||
let sizes = this.sizes;
|
||||
const existingSize = getObjectProperty(sizes, id);
|
||||
if (!existingSize) {
|
||||
sizes = setObjectProperty(sizes, id, {
|
||||
if (!this.sizes[id]) {
|
||||
this.sizes[id] = {
|
||||
width: el.offsetWidth,
|
||||
height: el.offsetHeight,
|
||||
});
|
||||
this.sizes = sizes;
|
||||
};
|
||||
}
|
||||
const currentSize = getObjectProperty(this.sizes, id);
|
||||
const dragOffset = getObjectProperty(this.dragOffsets, id) || { x: 0, y: 0 };
|
||||
// Initial values
|
||||
this.resizingId = id;
|
||||
this.resizingEdge = edge;
|
||||
this.resizeStart = {
|
||||
width: currentSize.width,
|
||||
height: currentSize.height,
|
||||
offsetX: dragOffset.x,
|
||||
offsetY: dragOffset.y,
|
||||
width: this.sizes[id].width,
|
||||
height: this.sizes[id].height,
|
||||
offsetX: this.dragOffsets[id]?.x || 0,
|
||||
offsetY: this.dragOffsets[id]?.y || 0,
|
||||
clientX: pos.x,
|
||||
clientY: pos.y,
|
||||
};
|
||||
@@ -619,6 +600,7 @@ export default {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
},
|
||||
|
||||
onResizeMove(e, type) {
|
||||
if (!this.resizingId) return;
|
||||
const pos = this.getPointerPos(e, type);
|
||||
@@ -681,12 +663,12 @@ export default {
|
||||
deltaOffsetY = +(newHeight - start.height) / 2;
|
||||
}
|
||||
// Update sizes
|
||||
this.sizes = setObjectProperty(this.sizes, id, { width: newWidth, height: newHeight });
|
||||
this.sizes[id] = { width: newWidth, height: newHeight };
|
||||
// Update drag
|
||||
this.dragOffsets = setObjectProperty(this.dragOffsets, id, {
|
||||
this.dragOffsets[id] = {
|
||||
x: start.offsetX + deltaOffsetX,
|
||||
y: start.offsetY + deltaOffsetY,
|
||||
});
|
||||
};
|
||||
// Clamp to viewport
|
||||
const windows = this.$refs.promptWindow;
|
||||
const el = Array.isArray(windows)
|
||||
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
event.stopPropagation();
|
||||
}
|
||||
if (event.key === 'Enter') {
|
||||
void this.submit();
|
||||
this.submit();
|
||||
}
|
||||
},
|
||||
updateFullName() {
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
}
|
||||
|
||||
// Use parentItems if we are in a preview, otherwise use state.req.items
|
||||
const items = this.parentItems.length > 0 ? this.parentItems : (state.req?.items ?? []);
|
||||
const items = this.parentItems.length > 0 ? this.parentItems : (state.req?.items || []);
|
||||
for (const item of items) {
|
||||
if (!item.name) {
|
||||
continue;
|
||||
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
},
|
||||
isSameFile() {
|
||||
// Check if the current prompt has props indicating same file
|
||||
return this.currentPrompt.props?.isSameFile === true;
|
||||
return this.currentPrompt?.props?.isSameFile === true;
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
|
||||
@@ -560,9 +560,7 @@ export default {
|
||||
return this.req.path;
|
||||
}
|
||||
const index = /** @type {number} */ (this.selected[0]);
|
||||
const item = this.req.items.at(index);
|
||||
if (!item) return this.req.path;
|
||||
return buildItemUrl(item.source, item.path);
|
||||
return buildItemUrl(this.req.items[index].source, this.req.items[index].path);
|
||||
},
|
||||
isEditMode() {
|
||||
return this.editing && this.link && Object.keys(this.link).length > 0;
|
||||
@@ -798,18 +796,24 @@ export default {
|
||||
payload.enableOnlyOffice = false;
|
||||
}
|
||||
|
||||
await shareApi.create(payload);
|
||||
const res = await shareApi.create(payload);
|
||||
|
||||
if (this.isEditMode) {
|
||||
if (!this.isEditMode && !this.editingLink) {
|
||||
this.links.push(res);
|
||||
this.sort();
|
||||
} else if (this.editingLink) {
|
||||
// Update the link in the local list
|
||||
const index = this.links.findIndex(l => l.hash === this.editingLink.hash);
|
||||
if (index !== -1) {
|
||||
this.links[index] = res;
|
||||
}
|
||||
this.editingLink = null;
|
||||
// emit event to reload shares in settings view
|
||||
eventBus.emit('sharesChanged');
|
||||
} else {
|
||||
// emit event to reload shares in settings view
|
||||
eventBus.emit('sharesChanged');
|
||||
mutations.closeTopPrompt();
|
||||
} else {
|
||||
// refrest the shares list when editing or creating from listing view
|
||||
const refreshed = await this.refreshShares();
|
||||
if (!refreshed) return;
|
||||
this.editingLink = null;
|
||||
eventBus.emit('sharesChanged');
|
||||
}
|
||||
|
||||
this.time = "";
|
||||
@@ -825,21 +829,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async refreshShares() {
|
||||
if (this.isEditMode) return true;
|
||||
this.linksLoading = true;
|
||||
try {
|
||||
const links = await shareApi.get(this.item.path, this.item.source);
|
||||
this.links = links;
|
||||
this.sort();
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return false;
|
||||
} finally {
|
||||
this.linksLoading = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @param {Share} link
|
||||
*/
|
||||
@@ -912,7 +901,7 @@ export default {
|
||||
* @param {number} time
|
||||
*/
|
||||
humanTime(time) {
|
||||
return fromNow(time, state.user?.locale)
|
||||
return fromNow(time, state.user.locale)
|
||||
},
|
||||
sort() {
|
||||
this.links = this.links.sort((a, b) => {
|
||||
@@ -1096,13 +1085,9 @@ export default {
|
||||
this.filePickerField = null;
|
||||
},
|
||||
validateExtensions(value) {
|
||||
const normalized = value.trim();
|
||||
if (normalized === "" || normalized === "*") {
|
||||
return true;
|
||||
}
|
||||
const parts = normalized.split(/\s+/);
|
||||
const extensionRegex = /^\.\w+$/;
|
||||
return parts.every(part => extensionRegex.test(part));
|
||||
if (value === "" || value === "*") return true;
|
||||
const regex = /^\.\w+(?: \.\w+)*$/;
|
||||
return regex.test(value);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
if (!state.shareInfo?.isPasswordProtected) {
|
||||
return true
|
||||
}
|
||||
return state.shareInfo?.passwordValid
|
||||
return state.shareInfo.passwordValid
|
||||
},
|
||||
getShareBanner() {
|
||||
if (state.shareInfo?.banner.startsWith("http")) {
|
||||
|
||||
@@ -295,7 +295,6 @@ import { notify } from "@/notify";
|
||||
import { usersApi, shareApi } from "@/api";
|
||||
import { tools } from "@/utils/constants";
|
||||
import { getIconClass } from "@/utils/material-symbols";
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
import FileList from "../files/FileList.vue";
|
||||
import ToggleSwitch from "@/components/settings/ToggleSwitch.vue";
|
||||
import { eventBus } from "@/store/eventBus";
|
||||
@@ -405,7 +404,7 @@ export default {
|
||||
// Initialize with existing sidebar links based on context
|
||||
if (this.context === 'share' && this.shareData?.sidebarLinks) {
|
||||
this.links = [...this.shareData.sidebarLinks];
|
||||
} else if (this.context === 'user' && state.user?.sidebarLinks && state.user?.sidebarLinks.length > 0) {
|
||||
} else if (this.context === 'user' && state.user?.sidebarLinks && state.user.sidebarLinks.length > 0) {
|
||||
this.links = [...state.user.sidebarLinks];
|
||||
} else if (this.context === 'user') {
|
||||
// Generate default links from sources for user context
|
||||
@@ -414,7 +413,7 @@ export default {
|
||||
|
||||
if (this.context === 'user') {
|
||||
if (typeof state.user?.showToolsInSidebar === 'boolean') {
|
||||
this.showToolsInSidebar = state.user?.showToolsInSidebar;
|
||||
this.showToolsInSidebar = state.user.showToolsInSidebar;
|
||||
} else {
|
||||
this.showToolsInSidebar = true;
|
||||
}
|
||||
@@ -550,28 +549,20 @@ export default {
|
||||
}
|
||||
},
|
||||
getCategoryLabel(category) {
|
||||
switch (category) {
|
||||
case 'source':
|
||||
case 'source-minimal':
|
||||
case 'source-alt':
|
||||
case 'source-hybrid':
|
||||
case 'source-hybrid-2':
|
||||
return this.$t('general.source');
|
||||
case 'tool':
|
||||
return this.$t('general.tool');
|
||||
case 'custom':
|
||||
return this.$t('sidebar.customLink');
|
||||
case 'share':
|
||||
return this.$t('general.share');
|
||||
case 'shareInfo':
|
||||
return this.$t('share.shareInfo');
|
||||
case 'download':
|
||||
return this.$t('general.download');
|
||||
case 'divider':
|
||||
return this.$t('general.divider');
|
||||
default:
|
||||
return category;
|
||||
}
|
||||
const labels = {
|
||||
source: this.$t('general.source'),
|
||||
'source-minimal': this.$t('general.source'),
|
||||
'source-alt': this.$t('general.source'),
|
||||
'source-hybrid': this.$t('general.source'),
|
||||
'source-hybrid-2': this.$t('general.source'),
|
||||
tool: this.$t('general.tool'),
|
||||
custom: this.$t('sidebar.customLink'),
|
||||
share: this.$t('general.share'),
|
||||
shareInfo: this.$t('share.shareInfo'),
|
||||
download: this.$t('general.download'),
|
||||
divider: this.$t('general.divider'),
|
||||
};
|
||||
return labels[category] || category;
|
||||
},
|
||||
getLinkDisplayName(link) {
|
||||
// For dividers, show the name or a default
|
||||
@@ -710,8 +701,7 @@ export default {
|
||||
this.tempSelectedSource = "";
|
||||
},
|
||||
editLink(index) {
|
||||
const link = this.links.at(index);
|
||||
if (!link) return;
|
||||
const link = this.links[index];
|
||||
this.editingIndex = index;
|
||||
this.showAddForm = true;
|
||||
|
||||
@@ -817,7 +807,7 @@ export default {
|
||||
event.dataTransfer.setData("text/html", event.target);
|
||||
|
||||
// Set the entire link item as the drag image
|
||||
const linkItem = getObjectProperty(this.linkItemRefs, index);
|
||||
const linkItem = this.linkItemRefs[index];
|
||||
if (linkItem) {
|
||||
// Create a clone for the drag image to avoid affecting the original
|
||||
const clone = linkItem.cloneNode(true);
|
||||
@@ -909,7 +899,7 @@ export default {
|
||||
|
||||
await usersApi.update(updatedUser, ['sidebarLinks', 'showToolsInSidebar']);
|
||||
|
||||
void mutations.updateCurrentUser({
|
||||
mutations.updateCurrentUser({
|
||||
sidebarLinks: [...this.links],
|
||||
showToolsInSidebar: this.showToolsInSidebar,
|
||||
});
|
||||
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
// Wait for navigation so Layout mounts and registers the toast callback before we toast
|
||||
await this.$router.push(this.redirect);
|
||||
}
|
||||
void mutations.updateCurrentUser({ otpEnabled: true });
|
||||
mutations.updateCurrentUser({ otpEnabled: true });
|
||||
this.succeeded = true;
|
||||
this.error = "";
|
||||
notify.showSuccessToast(this.$t("otp.verificationSucceed"));
|
||||
|
||||
@@ -123,7 +123,7 @@ import { state, mutations, getters } from "@/store";
|
||||
import { url } from "@/utils";
|
||||
import { notify } from "@/notify";
|
||||
import { resourcesApi } from "@/api";
|
||||
import { goToItemNotificationButton } from "@/utils/notificationActions";
|
||||
import { goToItem } from "@/utils/url";
|
||||
import FileList from "@/components/files/FileList.vue";
|
||||
import LoadingSpinner from "@/components/LoadingSpinner.vue";
|
||||
import ToggleSwitch from "@/components/settings/ToggleSwitch.vue";
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
watch: {
|
||||
deleteAfter(newVal) {
|
||||
// Update the user preference in real time
|
||||
void mutations.updateCurrentUser({ deleteAfterArchive: newVal });
|
||||
mutations.updateCurrentUser({ deleteAfterArchive: newVal });
|
||||
},
|
||||
showFileList(newVal) {
|
||||
if (!newVal) {
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
if (this.newDirName && this.isDirNameValid) {
|
||||
void this.createDirectory();
|
||||
this.createDirectory();
|
||||
}
|
||||
},
|
||||
async createDirectory() {
|
||||
@@ -248,10 +248,10 @@ export default {
|
||||
await resourcesApi.post(currentSource, fullPath, "", false, undefined, {}, true);
|
||||
}
|
||||
if (getters.isShare()) {
|
||||
await resourcesApi.fetchFilesPublic(currentPath, state.shareInfo.hash)
|
||||
resourcesApi.fetchFilesPublic(currentPath, state.shareInfo?.hash)
|
||||
.then((req) => this.$refs.fileList.fillOptions(req, true));
|
||||
} else {
|
||||
await resourcesApi.fetchFiles(currentSource, currentPath)
|
||||
resourcesApi.fetchFiles(currentSource, currentPath)
|
||||
.then((req) => this.$refs.fileList.fillOptions(req, true));
|
||||
}
|
||||
mutations.setReload(true);
|
||||
@@ -280,18 +280,10 @@ export default {
|
||||
|
||||
const destPath = this.destPath;
|
||||
const destSource = toSource;
|
||||
const buttonAction = () => destPath && goToItem(destSource || state.shareInfo?.hash, destPath, {}, false, getters.isShare());
|
||||
notify.showSuccess(this.$t("prompts.unarchiveSuccess"), {
|
||||
icon: "folder",
|
||||
buttons: destPath
|
||||
? [
|
||||
goToItemNotificationButton(
|
||||
this.$t("buttons.goToItem"),
|
||||
destSource || state.shareInfo?.hash,
|
||||
destPath,
|
||||
getters.isShare()
|
||||
),
|
||||
]
|
||||
: undefined,
|
||||
buttons: destPath ? [{ label: this.$t("buttons.goToItem"), primary: true, action: buttonAction }] : undefined,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -56,22 +56,6 @@
|
||||
>
|
||||
{{ $t("general.folder") }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
style="margin-left: 1em"
|
||||
@click="triggerCameraPicker"
|
||||
class="button button--flat"
|
||||
>
|
||||
{{ $t("general.camera") }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
style="margin-left: 1em"
|
||||
@click="triggerVideoPicker"
|
||||
class="button button--flat"
|
||||
>
|
||||
{{ $t("general.video") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -205,10 +189,6 @@
|
||||
<input ref="fileInput" @change="onFilePicked" type="file" multiple style="display: none" />
|
||||
<input ref="folderInput" @change="onFolderPicked" type="file" webkitdirectory directory multiple
|
||||
style="display: none" />
|
||||
<input ref="cameraInput" @change="onFilePicked" type="file" accept="image/*" capture="environment"
|
||||
style="display: none" />
|
||||
<input ref="videoInput" @change="onFilePicked" type="file" accept="video/*" capture="environment"
|
||||
style="display: none" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -266,8 +246,6 @@ export default {
|
||||
setup(props) {
|
||||
const fileInput = ref(null);
|
||||
const folderInput = ref(null);
|
||||
const cameraInput = ref(null);
|
||||
const videoInput = ref(null);
|
||||
const files = computed(() => uploadManager.queue);
|
||||
const isDragging = ref(false);
|
||||
const showConflictPrompt = ref(false);
|
||||
@@ -302,7 +280,7 @@ export default {
|
||||
clearAll: clearAll.value,
|
||||
},
|
||||
};
|
||||
void mutations.updateCurrentUser(data);
|
||||
mutations.updateCurrentUser(data);
|
||||
await usersApi.update(data, ["fileLoading"]);
|
||||
notify.showSuccessToast("Upload settings updated");
|
||||
} catch (e) {
|
||||
@@ -346,7 +324,7 @@ export default {
|
||||
mutations.showPrompt({
|
||||
name: "rename",
|
||||
confirm: (newName) => {
|
||||
void renameUploadFolder(conflictingFolder, newName);
|
||||
renameUploadFolder(conflictingFolder, newName);
|
||||
},
|
||||
props: { folderName: conflictingFolder }
|
||||
});
|
||||
@@ -400,7 +378,7 @@ export default {
|
||||
|
||||
watch(isUploading, (active) => {
|
||||
if (active) {
|
||||
void acquireWakeLock();
|
||||
acquireWakeLock();
|
||||
} else {
|
||||
releaseWakeLock();
|
||||
}
|
||||
@@ -445,7 +423,7 @@ export default {
|
||||
|
||||
const handleVisibilityChange = async () => {
|
||||
if (document.visibilityState === "visible" && isUploading.value) {
|
||||
void acquireWakeLock();
|
||||
acquireWakeLock();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -478,7 +456,7 @@ export default {
|
||||
await processDroppedItems(items, destination);
|
||||
} else if (first.file instanceof File && typeof first.relativePath === 'string') {
|
||||
// This is an array of objects {file, relativePath} for paste from clipboard OS.
|
||||
void uploadManager.add(destination, items);
|
||||
uploadManager.add(destination, items);
|
||||
}
|
||||
} else if (items) {
|
||||
// This case handles a FileList object from the upload prompt's own input fields.
|
||||
@@ -488,7 +466,7 @@ export default {
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
document.addEventListener("visibilitychange", void handleVisibilityChange);
|
||||
document.addEventListener("visibilitychange", handleVisibilityChange);
|
||||
window.addEventListener("beforeunload", handleBeforeUnload);
|
||||
uploadManager.setOnConflict(handleConflict);
|
||||
if (props.initialItems) {
|
||||
@@ -497,7 +475,7 @@ export default {
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener("visibilitychange", void handleVisibilityChange);
|
||||
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
||||
window.removeEventListener("beforeunload", handleBeforeUnload);
|
||||
uploadManager.setOnConflict(() => {}); // cleanup
|
||||
releaseWakeLock();
|
||||
@@ -511,14 +489,6 @@ export default {
|
||||
if (folderInput.value) folderInput.value.click();
|
||||
};
|
||||
|
||||
const triggerCameraPicker = () => {
|
||||
if (cameraInput.value) cameraInput.value.click();
|
||||
};
|
||||
|
||||
const triggerVideoPicker = () => {
|
||||
if (videoInput.value) videoInput.value.click();
|
||||
};
|
||||
|
||||
const onFilePicked = (event) => {
|
||||
const pickedFiles = event.target.files;
|
||||
if (pickedFiles.length > 0) {
|
||||
@@ -600,7 +570,7 @@ export default {
|
||||
allFiles.forEach(files => { filesToUpload.push(...files); });
|
||||
|
||||
if (filesToUpload.length > 0) {
|
||||
void uploadManager.add(destination, filesToUpload);
|
||||
uploadManager.add(destination, filesToUpload);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -610,7 +580,7 @@ export default {
|
||||
relativePath: file.webkitRelativePath || file.name,
|
||||
}));
|
||||
if (filesToAdd.length > 0) {
|
||||
void uploadManager.add(destination, filesToAdd);
|
||||
uploadManager.add(destination, filesToAdd);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -667,14 +637,10 @@ export default {
|
||||
return {
|
||||
triggerFilePicker,
|
||||
triggerFolderPicker,
|
||||
triggerCameraPicker,
|
||||
triggerVideoPicker,
|
||||
onFilePicked,
|
||||
onFolderPicked,
|
||||
fileInput,
|
||||
folderInput,
|
||||
cameraInput,
|
||||
videoInput,
|
||||
files,
|
||||
isDragging,
|
||||
onDragEnter,
|
||||
|
||||
@@ -163,7 +163,6 @@ import Errors from "@/views/Errors.vue";
|
||||
import { notify } from "@/notify";
|
||||
import { globalVars } from "@/utils/constants";
|
||||
import { eventBus } from "@/store/eventBus";
|
||||
import { setObjectProperty } from '@/utils/object.js';
|
||||
|
||||
export default {
|
||||
name: "user-edit",
|
||||
@@ -514,7 +513,7 @@ export default {
|
||||
return "/";
|
||||
},
|
||||
openScopePicker(index) {
|
||||
const row = this.selectedSources.at(index);
|
||||
const row = this.selectedSources[index];
|
||||
if (!row?.name) {
|
||||
return;
|
||||
}
|
||||
@@ -585,7 +584,7 @@ export default {
|
||||
this.emitUserUpdate();
|
||||
},
|
||||
updateUserField(field, value) {
|
||||
this.user = setObjectProperty(this.user, field, value);
|
||||
this.user[field] = value;
|
||||
this.emitUserUpdate();
|
||||
},
|
||||
setDefaultLoginMethod() {
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
|
||||
<script>
|
||||
import LoadingSpinner from "@/components/LoadingSpinner.vue";
|
||||
import { getObjectProperty } from "@/utils/object.js";
|
||||
|
||||
function defaultCompare(av, bv) {
|
||||
if (av === bv) {
|
||||
@@ -95,17 +94,13 @@ function cellValueLookup(row, k) {
|
||||
if (!row || k === null) {
|
||||
return undefined;
|
||||
}
|
||||
const direct = getObjectProperty(row, k);
|
||||
if (direct !== undefined) {
|
||||
return direct;
|
||||
if (typeof row[k] !== "undefined") {
|
||||
return row[k];
|
||||
}
|
||||
if (typeof k === "string" && k.indexOf(".") !== -1) {
|
||||
let cur = row;
|
||||
for (const segment of k.split(".")) {
|
||||
if (cur === null) {
|
||||
return cur;
|
||||
}
|
||||
cur = getObjectProperty(cur, segment);
|
||||
cur = cur === null ? cur : cur[segment];
|
||||
}
|
||||
return cur;
|
||||
}
|
||||
@@ -244,9 +239,8 @@ export default {
|
||||
|
||||
resolvedKey(row) {
|
||||
const k = this.itemKey;
|
||||
const value = getObjectProperty(row, k);
|
||||
if (value !== undefined && value !== null) {
|
||||
return String(value);
|
||||
if (typeof row[k] !== "undefined" && row[k] !== null) {
|
||||
return String(row[k]);
|
||||
}
|
||||
return JSON.stringify(row);
|
||||
},
|
||||
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
return getters.isLoggedIn() && !getters.routePath().startsWith("/share");
|
||||
},
|
||||
toggleClick() {
|
||||
void mutations.updateCurrentUser({ singleClick: !state.user.singleClick });
|
||||
mutations.updateCurrentUser({ singleClick: !state.user.singleClick });
|
||||
},
|
||||
toggleDarkMode() {
|
||||
mutations.toggleDarkMode();
|
||||
@@ -165,7 +165,7 @@ export default {
|
||||
if (!state.showSidebar && state.user.stickySidebar) {
|
||||
mutations.toggleSidebar();
|
||||
}
|
||||
void mutations.updateCurrentUser({ stickySidebar: !state.user.stickySidebar });
|
||||
mutations.updateCurrentUser({ stickySidebar: !state.user.stickySidebar });
|
||||
},
|
||||
navigateTo(path,hash) {
|
||||
mutations.setPreviousHistoryItem({
|
||||
@@ -191,13 +191,14 @@ export default {
|
||||
let sharePath;
|
||||
|
||||
if (isShare && state.shareInfo?.hash) {
|
||||
const shareBase = `${globalVars.baseURL}public/share/${state.shareInfo.hash}`;
|
||||
const shareBase = `/public/share/${state.shareInfo.hash}`;
|
||||
const subPath = state.req?.path && state.req.path !== '/'
|
||||
? url.removeLeadingSlash(state.req.path)
|
||||
: '';
|
||||
sharePath = subPath ? `${shareBase}/${url.encodedPath(subPath)}` : shareBase;
|
||||
}
|
||||
await auth.logout(sharePath);
|
||||
await auth.logout();
|
||||
window.location.href = sharePath || '/login';
|
||||
},
|
||||
beforeEnter(el) {
|
||||
el.style.maxHeight = '0';
|
||||
|
||||
@@ -193,7 +193,6 @@ import { state, getters, mutations } from "@/store";
|
||||
import ProgressBar from "@/components/ProgressBar.vue";
|
||||
import { goToItem } from "@/utils/url";
|
||||
import { getIconClass } from "@/utils/material-symbols";
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
import IndexInfo from "@/components/files/IndexInfo.vue";
|
||||
import { globalVars } from "@/utils/constants";
|
||||
import { resourcesApi } from "@/api";
|
||||
@@ -234,7 +233,7 @@ export default {
|
||||
},
|
||||
isShare: () => getters.isShare(),
|
||||
hasLinks() {
|
||||
return this.sidebarLinksToDisplay.length > 0;
|
||||
return this.sidebarLinksToDisplay?.length > 0;
|
||||
},
|
||||
user: () => (state.user || {username: 'anonymous'}),
|
||||
sourceInfo() {
|
||||
@@ -267,7 +266,7 @@ export default {
|
||||
},
|
||||
sidebarLinksToDisplay() {
|
||||
// If viewing a share, use share's links
|
||||
if (getters.isShare() && state.shareInfo?.sidebarLinks?.length > 0) {
|
||||
if (getters.isShare() && state.shareInfo?.sidebarLinks && state.shareInfo.sidebarLinks.length > 0) {
|
||||
return state.shareInfo.sidebarLinks;
|
||||
}
|
||||
// If user has custom links, use those
|
||||
@@ -315,7 +314,7 @@ export default {
|
||||
},
|
||||
dropdownSourceItems() {
|
||||
return this.sourceNames.map(rawName => {
|
||||
const customLink = getObjectProperty(this.sourceLinkMap, rawName);
|
||||
const customLink = this.sourceLinkMap[rawName];
|
||||
return {
|
||||
rawName,
|
||||
displayName: customLink ? customLink.name : rawName,
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
<script>
|
||||
import { state, getters, mutations } from "@/store";
|
||||
import { getObjectProperty } from '@/utils/object.js';
|
||||
import { settings } from "@/utils/constants";
|
||||
import { router } from "@/router";
|
||||
|
||||
@@ -41,14 +40,14 @@ export default {
|
||||
shouldShow(setting) {
|
||||
const perm = setting?.permissions || {};
|
||||
// Check if all keys in setting.perm exist in state.user.perm and have truthy values
|
||||
return Object.keys(perm).every((key) => getObjectProperty(state.user.permissions, key));
|
||||
return Object.keys(perm).every((key) => state.user.permissions[key]);
|
||||
},
|
||||
active: (view) => state.activeSettingsView === view,
|
||||
setView(view) {
|
||||
mutations.closeHovers();
|
||||
mutations.closeTopPrompt();
|
||||
if (state.route.path !== "/settings") {
|
||||
void router.push({ path: "/settings", hash: `#${view}` }, () => {});
|
||||
router.push({ path: "/settings", hash: `#${view}` }, () => {});
|
||||
} else {
|
||||
mutations.setActiveSettingsView(view);
|
||||
}
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
<a :href="releaseUrl">{{ $t("sidebar.updateIsAvailable") }}</a>
|
||||
<i @click="setSeenUpdate" aria-label="close-banner" class="material-symbols">close</i>
|
||||
</div>
|
||||
<div v-if="showPwaInstall" class="button release-banner">
|
||||
<a href="#" @click.prevent="installPwa">{{ $t("pwa.install") }}</a>
|
||||
<i @click="dismissPwaInstall" aria-label="close-banner" class="material-symbols">close</i>
|
||||
</div>
|
||||
<SidebarSettings v-if="isSettings"></SidebarSettings>
|
||||
<SidebarGeneral v-if="!isSettings"></SidebarGeneral>
|
||||
<div class="buffer"></div>
|
||||
@@ -42,7 +38,6 @@
|
||||
<script>
|
||||
import { globalVars } from "@/utils/constants";
|
||||
import { getters, mutations, state } from "@/store"; // Import your custom store
|
||||
import { installAvailable, promptInstall } from "@/utils/pwaInstall";
|
||||
import SidebarGeneral from "./General.vue";
|
||||
import SidebarSettings from "./Settings.vue";
|
||||
|
||||
@@ -57,7 +52,6 @@ export default {
|
||||
resizeStartX: 0,
|
||||
resizeStartWidth: 0,
|
||||
previousSidebarSize: null, // Remember the previous width when switching from desktop to mobile.
|
||||
pwaInstallDismissed: sessionStorage.getItem("pwaInstallDismissed") === "true",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -70,10 +64,10 @@ export default {
|
||||
const sidebarVisible = getters.isSidebarVisible();
|
||||
const isSticky = getters.isStickySidebar();
|
||||
if (!sidebarVisible) {
|
||||
void mutations.updateCurrentUser({ stickySidebar: true });
|
||||
mutations.updateCurrentUser({ stickySidebar: true });
|
||||
mutations.toggleSidebar();
|
||||
} else if (sidebarVisible && isSticky) {
|
||||
void mutations.updateCurrentUser({ stickySidebar: false });
|
||||
mutations.updateCurrentUser({ stickySidebar: false });
|
||||
} else {
|
||||
mutations.toggleSidebar();
|
||||
}
|
||||
@@ -120,9 +114,6 @@ export default {
|
||||
!state.user.disableUpdateNotifications
|
||||
);
|
||||
},
|
||||
showPwaInstall() {
|
||||
return installAvailable.value && !this.pwaInstallDismissed && !this.isSettings;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getBaseFontSize() {
|
||||
@@ -177,13 +168,6 @@ export default {
|
||||
setSeenUpdate() {
|
||||
mutations.setSeenUpdate(globalVars.updateAvailable);
|
||||
},
|
||||
async installPwa() {
|
||||
await promptInstall();
|
||||
},
|
||||
dismissPwaInstall() {
|
||||
this.pwaInstallDismissed = true;
|
||||
sessionStorage.setItem("pwaInstallDismissed", "true");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
"goToItem": "انتقل إلى العنصر",
|
||||
"copyPath": "مسار النسخ",
|
||||
"pinItem": "تثبيت",
|
||||
"unpinItem": "إلغاء التثبيت",
|
||||
"sendToApp": "إرسال إلى التطبيق"
|
||||
"unpinItem": "إلغاء التثبيت"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "You don't have permissions to access this.",
|
||||
@@ -246,9 +245,7 @@
|
||||
"helpText2": "مطابقة السلسلة الفرعية على أسماء الملفات أو المجلدات فقط (وليس المسارات الكاملة). حالة الأحرف: مطابقة تامة للمطابقة الحساسة لحالة الأحرف\n\n لـ OR بين المصطلحات استخدم حرف الأنبوب؛ علامات اقتباس مزدوجة لعبارة واحدة\n\nتمكين البحث بحرف بدل لمزيد من الخيارات المتقدمة.",
|
||||
"useWildcardSearch": "البحث بحرف بدل (حساس لحالة الأحرف)",
|
||||
"useWildcardSearchDescription": "خيارات أحرف البدل المدعومة:\n\n- تطابق أي تسلسل: *\n\n- مطابقة حرف واحد: ؟\n\n- فئة الأحرف: [a-z]، [0-9]\n\n- النفي: [^0-9]\n\n- حرفيًا * أو ؟ أو [ يجب أن تكون ملفوفة بين قوسين، على سبيل المثال [*]، [?]، [?]، []\n\n- جميع النتائج حساسة لحالة الأحرف",
|
||||
"openInAdvancedSearch": "فتح في البحث المتقدم",
|
||||
"caseExact": "مطابقة تراعي تمييز الأحرف الكبيرة والصغيرة",
|
||||
"caseExactDescription": "قم بمطابقة أسماء الملفات والمجلدات باستخدام الأحرف الكبيرة والصغيرة بالضبط، بدلاً من تجاهل الفروق بين الأحرف الكبيرة والصغيرة."
|
||||
"openInAdvancedSearch": "فتح في البحث المتقدم"
|
||||
},
|
||||
"settings": {
|
||||
"avoidChanges": "(أتركه فارغاً إن لم ترد تغييره)",
|
||||
@@ -357,6 +354,7 @@
|
||||
"shareDurationDescription": "المدة قبل انتهاء صلاحية السهم. اتركها فارغة للحصة الدائمة.",
|
||||
"passwordDescription": "كلمة المرور الاختيارية مطلوبة للوصول إلى هذه المشاركة، بما في ذلك المستخدمون الذين تمت مصادقتهم.",
|
||||
"shareThemeColorDescription": "قيمة لون CSS المطبقة على سمة المشاركة (على سبيل المثال، أحمر، #0ea5e9، rgb(14,165,233)).",
|
||||
"shareTitleDescription": "عنوان الصفحة المخصص الذي يظهر في صفحة المشاركة.",
|
||||
"shareDescriptionHelp": "وصف قصير يظهر على صفحة المشاركة (يمكن استخدامه في العلامات الوصفية).",
|
||||
"shareBannerDescription": "عنوان URL لصورة الشعار أو المسار الذي يمكن للعميل الوصول إليه - يتم قبول إما المسار المطلق أو مسار الفهرس: على سبيل المثال 'https://domain.com/banner.png' أو '/path/to/banner.png'",
|
||||
"shareFaviconDescription": "عنوان URL أو المسار الذي يمكن للعميل الوصول إليه من قبل العميل - يتم قبول إما المسار المطلق أو مسار الفهرس: على سبيل المثال 'https://domain.com/favicon.png' أو '/path/to/favicon.png'",
|
||||
@@ -407,8 +405,7 @@
|
||||
"selectBannerImage": "تحديد صورة الشعار",
|
||||
"selectFaviconImage": "تحديد الصورة المفضلة",
|
||||
"deleteFailed": "فشل في حذف المشاركة",
|
||||
"readOnlySourceNotice": "هذا المصدر للقراءة فقط. يتم تعطيل تحميل المشاركات والأذونات التي تعدل الملفات.",
|
||||
"shareTitleDescription": "عنوان الصفحة المخصص الذي يظهر على صفحة المشاركة. إذا تم تثبيت تطبيق المشاركة هذا كتطبيق ويب تقدمي (PWA)، فإن اسم التطبيق يقتصر على 30 حرفًا."
|
||||
"readOnlySourceNotice": "هذا المصدر للقراءة فقط. يتم تعطيل تحميل المشاركات والأذونات التي تعدل الملفات."
|
||||
},
|
||||
"api": {
|
||||
"createdAt": "تم الإنشاء في:",
|
||||
@@ -575,9 +572,7 @@
|
||||
"no": "لا يوجد{suffix}",
|
||||
"to": "إلى{suffix}",
|
||||
"and": "و{suffix}",
|
||||
"or": "أو{suffix}",
|
||||
"camera": "الكاميرا{suffix}",
|
||||
"video": "فيديو{suffix}"
|
||||
"or": "أو{suffix}"
|
||||
},
|
||||
"access": {
|
||||
"rules": "قواعد الوصول",
|
||||
@@ -783,6 +778,7 @@
|
||||
"scopeAria": "قصر البحث على مجلد",
|
||||
"noTerms": "أدخل مصطلح بحث واحد على الأقل.",
|
||||
"termTooShort": "يجب ألا يقل حجم كل مصطلح بحث عن {minSearchLength} حرف على الأقل",
|
||||
"caseExact": "تطابق حساس لحالة الأحرف",
|
||||
"resultsTitle": "نتائج البحث",
|
||||
"invalidSources": "قم بتشغيل مصدر واحد على الأقل.",
|
||||
"noResults": "لا توجد ملفات أو مجلدات مطابقة."
|
||||
@@ -811,18 +807,7 @@
|
||||
"description": "عرض جميع التنبيهات من جلستك الحالية",
|
||||
"empty": "لا توجد إخطارات حتى الآن",
|
||||
"clearAll": "مسح الكل",
|
||||
"appEnabled": "إشعارات التطبيقات",
|
||||
"appEnabledDescription": "عرض إشعارات المتصفح عند انتهاء عمليات الملفات أثناء وجود علامة التبويب هذه في الخلفية. يتطلب إذنًا من المتصفح. يتم تخزينها في هذا المتصفح فقط.",
|
||||
"appUnsupported": "لا يدعم هذا المتصفح إشعارات التطبيقات.",
|
||||
"permissionGranted": "مسموح",
|
||||
"permissionDeniedHelp": "تم حظر الإشعارات. قم بتمكينها في إعدادات متصفحك لهذا الموقع.",
|
||||
"uploadTitle": "اكتمل التحميل",
|
||||
"downloadTitle": "تنزيل الملف بالكامل",
|
||||
"moveTitle": "اكتملت العملية",
|
||||
"copyTitle": "اكتملت النسخ",
|
||||
"uploadFailedTitle": "فشل التحميل",
|
||||
"downloadFailedTitle": "فشل التنزيل",
|
||||
"operationFailedTitle": "فشلت العملية"
|
||||
"total": "{count} الإخطارات"
|
||||
},
|
||||
"events": {
|
||||
"serverShutdown": "تم إيقاف تشغيل الخادم.",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "تنزيل المستند - مكتمل",
|
||||
"editorSuccess": "تهيئة المحرر - نجاح! اكتملت جميع الخطوات.",
|
||||
"setupError": "خطأ في الإعداد"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "تثبيت التطبيق"
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@
|
||||
"goToItem": "Přejít na položku",
|
||||
"copyPath": "Kopírovat cestu",
|
||||
"pinItem": "Připnout",
|
||||
"unpinItem": "Odepnout",
|
||||
"sendToApp": "Odeslat do aplikace"
|
||||
"unpinItem": "Odepnout"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "Nemáte oprávnění k přístupu.",
|
||||
@@ -162,6 +161,7 @@
|
||||
"shareDurationDescription": "Doba trvání před vypršením platnosti akcie. V případě trvalé akcie ponechte prázdné.",
|
||||
"passwordDescription": "Volitelné heslo vyžadované pro přístup k této sdílené složce, včetně ověřených uživatelů.",
|
||||
"shareThemeColorDescription": "Hodnota barvy CSS použitá na motiv sdílené položky (např. červená, #0ea5e9, rgb(14,165,233)).",
|
||||
"shareTitleDescription": "Vlastní název stránky zobrazený na stránce sdílení.",
|
||||
"shareDescriptionHelp": "Krátký popis zobrazený na stránce sdílení (lze použít v metaznačkách).",
|
||||
"shareBannerDescription": "Adresa URL nebo cesta k obrázku banneru přístupná klientovi - akceptována je buď absolutní, nebo indexová cesta: např. \"https://domain.com/banner.png\" nebo \"/path/to/banner.png\".",
|
||||
"shareFaviconDescription": "Adresa URL nebo cesta k faviconě přístupná klientovi -- akceptována je buď absolutní, nebo indexová cesta: např. \"https://domain.com/favicon.png\" nebo \"/path/to/favicon.png\".",
|
||||
@@ -212,8 +212,7 @@
|
||||
"selectBannerImage": "Výběr obrázku banneru",
|
||||
"selectFaviconImage": "Výběr obrázku favicon",
|
||||
"deleteFailed": "Nepodařilo se odstranit sdílenou složku",
|
||||
"readOnlySourceNotice": "Tento zdroj je určen pouze pro čtení. Sdílení nahrávání a oprávnění, která upravují soubory, jsou zakázána.",
|
||||
"shareTitleDescription": "Vlastní název stránky zobrazený na stránce pro sdílení. Je-li tato aplikace nainstalována jako PWA, délka názvu aplikace je omezena na 30 znaků."
|
||||
"readOnlySourceNotice": "Tento zdroj je určen pouze pro čtení. Sdílení nahrávání a oprávnění, která upravují soubory, jsou zakázána."
|
||||
},
|
||||
"prompts": {
|
||||
"deleteMessageSingle": "Opravdu chcete smazat tento soubor/složku?",
|
||||
@@ -316,9 +315,7 @@
|
||||
"helpText2": "Shoda podřetězce pouze s názvy souborů nebo složek (ne s úplnými cestami). case:exact pro porovnávání s rozlišováním malých a velkých písmen.\n\n pro OR mezi výrazy použijte znak pipe; dvojité uvozovky pro jednu frázi.\n\nPovolte vyhledávání se zástupnými znaky pro pokročilejší možnosti.",
|
||||
"useWildcardSearch": "Vyhledávání se zástupnými znaky (rozlišování velkých a malých písmen)",
|
||||
"useWildcardSearchDescription": "Podporované možnosti zástupných znaků:\n\n- Shodují se s libovolnou sekvencí: *\n\n- Shoda s jedním znakem: ?\n\n- Třída znaků: [a-z], [0-9]\n\n- Negace: [^0-9]\n\n- Doslovné *, ? nebo [ je třeba zabalit do závorek, např. [*], [?], [[].\n\n- U všech výsledků se rozlišují velká a malá písmena",
|
||||
"openInAdvancedSearch": "Otevřít v rozšířeném vyhledávání",
|
||||
"caseExact": "Porovnání s rozlišováním velkých a malých písmen",
|
||||
"caseExactDescription": "Porovnávejte názvy souborů a složek s ohledem na přesné rozlišování velkých a malých písmen, místo aby se velká a malá písmena ignorovala."
|
||||
"openInAdvancedSearch": "Otevřít v rozšířeném vyhledávání"
|
||||
},
|
||||
"profileSettings": {
|
||||
"hideFileExt": "Skrýt určité soubory (podle přípony)",
|
||||
@@ -669,9 +666,7 @@
|
||||
"no": "Ne{suffix}",
|
||||
"to": "až{suffix}",
|
||||
"and": "a{suffix}",
|
||||
"or": "nebo{suffix}",
|
||||
"camera": "Fotoaparát{suffix}",
|
||||
"video": "Video{suffix}"
|
||||
"or": "nebo{suffix}"
|
||||
},
|
||||
"access": {
|
||||
"rules": "Pravidla přístupu",
|
||||
@@ -783,6 +778,7 @@
|
||||
"scopeAria": "Omezení vyhledávání na složku",
|
||||
"noTerms": "Zadejte alespoň jeden hledaný výraz.",
|
||||
"termTooShort": "Každý hledaný výraz musí mít alespoň {minSearchLength} znaků.",
|
||||
"caseExact": "Shoda rozlišující malá a velká písmena",
|
||||
"resultsTitle": "Výsledky vyhledávání",
|
||||
"invalidSources": "Zapněte alespoň jeden zdroj.",
|
||||
"noResults": "Žádné odpovídající soubory nebo složky."
|
||||
@@ -811,18 +807,7 @@
|
||||
"description": "Zobrazení všech oznámení z aktuální relace",
|
||||
"empty": "Zatím žádná oznámení",
|
||||
"clearAll": "Vymazat vše",
|
||||
"appEnabled": "Oznámení v aplikaci",
|
||||
"appEnabledDescription": "Zobrazovat oznámení prohlížeče po dokončení operací se soubory, když je tato karta na pozadí. Vyžaduje oprávnění prohlížeče. Uloženo pouze v tomto prohlížeči.",
|
||||
"appUnsupported": "Tento prohlížeč nepodporuje oznámení z aplikací.",
|
||||
"permissionGranted": "povoleno",
|
||||
"permissionDeniedHelp": "Oznámení jsou zablokována. Povolte je v nastavení prohlížeče pro tento web.",
|
||||
"uploadTitle": "Nahrávání dokončeno",
|
||||
"downloadTitle": "Stažení dokončeno",
|
||||
"moveTitle": "Přesun dokončen",
|
||||
"copyTitle": "Kopírování dokončeno",
|
||||
"uploadFailedTitle": "Nahrávání se nezdařilo",
|
||||
"downloadFailedTitle": "Stahování se nezdařilo",
|
||||
"operationFailedTitle": "Operace se nezdařila"
|
||||
"total": "{count} oznámení"
|
||||
},
|
||||
"events": {
|
||||
"serverShutdown": "Server byl vypnut.",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "Dokument ke stažení - kompletní",
|
||||
"editorSuccess": "Inicializace editoru - úspěch! Všechny kroky byly dokončeny.",
|
||||
"setupError": "Chyba nastavení"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "Nainstalovat aplikaci"
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@
|
||||
"goToItem": "Weiter zum Artikel",
|
||||
"copyPath": "Pfad kopieren",
|
||||
"pinItem": "Anheften",
|
||||
"unpinItem": "Lösen",
|
||||
"sendToApp": "An App senden"
|
||||
"unpinItem": "Lösen"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "Sie haben keine Berechtigung dies abzurufen.",
|
||||
@@ -246,9 +245,7 @@
|
||||
"helpText2": "Teilstring-Übereinstimmung nur bei Datei- oder Ordnernamen (nicht bei vollständigen Pfaden). case:exact für Übereinstimmung unter Berücksichtigung der Groß-/Kleinschreibung\n\n für ODER zwischen Begriffen Pipe-Zeichen verwenden; doppelte Anführungszeichen für eine Phrase.\n\nAktivieren Sie die Platzhaltersuche für erweiterte Optionen.",
|
||||
"useWildcardSearch": "Wildcard-Suche (Groß- und Kleinschreibung beachten)",
|
||||
"useWildcardSearchDescription": "Unterstützte Platzhalteroptionen:\n\n- Entspricht einer beliebigen Sequenz: *\n\n- Übereinstimmung mit einem Zeichen: ?\n\n- Zeichenklasse: [a-z], [0-9]\n\n- Negation: [^0-9]\n\n- Buchstäbliche *, ? oder [ müssen in Klammern eingeschlossen werden, z. B. [*], [?], [[]\n\n- Bei allen Ergebnissen wird zwischen Groß- und Kleinschreibung unterschieden.",
|
||||
"openInAdvancedSearch": "In der erweiterten Suche öffnen",
|
||||
"caseExact": "Groß-/Kleinschreibung beachten",
|
||||
"caseExactDescription": "Datei- und Ordnernamen anhand der genauen Groß- und Kleinschreibung abgleichen, anstatt Groß- und Kleinschreibung zu ignorieren."
|
||||
"openInAdvancedSearch": "In der erweiterten Suche öffnen"
|
||||
},
|
||||
"settings": {
|
||||
"avoidChanges": "(leer lassen, um Änderungen zu vermeiden)",
|
||||
@@ -357,6 +354,7 @@
|
||||
"shareDurationDescription": "Dauer, bevor die Freigabe abläuft. Für eine dauerhafte Freigabe leer lassen.",
|
||||
"passwordDescription": "Optionales Kennwort, das für den Zugriff auf diese Freigabe erforderlich ist, einschließlich authentifizierter Benutzer.",
|
||||
"shareThemeColorDescription": "CSS-Farbwert, der auf das Thema der Freigabe angewendet wird (z. B. rot, #0ea5e9, rgb(14,165,233)).",
|
||||
"shareTitleDescription": "Benutzerdefinierter Seitentitel, der auf der Freigabeseite angezeigt wird.",
|
||||
"shareDescriptionHelp": "Kurze Beschreibung, die auf der Freigabeseite angezeigt wird (kann in Meta-Tags verwendet werden).",
|
||||
"shareBannerDescription": "URL oder Pfad des Bannerbildes, auf den der Client zugreifen kann - es wird entweder ein absoluter oder ein Indexpfad akzeptiert: z. B. \"https://domain.com/banner.png\" oder \"/pfad/zu/banner.png\".",
|
||||
"shareFaviconDescription": "Favicon-URL oder -Pfad, auf den der Client zugreifen kann - es wird entweder ein absoluter oder ein Indexpfad akzeptiert: z. B. 'https://domain.com/favicon.png' oder '/path/to/favicon.png'.",
|
||||
@@ -407,8 +405,7 @@
|
||||
"selectBannerImage": "Bannerbild auswählen",
|
||||
"selectFaviconImage": "Favicon-Bild auswählen",
|
||||
"deleteFailed": "Freigabe konnte nicht gelöscht werden",
|
||||
"readOnlySourceNotice": "Diese Quelle ist schreibgeschützt. Upload-Freigaben und Berechtigungen, die Dateien ändern, sind deaktiviert.",
|
||||
"shareTitleDescription": "Benutzerdefinierter Seitentitel, der auf der Freigabeseite angezeigt wird. Wenn diese Freigabe als PWA installiert ist, ist der App-Name auf 30 Zeichen begrenzt."
|
||||
"readOnlySourceNotice": "Diese Quelle ist schreibgeschützt. Upload-Freigaben und Berechtigungen, die Dateien ändern, sind deaktiviert."
|
||||
},
|
||||
"api": {
|
||||
"createdAt": "Erstellt am:",
|
||||
@@ -575,9 +572,7 @@
|
||||
"no": "Nein{suffix}",
|
||||
"to": "zu{suffix}",
|
||||
"and": "und{suffix}",
|
||||
"or": "oder{suffix}",
|
||||
"camera": "Kamera{suffix}",
|
||||
"video": "Video{suffix}"
|
||||
"or": "oder{suffix}"
|
||||
},
|
||||
"access": {
|
||||
"rules": "Zugangsregeln",
|
||||
@@ -783,6 +778,7 @@
|
||||
"scopeAria": "Suche auf einen Ordner beschränken",
|
||||
"noTerms": "Geben Sie mindestens einen Suchbegriff ein.",
|
||||
"termTooShort": "Jeder Suchbegriff muss mindestens {minSearchLength} Zeichen umfassen.",
|
||||
"caseExact": "Abgleich unter Berücksichtigung der Groß-/Kleinschreibung",
|
||||
"resultsTitle": "Suchergebnisse",
|
||||
"invalidSources": "Schalten Sie mindestens eine Quelle ein.",
|
||||
"noResults": "Keine passenden Dateien oder Ordner."
|
||||
@@ -811,18 +807,7 @@
|
||||
"description": "Alle Benachrichtigungen aus Ihrer aktuellen Sitzung anzeigen",
|
||||
"empty": "Noch keine Benachrichtigungen",
|
||||
"clearAll": "Alle löschen",
|
||||
"appEnabled": "App-Benachrichtigungen",
|
||||
"appEnabledDescription": "Browser-Benachrichtigungen anzeigen, wenn Dateioperationen abgeschlossen sind, während sich diese Registerkarte im Hintergrund befindet. Erfordert eine Browser-Berechtigung. Wird nur in diesem Browser gespeichert.",
|
||||
"appUnsupported": "App-Benachrichtigungen werden in diesem Browser nicht unterstützt.",
|
||||
"permissionGranted": "zulässig",
|
||||
"permissionDeniedHelp": "Benachrichtigungen sind deaktiviert. Bitte aktivieren Sie sie in den Browsereinstellungen für diese Website.",
|
||||
"uploadTitle": "Upload abgeschlossen",
|
||||
"downloadTitle": "Download abgeschlossen",
|
||||
"moveTitle": "Verschieben abgeschlossen",
|
||||
"copyTitle": "Kopieren abgeschlossen",
|
||||
"uploadFailedTitle": "Der Upload ist fehlgeschlagen",
|
||||
"downloadFailedTitle": "Der Download ist fehlgeschlagen",
|
||||
"operationFailedTitle": "Vorgang fehlgeschlagen"
|
||||
"total": "{count} Benachrichtigungen"
|
||||
},
|
||||
"events": {
|
||||
"serverShutdown": "Der Server wurde abgeschaltet.",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "Dokument-Download - Vollständig",
|
||||
"editorSuccess": "Editor-Initialisierung - Erfolg! Alle Schritte abgeschlossen.",
|
||||
"setupError": "Setup-Fehler"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "App installieren"
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@
|
||||
"goToItem": "Πηγαίνετε στο στοιχείο",
|
||||
"copyPath": "Αντιγραφή διαδρομής",
|
||||
"pinItem": "Καρφίτσωμα",
|
||||
"unpinItem": "Ξεκαρφίτσωμα",
|
||||
"sendToApp": "Αποστολή στην εφαρμογή"
|
||||
"unpinItem": "Ξεκαρφίτσωμα"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "Δεν έχετε άδεια πρόσβασης σε αυτό.",
|
||||
@@ -246,9 +245,7 @@
|
||||
"helpText2": "Αντιστοίχιση υποσυνόλων μόνο σε ονόματα αρχείων ή φακέλων (όχι σε πλήρεις διαδρομές). case:exact για αντιστοίχιση ευαίσθητη στην πεζότητα\n\n για OR μεταξύ όρων χρησιμοποιήστε τον χαρακτήρα pipe- διπλά εισαγωγικά για μία φράση.\n\nΕνεργοποιήστε την αναζήτηση με μπαλαντέρ για πιο προηγμένες επιλογές.",
|
||||
"useWildcardSearch": "Αναζήτηση με μπαλαντέρ (ευαίσθητη στην πεζότητα)",
|
||||
"useWildcardSearchDescription": "Υποστηριζόμενες επιλογές μπαλαντέρ:\n\n- Ταιριάζει με οποιαδήποτε ακολουθία: *\n\n- Ταιριάζει με έναν χαρακτήρα: ?\n\n- Κατηγορία χαρακτήρων: [a-z], [0-9]\n\n- Άρνηση: [^0-9]\n\n- Τα κυριολεκτικά *, ?, ή [ πρέπει να περιτυλίγονται σε αγκύλες, π.χ. [*], [?], [[]\n\n- Όλα τα αποτελέσματα είναι ευαίσθητα στην πεζότητα",
|
||||
"openInAdvancedSearch": "Άνοιγμα σε Σύνθετη Αναζήτηση",
|
||||
"caseExact": "Αντιστοίχιση με διάκριση κεφαλαίων-μικρών",
|
||||
"caseExactDescription": "Να γίνεται αντιστοίχιση ονομάτων αρχείων και φακέλων με βάση την ακριβή χρήση κεφαλαίων και μικρών γραμμάτων, αντί να αγνοούνται οι διαφορές μεταξύ κεφαλαίων και μικρών γραμμάτων."
|
||||
"openInAdvancedSearch": "Άνοιγμα σε Σύνθετη Αναζήτηση"
|
||||
},
|
||||
"settings": {
|
||||
"avoidChanges": "(αφήστε το κενό για αποφυγή αλλαγών)",
|
||||
@@ -357,6 +354,7 @@
|
||||
"shareDurationDescription": "Διάρκεια πριν από τη λήξη της μετοχής. Αφήστε το κενό για μόνιμο μερίδιο.",
|
||||
"passwordDescription": "Προαιρετικός κωδικός πρόσβασης που απαιτείται για την πρόσβαση σε αυτό το κοινόχρηστο τμήμα, συμπεριλαμβανομένων των πιστοποιημένων χρηστών.",
|
||||
"shareThemeColorDescription": "Τιμή χρώματος CSS που εφαρμόζεται στο θέμα της μετοχής (π.χ. κόκκινο, #0ea5e9, rgb(14,165,233)).",
|
||||
"shareTitleDescription": "Προσαρμοσμένος τίτλος σελίδας που εμφανίζεται στη σελίδα κοινής χρήσης.",
|
||||
"shareDescriptionHelp": "Σύντομη περιγραφή που εμφανίζεται στη σελίδα κοινοποίησης (μπορεί να χρησιμοποιηθεί σε meta tags).",
|
||||
"shareBannerDescription": "Διεύθυνση URL ή διαδρομή εικόνας πανό προσβάσιμη από τον πελάτη -- γίνονται δεκτές είτε η απόλυτη διαδρομή είτε η διαδρομή ευρετηρίου: π.χ. \"https://domain.com/banner.png\" ή \"/path/to/banner.png\".",
|
||||
"shareFaviconDescription": "Διεύθυνση URL ή διαδρομή Favicon προσβάσιμη από τον πελάτη -- γίνονται δεκτές είτε η απόλυτη διαδρομή είτε η διαδρομή ευρετηρίου: π.χ. 'https://domain.com/favicon.png' ή '/path/to/favicon.png'.",
|
||||
@@ -407,8 +405,7 @@
|
||||
"selectBannerImage": "Επιλέξτε εικόνα banner",
|
||||
"selectFaviconImage": "Επιλέξτε εικόνα favicon",
|
||||
"deleteFailed": "Απέτυχε η διαγραφή κοινής χρήσης",
|
||||
"readOnlySourceNotice": "Αυτή η πηγή είναι μόνο για ανάγνωση. Οι μετοχές φόρτωσης και τα δικαιώματα που τροποποιούν αρχεία είναι απενεργοποιημένα.",
|
||||
"shareTitleDescription": "Προσαρμοσμένος τίτλος σελίδας που εμφανίζεται στη σελίδα κοινοποίησης. Εάν αυτή η εφαρμογή κοινοποίησης έχει εγκατασταθεί ως PWA, το όνομα της εφαρμογής περιορίζεται σε 30 χαρακτήρες."
|
||||
"readOnlySourceNotice": "Αυτή η πηγή είναι μόνο για ανάγνωση. Οι μετοχές φόρτωσης και τα δικαιώματα που τροποποιούν αρχεία είναι απενεργοποιημένα."
|
||||
},
|
||||
"api": {
|
||||
"createdAt": "Δημιουργήθηκε στο:",
|
||||
@@ -575,9 +572,7 @@
|
||||
"no": "Όχι{suffix}",
|
||||
"to": "προς{suffix}",
|
||||
"and": "και{suffix}",
|
||||
"or": "ή{suffix}",
|
||||
"camera": "Κάμερα{suffix}",
|
||||
"video": "Βίντεο{suffix}"
|
||||
"or": "ή{suffix}"
|
||||
},
|
||||
"access": {
|
||||
"rules": "Κανόνες πρόσβασης",
|
||||
@@ -783,6 +778,7 @@
|
||||
"scopeAria": "Περιορισμός της αναζήτησης σε έναν φάκελο",
|
||||
"noTerms": "Εισάγετε τουλάχιστον έναν όρο αναζήτησης.",
|
||||
"termTooShort": "Κάθε όρος αναζήτησης πρέπει να αποτελείται από τουλάχιστον {minSearchLength} χαρακτήρες.",
|
||||
"caseExact": "Αντιστοίχιση με ευαισθησία στην πεζότητα",
|
||||
"resultsTitle": "Αποτελέσματα αναζήτησης",
|
||||
"invalidSources": "Ενεργοποιήστε τουλάχιστον μία πηγή.",
|
||||
"noResults": "Δεν υπάρχουν ταιριαστά αρχεία ή φάκελοι."
|
||||
@@ -811,18 +807,7 @@
|
||||
"description": "Προβολή όλων των ειδοποιήσεων από την τρέχουσα συνεδρία σας",
|
||||
"empty": "Δεν υπάρχουν ακόμη ειδοποιήσεις",
|
||||
"clearAll": "Εκκαθάριση όλων",
|
||||
"appEnabled": "Ειδοποιήσεις εφαρμογών",
|
||||
"appEnabledDescription": "Εμφάνιση ειδοποιήσεων του προγράμματος περιήγησης όταν ολοκληρώνονται οι λειτουργίες αρχείων ενώ αυτή η καρτέλα βρίσκεται στο παρασκήνιο. Απαιτείται άδεια από το πρόγραμμα περιήγησης. Αποθηκεύεται μόνο σε αυτό το πρόγραμμα περιήγησης.",
|
||||
"appUnsupported": "Οι ειδοποιήσεις εφαρμογών δεν υποστηρίζονται σε αυτόν τον περιηγητή.",
|
||||
"permissionGranted": "επιτρέπεται",
|
||||
"permissionDeniedHelp": "Οι ειδοποιήσεις έχουν αποκλειστεί. Ενεργοποιήστε τις στις ρυθμίσεις του προγράμματος περιήγησής σας για αυτόν τον ιστότοπο.",
|
||||
"uploadTitle": "Η μεταφόρτωση ολοκληρώθηκε",
|
||||
"downloadTitle": "Η λήψη ολοκληρώθηκε",
|
||||
"moveTitle": "Η μετακίνηση ολοκληρώθηκε",
|
||||
"copyTitle": "Η αντιγραφή ολοκληρώθηκε",
|
||||
"uploadFailedTitle": "Η μεταφόρτωση απέτυχε",
|
||||
"downloadFailedTitle": "Η λήψη απέτυχε",
|
||||
"operationFailedTitle": "Η λειτουργία απέτυχε"
|
||||
"total": "{count} ειδοποιήσεις"
|
||||
},
|
||||
"events": {
|
||||
"serverShutdown": "Ο διακομιστής τερματίστηκε.",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "Λήψη εγγράφων - Πλήρης",
|
||||
"editorSuccess": "Αρχικοποίηση επεξεργαστή - Επιτυχία! Όλα τα βήματα ολοκληρώθηκαν.",
|
||||
"setupError": "Σφάλμα ρύθμισης"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "Εγκατάσταση εφαρμογής"
|
||||
}
|
||||
}
|
||||
@@ -87,8 +87,6 @@
|
||||
"download": "Download{suffix}",
|
||||
"file": "File{suffix}",
|
||||
"folder": "Folder{suffix}",
|
||||
"camera": "Camera{suffix}",
|
||||
"video": "Video{suffix}",
|
||||
"info": "Info{suffix}",
|
||||
"move": "Move{suffix}",
|
||||
"new": "New{suffix}",
|
||||
@@ -150,8 +148,7 @@
|
||||
"goToItem": "Go to item",
|
||||
"goToSource": "Go to Source Location",
|
||||
"pinItem": "Pin",
|
||||
"unpinItem": "Unpin",
|
||||
"sendToApp": "Send to app"
|
||||
"unpinItem": "Unpin"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "You don't have permissions to access this.",
|
||||
@@ -284,7 +281,7 @@
|
||||
"shareDurationDescription": "Duration before the share expires. Leave blank for a permanent share.",
|
||||
"passwordDescription": "Optional password required to access this share, including authenticated users.",
|
||||
"shareThemeColorDescription": "CSS color value applied to the share's theme (e.g., red, #0ea5e9, rgb(14,165,233)).",
|
||||
"shareTitleDescription": "Custom page title shown on the share page. If this share is installed as a PWA, the app name is limited to 30 characters.",
|
||||
"shareTitleDescription": "Custom page title shown on the share page.",
|
||||
"shareDescriptionHelp": "Short description shown on the share page (may be used in meta tags).",
|
||||
"shareBannerDescription": "Banner image URL or path accessible by the client -- either abosolute or index path are accepted: eg 'https://domain.com/banner.png' or '/path/to/banner.png'",
|
||||
"shareFaviconDescription": "Favicon URL or path accessible by the client -- either abosolute or index path are accepted: eg 'https://domain.com/favicon.png' or '/path/to/favicon.png'",
|
||||
@@ -435,10 +432,8 @@
|
||||
"showPreviewImagesDescription": "Display thumbnail previews for search results when available, and show larger icons for all results.",
|
||||
"useWildcardSearch": "Wildcard search",
|
||||
"useWildcardSearchDescription": "Supported wildcard options:\n\n• Match any sequence: *\n\n• Match one character: ?\n\n• Character class: [a-z], [0-9]\n\n• Negation: [^0-9]\n\n• Literal *, ?, or [ need to be wrapped in brackets, e.g. [*], [?], [[]",
|
||||
"caseExact": "Case-sensitive match",
|
||||
"caseExactDescription": "Match file and folder names using exact letter casing instead of ignoring upper and lower case.",
|
||||
"helpText1": "Search occurs on each character you type ({minSearchLength} character minimum).",
|
||||
"helpText2": "Case-insensitive substring match on file or folder names only (not full paths). Space-separated words match across common delimiters like periods, underscores, and hyphens (e.g. \"Blade Runner\" finds Blade.Runner.mkv). Use case:exact for case-sensitive matching.\n\nFor OR between terms use the pipe character; use double quotes for an exact phrase with spaces.\n\nEnable wildcard search for advanced glob patterns (*, ?, [a-z]).",
|
||||
"helpText2": "Substring match on file or folder names only (not full paths). case:exact for case-sensitive matching\n\n for OR between terms use pipe character; double quotes for one phrase.\n\nEnable wildcard search for more advanced options.",
|
||||
"openInAdvancedSearch": "Open in Advanced Search"
|
||||
},
|
||||
"profileSettings": {
|
||||
@@ -771,6 +766,7 @@
|
||||
"scopeAria": "Limit search to a folder",
|
||||
"noTerms": "Enter at least one search term.",
|
||||
"termTooShort": "Each search term must be at least {minSearchLength} characters",
|
||||
"caseExact": "Case-sensitive match",
|
||||
"resultsTitle": "Search results",
|
||||
"invalidSources": "Turn on at least one source.",
|
||||
"noResults": "No matching files or folders."
|
||||
@@ -802,18 +798,7 @@
|
||||
"description": "View all notifications from your current session",
|
||||
"empty": "No notifications yet",
|
||||
"clearAll": "Clear All",
|
||||
"appEnabled": "App notifications",
|
||||
"appEnabledDescription": "Show browser notifications when file operations finish while this tab is in the background. Requires browser permission. Stored in this browser only.",
|
||||
"appUnsupported": "App notifications are not supported in this browser.",
|
||||
"permissionGranted": "allowed",
|
||||
"permissionDeniedHelp": "Notifications are blocked. Enable them in your browser settings for this site.",
|
||||
"uploadTitle": "Upload complete",
|
||||
"downloadTitle": "Download complete",
|
||||
"moveTitle": "Move complete",
|
||||
"copyTitle": "Copy complete",
|
||||
"uploadFailedTitle": "Upload failed",
|
||||
"downloadFailedTitle": "Download failed",
|
||||
"operationFailedTitle": "Operation failed"
|
||||
"total": "{count} notifications"
|
||||
},
|
||||
"duplicateFinder": {
|
||||
"minSize": "Minimum Size (MB){suffix}",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "Document Download - Complete",
|
||||
"editorSuccess": "Editor Initialization - Success! All steps completed.",
|
||||
"setupError": "Setup Error"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "Install app"
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@
|
||||
"goToItem": "Abrir",
|
||||
"copyPath": "Copiar ruta",
|
||||
"pinItem": "Fijar",
|
||||
"unpinItem": "Desfijar",
|
||||
"sendToApp": "Enviar a la aplicación"
|
||||
"unpinItem": "Desfijar"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "No tienes permisos para acceder.",
|
||||
@@ -246,9 +245,7 @@
|
||||
"helpText2": "Coincidencia de subcadenas sólo en nombres de archivos o carpetas (no en rutas completas). case:exact para coincidencia sensible a mayúsculas y minúsculas.\n\n para OR entre términos utilice el carácter pipa; comillas dobles para una frase.\n\nHabilite la búsqueda con comodines para opciones más avanzadas.",
|
||||
"useWildcardSearch": "Búsqueda con comodín (distingue mayúsculas de minúsculas)",
|
||||
"useWildcardSearchDescription": "Opciones de comodín admitidas:\n\n- Coinciden con cualquier secuencia: *\n\n- Coincidir con un carácter: ?\n\n- Clase de caracteres: [a-z], [0-9]\n\n- Negación: [^0-9]\n\n- Los caracteres *, ? o [ deben ir entre paréntesis, por ejemplo [*], [?], [[].\n\n- Todos los resultados distinguen entre mayúsculas y minúsculas",
|
||||
"openInAdvancedSearch": "Abrir en búsqueda avanzada",
|
||||
"caseExact": "Coincidencia que distingue entre mayúsculas y minúsculas",
|
||||
"caseExactDescription": "Compara los nombres de archivos y carpetas utilizando el uso exacto de mayúsculas y minúsculas, en lugar de ignorar la distinción entre mayúsculas y minúsculas."
|
||||
"openInAdvancedSearch": "Abrir en búsqueda avanzada"
|
||||
},
|
||||
"settings": {
|
||||
"scopes": "Fuentes a las que el usuario tendrá acceso:",
|
||||
@@ -357,6 +354,7 @@
|
||||
"shareDurationDescription": "Tiempo que durará el recurso compartido - puedes dejarlo en blanco para indefinido (o sea, sin expiración).",
|
||||
"passwordDescription": "Contraseña opcional necesaria para acceder al recurso compartido, incluyedo usuarios registrados",
|
||||
"shareThemeColorDescription": "Valor de color CSS aplicado al tema de la acción (por ejemplo: red, #0ea5e9, rgb(14,165,233)).",
|
||||
"shareTitleDescription": "Título de la página que se mostrará en el navegador",
|
||||
"shareDescriptionHelp": "Breve descripción mostrada en la página (que suele aparecer cuando compartes el enlace)",
|
||||
"shareBannerDescription": "Enlace (URL), o ruta de la imagen del banner que se mostrará en el enlace -- por ejemplo, 'https://ejemplo.com/banner.png' o '/ruta/a/banner.png'.",
|
||||
"shareFaviconDescription": "Enlace (URL) del icono (favicon) que se mostrará en el enlace -- por ejemplo 'https://domain.com/favicon.png' o '/ruta/a/favicon.png'",
|
||||
@@ -407,8 +405,7 @@
|
||||
"selectBannerImage": "Seleccionar imagen de banner",
|
||||
"selectFaviconImage": "Seleccionar imagen de favicon",
|
||||
"deleteFailed": "Error al borrar recurso compartido",
|
||||
"readOnlySourceNotice": "Esta fuente es de sólo lectura. Los recursos compartidos de carga y los permisos que modifican archivos están desactivados.",
|
||||
"shareTitleDescription": "Título personalizado de la página que se muestra en la página para compartir. Si esta aplicación para compartir está instalada como PWA, el nombre de la aplicación tiene un límite de 30 caracteres."
|
||||
"readOnlySourceNotice": "Esta fuente es de sólo lectura. Los recursos compartidos de carga y los permisos que modifican archivos están desactivados."
|
||||
},
|
||||
"api": {
|
||||
"createdAt": "Creado en:",
|
||||
@@ -575,9 +572,7 @@
|
||||
"no": "No{suffix}",
|
||||
"to": "a{suffix}",
|
||||
"and": "y{suffix}",
|
||||
"or": "o{suffix}",
|
||||
"camera": "Cámara{suffix}",
|
||||
"video": "Vídeo{suffix}"
|
||||
"or": "o{suffix}"
|
||||
},
|
||||
"access": {
|
||||
"rules": "Reglas de acceso",
|
||||
@@ -783,6 +778,7 @@
|
||||
"scopeAria": "Limitar la búsqueda a una carpeta",
|
||||
"noTerms": "Introduzca al menos un término de búsqueda.",
|
||||
"termTooShort": "Cada término de búsqueda debe tener al menos {minSearchLength} caracteres",
|
||||
"caseExact": "Coincidencia entre mayúsculas y minúsculas",
|
||||
"resultsTitle": "Resultados de la búsqueda",
|
||||
"invalidSources": "Enciende al menos una fuente.",
|
||||
"noResults": "No hay archivos o carpetas coincidentes."
|
||||
@@ -811,18 +807,7 @@
|
||||
"description": "Aquí verás todas las notificaciones de tu sesión actual",
|
||||
"empty": "Aún no tienes notificaciones",
|
||||
"clearAll": "Borrar todo",
|
||||
"appEnabled": "Notificaciones de la aplicación",
|
||||
"appEnabledDescription": "Mostrar notificaciones del navegador cuando finalicen las operaciones con archivos mientras esta pestaña está en segundo plano. Requiere permiso del navegador. Se guarda únicamente en este navegador.",
|
||||
"appUnsupported": "Este navegador no admite notificaciones de aplicaciones.",
|
||||
"permissionGranted": "permitido",
|
||||
"permissionDeniedHelp": "Las notificaciones están bloqueadas. Actívalas en la configuración de tu navegador para este sitio web.",
|
||||
"uploadTitle": "Carga completada",
|
||||
"downloadTitle": "Descarga completada",
|
||||
"moveTitle": "Movimiento completado",
|
||||
"copyTitle": "Copia completada",
|
||||
"uploadFailedTitle": "Error al subir el archivo",
|
||||
"downloadFailedTitle": "Error al descargar",
|
||||
"operationFailedTitle": "La operación ha fallado"
|
||||
"total": "{count} notificaciones"
|
||||
},
|
||||
"events": {
|
||||
"serverShutdown": "El servidor fúe apagado",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "Descarga de documentos - Completa",
|
||||
"editorSuccess": "Inicialización del editor - ¡Éxito! Todos los pasos se completaron.",
|
||||
"setupError": "Error de configuración"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "Instalar la aplicación"
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@
|
||||
"goToItem": "Aller à l'article",
|
||||
"copyPath": "Chemin de la copie",
|
||||
"pinItem": "Épingler",
|
||||
"unpinItem": "Détacher",
|
||||
"sendToApp": "Envoyer vers l'application"
|
||||
"unpinItem": "Détacher"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "Vous n'avez pas la permission d'accéder à cela.",
|
||||
@@ -246,9 +245,7 @@
|
||||
"helpText2": "Correspondance de sous-chaînes sur les noms de fichiers ou de dossiers uniquement (pas sur les chemins d'accès complets). case:exact pour une correspondance sensible à la casse.\n\n pour le OU entre les termes, utiliser le caractère pipe ; les guillemets doubles pour une seule phrase.\n\nActivez la recherche par caractères génériques pour obtenir des options plus avancées.",
|
||||
"useWildcardSearch": "Recherche par caractères génériques (sensible à la casse)",
|
||||
"useWildcardSearchDescription": "Options de caractères génériques prises en charge :\n\n- Correspond à n'importe quelle séquence : *\n\n- Correspondre à un seul caractère : ?\n\n- Classe de caractères : [a-z], [0-9]\n\n- Négation : [^0-9]\n\n- Les valeurs littérales *, ? ou [ doivent être mises entre parenthèses, par exemple [*], [ ?], [[]].\n\n- Tous les résultats sont sensibles à la casse",
|
||||
"openInAdvancedSearch": "Ouvrir en recherche avancée",
|
||||
"caseExact": "Correspondance sensible à la casse",
|
||||
"caseExactDescription": "Comparer les noms de fichiers et de dossiers en tenant compte de la casse exacte, plutôt qu'en ignorant la distinction entre majuscules et minuscules."
|
||||
"openInAdvancedSearch": "Ouvrir en recherche avancée"
|
||||
},
|
||||
"settings": {
|
||||
"scopes": "Définir les sources autorisées et la portée de l'utilisateur au sein de celles-ci",
|
||||
@@ -357,6 +354,7 @@
|
||||
"shareDurationDescription": "Durée avant l'expiration du partage. Laisser vide pour un partage permanent.",
|
||||
"passwordDescription": "Mot de passe facultatif requis pour accéder à ce partage, y compris pour les utilisateurs authentifiés.",
|
||||
"shareThemeColorDescription": "Valeur de la couleur CSS appliquée au thème du partage (par exemple, rouge, #0ea5e9, rgb(14,165,233)).",
|
||||
"shareTitleDescription": "Titre de page personnalisé affiché sur la page de partage.",
|
||||
"shareDescriptionHelp": "Courte description affichée sur la page de partage (peut être utilisée dans les balises méta).",
|
||||
"shareBannerDescription": "URL de l'image de la bannière ou chemin d'accès accessible par le client - les chemins d'accès absolus ou indexés sont acceptés : par exemple \"https://domain.com/banner.png\" ou \"/path/to/banner.png\".",
|
||||
"shareFaviconDescription": "URL du favicon ou chemin d'accès accessible par le client -- les chemins d'accès absolus ou indexés sont acceptés : par exemple \"https://domain.com/favicon.png\" ou \"/path/to/favicon.png\".",
|
||||
@@ -407,8 +405,7 @@
|
||||
"selectBannerImage": "Sélectionner l'image de la bannière",
|
||||
"selectFaviconImage": "Sélectionner l'image du favicon",
|
||||
"deleteFailed": "Échec de la suppression du partage",
|
||||
"readOnlySourceNotice": "Cette source est en lecture seule. Les partages de téléchargement et les autorisations qui modifient les fichiers sont désactivés.",
|
||||
"shareTitleDescription": "Titre personnalisé de la page affiché sur la page de partage. Si cette fonctionnalité de partage est installée en tant qu'application PWA, le nom de l'application est limité à 30 caractères."
|
||||
"readOnlySourceNotice": "Cette source est en lecture seule. Les partages de téléchargement et les autorisations qui modifient les fichiers sont désactivés."
|
||||
},
|
||||
"api": {
|
||||
"createdAt": "Créée le :",
|
||||
@@ -575,9 +572,7 @@
|
||||
"no": "Non{suffix}",
|
||||
"to": "à{suffix}",
|
||||
"and": "et{suffix}",
|
||||
"or": "ou{suffix}",
|
||||
"camera": "Appareil photo{suffix}",
|
||||
"video": "Vidéo{suffix}"
|
||||
"or": "ou{suffix}"
|
||||
},
|
||||
"access": {
|
||||
"rules": "Règles d'accès",
|
||||
@@ -783,6 +778,7 @@
|
||||
"scopeAria": "Limiter la recherche à un dossier",
|
||||
"noTerms": "Saisissez au moins un terme de recherche.",
|
||||
"termTooShort": "Chaque terme de recherche doit comporter au moins {minSearchLength} caractères.",
|
||||
"caseExact": "Correspondance sensible à la casse",
|
||||
"resultsTitle": "Résultats de la recherche",
|
||||
"invalidSources": "Allumez au moins une source.",
|
||||
"noResults": "Aucun fichier ou dossier correspondant."
|
||||
@@ -811,18 +807,7 @@
|
||||
"description": "Afficher toutes les notifications de la session en cours",
|
||||
"empty": "Aucune notification pour l'instant",
|
||||
"clearAll": "Tout effacer",
|
||||
"appEnabled": "Notifications de l'application",
|
||||
"appEnabledDescription": "Afficher les notifications du navigateur lorsque les opérations sur les fichiers sont terminées alors que cet onglet est en arrière-plan. Nécessite l'autorisation du navigateur. Enregistré uniquement dans ce navigateur.",
|
||||
"appUnsupported": "Les notifications de l'application ne sont pas prises en charge par ce navigateur.",
|
||||
"permissionGranted": "autorisé",
|
||||
"permissionDeniedHelp": "Les notifications sont désactivées. Activez-les dans les paramètres de votre navigateur pour ce site.",
|
||||
"uploadTitle": "Téléchargement terminé",
|
||||
"downloadTitle": "Téléchargement terminé",
|
||||
"moveTitle": "Déménagement terminé",
|
||||
"copyTitle": "Copie terminée",
|
||||
"uploadFailedTitle": "Échec du téléchargement",
|
||||
"downloadFailedTitle": "Échec du téléchargement",
|
||||
"operationFailedTitle": "Échec de l'opération"
|
||||
"total": "{count} notifications"
|
||||
},
|
||||
"events": {
|
||||
"serverShutdown": "Le serveur a été arrêté.",
|
||||
@@ -875,8 +860,5 @@
|
||||
"documentDownload": "Téléchargement du document - Complet",
|
||||
"editorSuccess": "Initialisation de l'éditeur - Succès ! Toutes les étapes sont terminées.",
|
||||
"setupError": "Erreur de configuration"
|
||||
},
|
||||
"pwa": {
|
||||
"install": "Installer l'application"
|
||||
}
|
||||
}
|
||||
Loaded 100 of 191 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user