Windows compatibility (#271)
This commit is contained in:
parent
f864790175
commit
4a4eb7ce31
|
@ -3,8 +3,8 @@
|
||||||
_old
|
_old
|
||||||
rice-box.go
|
rice-box.go
|
||||||
.idea/
|
.idea/
|
||||||
/filebrowser
|
/backend
|
||||||
/filebrowser.exe
|
/backend.exe
|
||||||
/frontend/dist
|
/frontend/dist
|
||||||
/frontend/pkg
|
/frontend/pkg
|
||||||
/frontend/test-results
|
/frontend/test-results
|
||||||
|
|
|
@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. For commit
|
||||||
- can enable/disable indexing a specified list of directories/files
|
- can enable/disable indexing a specified list of directories/files
|
||||||
- can enable/disable indexing hidden files
|
- can enable/disable indexing hidden files
|
||||||
- prepped for multiple sources (not supported yet!)
|
- prepped for multiple sources (not supported yet!)
|
||||||
- Theme and Branding support (see updates to [configuration wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Configuration) on how to use)
|
- Theme and Branding support (see updates to [configuration wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Configuration) on how to use)
|
||||||
- Automatically expire shares https://github.com/gtsteffaniak/filebrowser/issues/208
|
- Automatically expire shares https://github.com/gtsteffaniak/filebrowser/issues/208
|
||||||
|
|
||||||
**Notes**:
|
**Notes**:
|
||||||
|
@ -19,6 +19,8 @@ All notable changes to this project will be documented in this file. For commit
|
||||||
- Icon styling tweaked so all icons have a background.
|
- Icon styling tweaked so all icons have a background.
|
||||||
- Updated Login page styling.
|
- Updated Login page styling.
|
||||||
- Settings profile menu has been simplified, password changes happen in user management.
|
- Settings profile menu has been simplified, password changes happen in user management.
|
||||||
|
- Improved windows compatibility and built on windows platform to fix false windows defender warning.
|
||||||
|
- If no "root" location is provided in the server config, the default is the **current directory** (rather than `/srv` like before)
|
||||||
|
|
||||||
**Bugfixes**:
|
**Bugfixes**:
|
||||||
- Fixed setting share expiration time would not work due to type conversion error.
|
- Fixed setting share expiration time would not work due to type conversion error.
|
||||||
|
@ -27,10 +29,10 @@ All notable changes to this project will be documented in this file. For commit
|
||||||
- Fixed manual language selection issue.
|
- Fixed manual language selection issue.
|
||||||
- Fixed exact date time issue.
|
- Fixed exact date time issue.
|
||||||
|
|
||||||
|
|
||||||
New login page:
|
New login page:
|
||||||
|
|
||||||
<img width="300" alt="image" src="https://github.com/user-attachments/assets/a2053ee8-7ede-4885-95ab-046d768d2589" />
|
<img width="300" alt="image" src="https://github.com/user-attachments/assets/d3ed359e-a969-4f6a-9f72-94d2b68aba49" />
|
||||||
|
|
||||||
|
|
||||||
Example branding in sidebar:
|
Example branding in sidebar:
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ COPY ./backend ./
|
||||||
#RUN swag init --output swagger/docs
|
#RUN swag init --output swagger/docs
|
||||||
RUN ln -s swagger /usr/local/go/src/
|
RUN ln -s swagger /usr/local/go/src/
|
||||||
RUN go build -ldflags="-w -s \
|
RUN go build -ldflags="-w -s \
|
||||||
-X 'github.com/gtsteffaniak/filebrowser/version.Version=${VERSION}' \
|
-X 'github.com/gtsteffaniak/filebrowser/backend/version.Version=${VERSION}' \
|
||||||
-X 'github.com/gtsteffaniak/filebrowser/version.CommitSHA=${REVISION}'" \
|
-X 'github.com/gtsteffaniak/filebrowser/backend/version.CommitSHA=${REVISION}'" \
|
||||||
-o filebrowser .
|
-o filebrowser .
|
||||||
|
|
||||||
FROM node:slim AS nbuild
|
FROM node:slim AS nbuild
|
||||||
|
|
35
README.md
35
README.md
|
@ -15,44 +15,44 @@
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> There is no stable version yet. Always check release notes for bug fixes on functionality that may have been changed. If you notice any unexpected behavior -- please open an issue to have it fixed soon.
|
> There is no stable version yet. Always check release notes for bug fixes on functionality that may have been changed. If you notice any unexpected behavior -- please open an issue to have it fixed soon.
|
||||||
|
|
||||||
FileBrowser Quantum is a fork of the file browser opensource project with the following changes:
|
FileBrowser Quantum is a fork of the file browser open-source project with the following changes:
|
||||||
|
|
||||||
1. [x] Indexes files efficiently. (See [indexing Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Indexing) for more info.)
|
1. ✅ Indexes files efficiently. (See [indexing Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Indexing) for more info.)
|
||||||
- Real-time search results as you type
|
- Real-time search results as you type
|
||||||
- Search supports file/folder sizes and many file type filters.
|
- Search supports file/folder sizes and many file type filters.
|
||||||
- Enhanced interactive results that show file/folder sizes.
|
- Enhanced interactive results that show file/folder sizes.
|
||||||
2. [x] Revamped and simplified GUI navbar and sidebar menu.
|
2. ✅ Revamped and simplified GUI navbar and sidebar menu.
|
||||||
- Additional compact view mode as well as refreshed view mode styles.
|
- Additional compact view mode as well as refreshed view mode styles.
|
||||||
- Many graphical and user experience improvements.
|
- Many graphical and user experience improvements.
|
||||||
- right-click context menu
|
- right-click context menu
|
||||||
3. [x] Revamped and simplified configuration via `config.yaml` config file.
|
3. ✅ Revamped and simplified configuration via `config.yaml` config file.
|
||||||
4. [x] Better listing browsing
|
4. ✅ Better listing browsing
|
||||||
- Instantly Switches view modes and sort order without reloading data.
|
- Instantly Switches view modes and sort order without reloading data.
|
||||||
- Folder sizes are displayed
|
- Folder sizes are displayed
|
||||||
- Navigating remembers the scroll position, navigating back keeps the last scroll position.
|
- Navigating remembers the scroll position, navigating back keeps the last scroll position.
|
||||||
5. [x] Developer API support
|
5. ✅ Developer API support
|
||||||
- Ability to create long-live API Tokens.
|
- Ability to create long-live API Tokens.
|
||||||
- Helpful Swagger page available at `/swagger` endpoint.
|
- Helpful Swagger page available at `/swagger` endpoint.
|
||||||
|
|
||||||
Notable features that this fork *does not* have (removed):
|
Notable features that this fork *does not* have (removed):
|
||||||
|
|
||||||
- jobs/runners are not supported yet (planned).
|
- ❌ jobs/runners are not supported yet (planned).
|
||||||
- shell commands are completely removed and will not be returned.
|
- ❌ per-user rules are not supported yet (planned).
|
||||||
- pagination for directory items for extremely large directories.
|
- ❌ pagination for directory items for extremely large directories.
|
||||||
|
- ❌ shell commands are completely removed and will not be returned.
|
||||||
- see feature matrix below for more.
|
- see feature matrix below for more.
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
FileBrowser Quantum provides a file-managing interface within a specified directory
|
FileBrowser Quantum provides a file-managing interface within a specified directory
|
||||||
and can be used to upload, delete, preview, rename, and edit your files.
|
and can be used to upload, delete, preview, rename, and edit your files.
|
||||||
It allows the creation of multiple users and each user can have its
|
It allows the creation of multiple users and each user can have its directory.
|
||||||
directory.
|
|
||||||
|
|
||||||
This repository is a fork of the original [filebrowser](https://github.com/filebrowser/filebrowser)
|
This repository is a fork of the original [filebrowser](https://github.com/filebrowser/filebrowser)
|
||||||
with a collection of changes that make this program work better in terms of
|
with a collection of changes that make this program work better in terms of
|
||||||
aesthetics and performance. Improved search, simplified UI
|
aesthetics and performance. Improved search, simplified UI
|
||||||
(without removing features) and more secure and up-to-date
|
(without removing features) and more secure and up-to-date
|
||||||
build are just a few examples.
|
build are just a few examples.
|
||||||
|
|
||||||
FileBrowser Quantum differs significantly from the original.
|
FileBrowser Quantum differs significantly from the original.
|
||||||
There are hundreds of thousands of lines changed and they are generally
|
There are hundreds of thousands of lines changed and they are generally
|
||||||
|
@ -103,8 +103,7 @@ Configuration is done via the `config.yaml`, see the [Configuration Wiki](https:
|
||||||
|
|
||||||
## Migration from the original filebrowser
|
## Migration from the original filebrowser
|
||||||
|
|
||||||
See the [Migration
|
See the [Migration Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Migration)
|
||||||
Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Migration)
|
|
||||||
|
|
||||||
## Comparison Chart
|
## Comparison Chart
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ builds:
|
||||||
# Build configuration for darwin and linux
|
# Build configuration for darwin and linux
|
||||||
- id: default
|
- id: default
|
||||||
ldflags: &ldflags
|
ldflags: &ldflags
|
||||||
- -s -w -X github.com/gtsteffaniak/filebrowser/version.Version={{ .Version }} -X github.com/gtsteffaniak/filebrowser/version.CommitSHA={{ .ShortCommit }}
|
- -s -w -X github.com/gtsteffaniak/filebrowser/backend/version.Version={{ .Version }} -X github.com/gtsteffaniak/filebrowser/backend/version.CommitSHA={{ .ShortCommit }}
|
||||||
main: main.go
|
main: main.go
|
||||||
binary: filebrowser
|
binary: filebrowser
|
||||||
goos:
|
goos:
|
||||||
|
@ -17,10 +17,10 @@ builds:
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
goarm:
|
goarm:
|
||||||
- 6
|
- "6"
|
||||||
- 7
|
- "7"
|
||||||
hooks:
|
hooks:
|
||||||
post:
|
post:
|
||||||
- upx {{ .Path }} # Compress the binary with UPX
|
- upx {{ .Path }} # Compress the binary with UPX
|
||||||
|
|
||||||
# Build configuration for windows without arm
|
# Build configuration for windows without arm
|
||||||
|
@ -32,7 +32,6 @@ builds:
|
||||||
# - windows
|
# - windows
|
||||||
# goarch:
|
# goarch:
|
||||||
# - amd64
|
# - amd64
|
||||||
# - arm64
|
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}"
|
- name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}"
|
||||||
|
|
|
@ -102,7 +102,7 @@ func setDefaults() Settings {
|
||||||
BaseURL: "",
|
BaseURL: "",
|
||||||
Database: "database.db",
|
Database: "database.db",
|
||||||
Log: "stdout",
|
Log: "stdout",
|
||||||
Root: "/srv",
|
Root: ".",
|
||||||
},
|
},
|
||||||
Auth: Auth{
|
Auth: Auth{
|
||||||
TokenExpirationTime: "2h",
|
TokenExpirationTime: "2h",
|
||||||
|
@ -123,6 +123,7 @@ func setDefaults() Settings {
|
||||||
DisableSettings: false,
|
DisableSettings: false,
|
||||||
ViewMode: "normal",
|
ViewMode: "normal",
|
||||||
Locale: "en",
|
Locale: "en",
|
||||||
|
GallerySize: 3,
|
||||||
Permissions: users.Permissions{
|
Permissions: users.Permissions{
|
||||||
Create: false,
|
Create: false,
|
||||||
Rename: false,
|
Rename: false,
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe('testSort', () => {
|
||||||
expect(sortedItems(input, "name")).toEqual(expected);
|
expect(sortedItems(input, "name")).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('sort items with extentions by name correctly', () => {
|
it('sort items with extensions by name correctly', () => {
|
||||||
const input = [
|
const input = [
|
||||||
{ name: "zebra.txt" },
|
{ name: "zebra.txt" },
|
||||||
{ name: "1.txt" },
|
{ name: "1.txt" },
|
||||||
|
|
|
@ -147,21 +147,24 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-brand {
|
.login-brand {
|
||||||
|
padding-bottom: 0 !important;
|
||||||
|
padding: 0em !important;
|
||||||
|
padding-top: 0.5em !important;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-text {
|
.brand-text {
|
||||||
padding: 1em !important;
|
padding: 1em !important;
|
||||||
padding-top: 0 !important;
|
padding-top: 0.9em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-brand i {
|
.login-brand i {
|
||||||
font-size: 5em !important;
|
font-size: 5em !important;
|
||||||
padding: 0 !important;
|
padding-top: 0em !important;
|
||||||
|
padding-bottom: 0em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
7
makefile
7
makefile
|
@ -24,7 +24,7 @@ run: run-frontend
|
||||||
sed -i '/func init/,+3d' ./swagger/docs/docs.go; \
|
sed -i '/func init/,+3d' ./swagger/docs/docs.go; \
|
||||||
fi && \
|
fi && \
|
||||||
FILEBROWSER_NO_EMBEDED=true go run \
|
FILEBROWSER_NO_EMBEDED=true go run \
|
||||||
--ldflags="-w -s -X 'github.com/gtsteffaniak/filebrowser/version.CommitSHA=testingCommit' -X 'github.com/gtsteffaniak/filebrowser/version.Version=testing'" . -c test_config.yaml
|
--ldflags="-w -s -X 'github.com/gtsteffaniak/filebrowser/backend/version.CommitSHA=testingCommit' -X 'github.com/gtsteffaniak/filebrowser/backend/version.Version=testing'" . -c test_config.yaml
|
||||||
|
|
||||||
run-frontend:
|
run-frontend:
|
||||||
cd backend/http && rm -rf dist && rm -rf embed/* && ln -s ../../frontend/dist && \
|
cd backend/http && rm -rf dist && rm -rf embed/* && ln -s ../../frontend/dist && \
|
||||||
|
@ -51,3 +51,8 @@ test-frontend:
|
||||||
test-frontend-playwright:
|
test-frontend-playwright:
|
||||||
npx playwright install
|
npx playwright install
|
||||||
docker build -t gtstef/filebrowser-tests -f Dockerfile.playwright .
|
docker build -t gtstef/filebrowser-tests -f Dockerfile.playwright .
|
||||||
|
|
||||||
|
# Run on a windows machine!
|
||||||
|
release-windows:
|
||||||
|
cd frontend && npm run build-windows && \
|
||||||
|
cd ../backend && go build --ldflags="-w -s -X github.com/gtsteffaniak/filebrowser/backend/version.CommitSHA=' -X 'github.com/gtsteffaniak/filebrowser/backend/version.Version='" .
|
Loading…
Reference in New Issue