mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 05:50:27 +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"
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
||||
- name: Install upx
|
||||
run: sudo apt-get install -y upx
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
|
@ -40,6 +40,17 @@ archives:
|
||||
- goos: windows
|
||||
formats: ["zip"]
|
||||
|
||||
upx:
|
||||
- enabled: true
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
compress: "best"
|
||||
lzma: true
|
||||
|
||||
dockers:
|
||||
# Alpine docker images
|
||||
- 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.
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM alpine:3.22
|
||||
|
||||
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
|
||||
ENV UID=1000
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
||||
|
||||
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
|
||||
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=${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>
|
||||
<nav :class="{ active }">
|
||||
<template v-if="isLoggedIn">
|
||||
<button @click="toAccountSettings" class="action">
|
||||
<i class="material-icons">person</i>
|
||||
<span>{{ user.username }}</span>
|
||||
</button>
|
||||
<button
|
||||
class="action"
|
||||
@click="toRoot"
|
||||
@ -34,7 +38,7 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div v-if="user.perm.admin">
|
||||
<button
|
||||
class="action"
|
||||
@click="toSettings"
|
||||
@ -44,7 +48,7 @@
|
||||
<i class="material-icons">settings_applications</i>
|
||||
<span>{{ $t("sidebar.settings") }}</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<button
|
||||
v-if="canLogout"
|
||||
@click="logout"
|
||||
@ -56,7 +60,6 @@
|
||||
<i class="material-icons">exit_to_app</i>
|
||||
<span>{{ $t("sidebar.logout") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<router-link
|
||||
@ -190,8 +193,12 @@ export default {
|
||||
this.$router.push({ path: "/files" });
|
||||
this.closeHovers();
|
||||
},
|
||||
toSettings() {
|
||||
this.$router.push({ path: "/settings" });
|
||||
toAccountSettings() {
|
||||
this.$router.push({ path: "/settings/profile" });
|
||||
this.closeHovers();
|
||||
},
|
||||
toGlobalSettings() {
|
||||
this.$router.push({ path: "/settings/global" });
|
||||
this.closeHovers();
|
||||
},
|
||||
help() {
|
||||
|
@ -39,21 +39,21 @@ import { files as api } from "@/api";
|
||||
import buttons from "@/utils/buttons";
|
||||
import url from "@/utils/url";
|
||||
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 modelist from "ace-builds/src-noconflict/ext-modelist";
|
||||
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 Action from "@/components/header/Action.vue";
|
||||
import HeaderBar from "@/components/header/HeaderBar.vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { useFileStore } from "@/stores/file";
|
||||
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 { 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")!;
|
||||
|
||||
@ -77,6 +77,7 @@ const isMarkdownFile =
|
||||
onMounted(() => {
|
||||
window.addEventListener("keydown", keyEvent);
|
||||
window.addEventListener("wheel", handleScroll);
|
||||
window.addEventListener("beforeunload", handlePageChange);
|
||||
|
||||
const fileContent = fileStore.req?.content || "";
|
||||
|
||||
@ -126,9 +127,19 @@ onMounted(() => {
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("keydown", keyEvent);
|
||||
window.removeEventListener("wheel", handleScroll);
|
||||
window.removeEventListener("beforeunload", handlePageChange);
|
||||
editor.value?.destroy();
|
||||
});
|
||||
|
||||
onBeforeRouteUpdate((to, from, next) => {
|
||||
if (!editor.value?.session.getUndoManager().isClean()) {
|
||||
layoutStore.showHover("discardEditorChanges");
|
||||
next(false);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
const keyEvent = (event: KeyboardEvent) => {
|
||||
if (event.code === "Escape") {
|
||||
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 button = "save";
|
||||
buttons.loading("save");
|
||||
|
@ -30,6 +30,7 @@ type userInfo struct {
|
||||
LockPassword bool `json:"lockPassword"`
|
||||
HideDotfiles bool `json:"hideDotfiles"`
|
||||
DateFormat bool `json:"dateFormat"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type authToken struct {
|
||||
@ -198,6 +199,7 @@ func printToken(w http.ResponseWriter, _ *http.Request, d *data, user *users.Use
|
||||
Commands: user.Commands,
|
||||
HideDotfiles: user.HideDotfiles,
|
||||
DateFormat: user.DateFormat,
|
||||
Username: user.Username,
|
||||
},
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user