mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 14:00:25 +00:00
Compare commits
4 Commits
b4eddf45e4
...
35ca24adb8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
35ca24adb8 | ||
![]() |
14b0dfec34 | ||
![]() |
528ce92fad | ||
![]() |
fbe169b84f |
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@ -85,6 +85,8 @@ jobs:
|
|||||||
node-version: "22.x"
|
node-version: "22.x"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
||||||
|
- name: Install upx
|
||||||
|
run: sudo apt-get install -y upx
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
@ -40,6 +40,17 @@ archives:
|
|||||||
- goos: windows
|
- goos: windows
|
||||||
formats: ["zip"]
|
formats: ["zip"]
|
||||||
|
|
||||||
|
upx:
|
||||||
|
- enabled: true
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
compress: "best"
|
||||||
|
lzma: true
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
# Alpine docker images
|
# Alpine docker images
|
||||||
- dockerfile: Dockerfile
|
- dockerfile: Dockerfile
|
||||||
|
13
CHANGELOG.md
13
CHANGELOG.md
@ -2,6 +2,19 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.38.0](https://github.com/filebrowser/filebrowser/compare/v2.37.0...v2.38.0) (2025-07-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Show the current users name in the sidebar ([#2821](https://github.com/filebrowser/filebrowser/issues/2821)) ([528ce92](https://github.com/filebrowser/filebrowser/commit/528ce92fad6dcc8e8b7910036bf9175146e27bf7))
|
||||||
|
* Updates for project File Browser ([b4eddf4](https://github.com/filebrowser/filebrowser/commit/b4eddf45e4d7e6f6ccf242e67fe20f89f5e2f9a9))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* prevent page change if there are outstanding edits ([#5260](https://github.com/filebrowser/filebrowser/issues/5260)) ([fbe169b](https://github.com/filebrowser/filebrowser/commit/fbe169b84f28cba22ea87f01b52f2420f1ea6814))
|
||||||
|
|
||||||
## [2.37.0](https://github.com/filebrowser/filebrowser/compare/v2.36.3...v2.37.0) (2025-07-08)
|
## [2.37.0](https://github.com/filebrowser/filebrowser/compare/v2.36.3...v2.37.0) (2025-07-08)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.22
|
FROM alpine:3.22
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk --no-cache add ca-certificates mailcap curl jq tini
|
apk --no-cache add ca-certificates mailcap jq tini
|
||||||
|
|
||||||
# Make user and create necessary directories
|
# Make user and create necessary directories
|
||||||
ENV UID=1000
|
ENV UID=1000
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk --no-cache add ca-certificates mailcap curl jq
|
apk --no-cache add ca-certificates mailcap jq
|
||||||
|
|
||||||
# Make user and create necessary directories
|
# Make user and create necessary directories
|
||||||
RUN mkdir -p /config /database /srv && \
|
RUN mkdir -p /config /database /srv && \
|
||||||
|
@ -6,4 +6,4 @@ PORT=${FB_PORT:-$(jq -r .port /config/settings.json)}
|
|||||||
ADDRESS=${FB_ADDRESS:-$(jq -r .address /config/settings.json)}
|
ADDRESS=${FB_ADDRESS:-$(jq -r .address /config/settings.json)}
|
||||||
ADDRESS=${ADDRESS:-localhost}
|
ADDRESS=${ADDRESS:-localhost}
|
||||||
|
|
||||||
curl -f http://$ADDRESS:$PORT/health || exit 1
|
wget -q --spider http://$ADDRESS:$PORT/health || exit 1
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
<div v-show="active" @click="closeHovers" class="overlay"></div>
|
<div v-show="active" @click="closeHovers" class="overlay"></div>
|
||||||
<nav :class="{ active }">
|
<nav :class="{ active }">
|
||||||
<template v-if="isLoggedIn">
|
<template v-if="isLoggedIn">
|
||||||
|
<button @click="toAccountSettings" class="action">
|
||||||
|
<i class="material-icons">person</i>
|
||||||
|
<span>{{ user.username }}</span>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="action"
|
class="action"
|
||||||
@click="toRoot"
|
@click="toRoot"
|
||||||
@ -34,7 +38,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div v-if="user.perm.admin">
|
||||||
<button
|
<button
|
||||||
class="action"
|
class="action"
|
||||||
@click="toSettings"
|
@click="toSettings"
|
||||||
@ -44,19 +48,18 @@
|
|||||||
<i class="material-icons">settings_applications</i>
|
<i class="material-icons">settings_applications</i>
|
||||||
<span>{{ $t("sidebar.settings") }}</span>
|
<span>{{ $t("sidebar.settings") }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
|
||||||
v-if="canLogout"
|
|
||||||
@click="logout"
|
|
||||||
class="action"
|
|
||||||
id="logout"
|
|
||||||
:aria-label="$t('sidebar.logout')"
|
|
||||||
:title="$t('sidebar.logout')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">exit_to_app</i>
|
|
||||||
<span>{{ $t("sidebar.logout") }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
|
v-if="canLogout"
|
||||||
|
@click="logout"
|
||||||
|
class="action"
|
||||||
|
id="logout"
|
||||||
|
:aria-label="$t('sidebar.logout')"
|
||||||
|
:title="$t('sidebar.logout')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">exit_to_app</i>
|
||||||
|
<span>{{ $t("sidebar.logout") }}</span>
|
||||||
|
</button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<router-link
|
<router-link
|
||||||
@ -190,8 +193,12 @@ export default {
|
|||||||
this.$router.push({ path: "/files" });
|
this.$router.push({ path: "/files" });
|
||||||
this.closeHovers();
|
this.closeHovers();
|
||||||
},
|
},
|
||||||
toSettings() {
|
toAccountSettings() {
|
||||||
this.$router.push({ path: "/settings" });
|
this.$router.push({ path: "/settings/profile" });
|
||||||
|
this.closeHovers();
|
||||||
|
},
|
||||||
|
toGlobalSettings() {
|
||||||
|
this.$router.push({ path: "/settings/global" });
|
||||||
this.closeHovers();
|
this.closeHovers();
|
||||||
},
|
},
|
||||||
help() {
|
help() {
|
||||||
|
@ -39,21 +39,21 @@ import { files as api } from "@/api";
|
|||||||
import buttons from "@/utils/buttons";
|
import buttons from "@/utils/buttons";
|
||||||
import url from "@/utils/url";
|
import url from "@/utils/url";
|
||||||
import ace, { Ace, version as ace_version } from "ace-builds";
|
import ace, { Ace, version as ace_version } from "ace-builds";
|
||||||
import modelist from "ace-builds/src-noconflict/ext-modelist";
|
|
||||||
import "ace-builds/src-noconflict/ext-language_tools";
|
import "ace-builds/src-noconflict/ext-language_tools";
|
||||||
|
import modelist from "ace-builds/src-noconflict/ext-modelist";
|
||||||
import DOMPurify from "dompurify";
|
import DOMPurify from "dompurify";
|
||||||
|
|
||||||
import HeaderBar from "@/components/header/HeaderBar.vue";
|
|
||||||
import Action from "@/components/header/Action.vue";
|
|
||||||
import Breadcrumbs from "@/components/Breadcrumbs.vue";
|
import Breadcrumbs from "@/components/Breadcrumbs.vue";
|
||||||
|
import Action from "@/components/header/Action.vue";
|
||||||
|
import HeaderBar from "@/components/header/HeaderBar.vue";
|
||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import { useFileStore } from "@/stores/file";
|
import { useFileStore } from "@/stores/file";
|
||||||
import { useLayoutStore } from "@/stores/layout";
|
import { useLayoutStore } from "@/stores/layout";
|
||||||
import { inject, onBeforeUnmount, onMounted, ref, watchEffect } from "vue";
|
|
||||||
import { useRoute, useRouter } from "vue-router";
|
|
||||||
import { useI18n } from "vue-i18n";
|
|
||||||
import { getTheme } from "@/utils/theme";
|
import { getTheme } from "@/utils/theme";
|
||||||
import { marked } from "marked";
|
import { marked } from "marked";
|
||||||
|
import { inject, onBeforeUnmount, onMounted, ref, watchEffect } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
|
||||||
|
|
||||||
const $showError = inject<IToastError>("$showError")!;
|
const $showError = inject<IToastError>("$showError")!;
|
||||||
|
|
||||||
@ -77,6 +77,7 @@ const isMarkdownFile =
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
window.addEventListener("keydown", keyEvent);
|
window.addEventListener("keydown", keyEvent);
|
||||||
window.addEventListener("wheel", handleScroll);
|
window.addEventListener("wheel", handleScroll);
|
||||||
|
window.addEventListener("beforeunload", handlePageChange);
|
||||||
|
|
||||||
const fileContent = fileStore.req?.content || "";
|
const fileContent = fileStore.req?.content || "";
|
||||||
|
|
||||||
@ -126,9 +127,19 @@ onMounted(() => {
|
|||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
window.removeEventListener("keydown", keyEvent);
|
window.removeEventListener("keydown", keyEvent);
|
||||||
window.removeEventListener("wheel", handleScroll);
|
window.removeEventListener("wheel", handleScroll);
|
||||||
|
window.removeEventListener("beforeunload", handlePageChange);
|
||||||
editor.value?.destroy();
|
editor.value?.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onBeforeRouteUpdate((to, from, next) => {
|
||||||
|
if (!editor.value?.session.getUndoManager().isClean()) {
|
||||||
|
layoutStore.showHover("discardEditorChanges");
|
||||||
|
next(false);
|
||||||
|
} else {
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const keyEvent = (event: KeyboardEvent) => {
|
const keyEvent = (event: KeyboardEvent) => {
|
||||||
if (event.code === "Escape") {
|
if (event.code === "Escape") {
|
||||||
close();
|
close();
|
||||||
@ -153,6 +164,15 @@ const handleScroll = (event: WheelEvent) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handlePageChange = (event: BeforeUnloadEvent) => {
|
||||||
|
if (!editor.value?.session.getUndoManager().isClean()) {
|
||||||
|
event.preventDefault();
|
||||||
|
// returnValue is now depecrated, though keeping in for legacy browser support
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent/returnValue
|
||||||
|
event.returnValue = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
const button = "save";
|
const button = "save";
|
||||||
buttons.loading("save");
|
buttons.loading("save");
|
||||||
|
@ -30,6 +30,7 @@ type userInfo struct {
|
|||||||
LockPassword bool `json:"lockPassword"`
|
LockPassword bool `json:"lockPassword"`
|
||||||
HideDotfiles bool `json:"hideDotfiles"`
|
HideDotfiles bool `json:"hideDotfiles"`
|
||||||
DateFormat bool `json:"dateFormat"`
|
DateFormat bool `json:"dateFormat"`
|
||||||
|
Username string `json:"username"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type authToken struct {
|
type authToken struct {
|
||||||
@ -198,6 +199,7 @@ func printToken(w http.ResponseWriter, _ *http.Request, d *data, user *users.Use
|
|||||||
Commands: user.Commands,
|
Commands: user.Commands,
|
||||||
HideDotfiles: user.HideDotfiles,
|
HideDotfiles: user.HideDotfiles,
|
||||||
DateFormat: user.DateFormat,
|
DateFormat: user.DateFormat,
|
||||||
|
Username: user.Username,
|
||||||
},
|
},
|
||||||
RegisteredClaims: jwt.RegisteredClaims{
|
RegisteredClaims: jwt.RegisteredClaims{
|
||||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user