mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 14:00:25 +00:00
Compare commits
5 Commits
e6ffb65374
...
545c972214
Author | SHA1 | Date | |
---|---|---|---|
![]() |
545c972214 | ||
![]() |
124abc7643 | ||
![]() |
b8454bb2e4 | ||
![]() |
035084d8e8 | ||
![]() |
9072cbce34 |
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.40.0](https://github.com/filebrowser/filebrowser/compare/v2.39.0...v2.40.0) (2025-07-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add font size botton to text editor ([#5290](https://github.com/filebrowser/filebrowser/issues/5290)) ([035084d](https://github.com/filebrowser/filebrowser/commit/035084d8e83243065fad69bfac1b69559fbad5fb))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* invalid path when uploading files ([9072cbc](https://github.com/filebrowser/filebrowser/commit/9072cbce340da55477906f5419a4cfb6d6937dc0))
|
||||||
|
* Only left click should drag the image in extended image view ([b8454bb](https://github.com/filebrowser/filebrowser/commit/b8454bb2e41ca2848b926b66354468ba4b1c7ba5))
|
||||||
|
|
||||||
## [2.39.0](https://github.com/filebrowser/filebrowser/compare/v2.38.0...v2.39.0) (2025-07-13)
|
## [2.39.0](https://github.com/filebrowser/filebrowser/compare/v2.38.0...v2.39.0) (2025-07-13)
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PORT=${FB_PORT:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')}
|
PORT=${FB_PORT:-$(cat /config/settings.json | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')}
|
||||||
ADDRESS=${FB_ADDRESS:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')}
|
ADDRESS=${FB_ADDRESS:-$(cat /config/settings.json | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')}
|
||||||
ADDRESS=${ADDRESS:-localhost}
|
ADDRESS=${ADDRESS:-localhost}
|
||||||
|
|
||||||
wget -q --spider http://$ADDRESS:$PORT/health || exit 1
|
wget -q --spider http://$ADDRESS:$PORT/health || exit 1
|
@ -32,7 +32,4 @@ if [ -z "$config_file" ]; then
|
|||||||
set -- --config=/config/settings.json "$@"
|
set -- --config=/config/settings.json "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a symlink to the config file for compatibility with the healthcheck script
|
|
||||||
ln -s "$config_file" /tmp/FB_CONFIG
|
|
||||||
|
|
||||||
exec filebrowser "$@"
|
exec filebrowser "$@"
|
@ -1,5 +1,5 @@
|
|||||||
import * as tus from "tus-js-client";
|
import * as tus from "tus-js-client";
|
||||||
import { baseURL, tusEndpoint, tusSettings } from "@/utils/constants";
|
import { baseURL, tusEndpoint, tusSettings, origin } from "@/utils/constants";
|
||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import { useUploadStore } from "@/stores/upload";
|
import { useUploadStore } from "@/stores/upload";
|
||||||
import { removePrefix } from "@/api/utils";
|
import { removePrefix } from "@/api/utils";
|
||||||
@ -35,7 +35,7 @@ export async function upload(
|
|||||||
}
|
}
|
||||||
return new Promise<void | string>((resolve, reject) => {
|
return new Promise<void | string>((resolve, reject) => {
|
||||||
const upload = new tus.Upload(content, {
|
const upload = new tus.Upload(content, {
|
||||||
endpoint: `${baseURL}${resourcePath}`,
|
endpoint: `${origin}${baseURL}${resourcePath}`,
|
||||||
chunkSize: tusSettings.chunkSize,
|
chunkSize: tusSettings.chunkSize,
|
||||||
retryDelays: computeRetryDelays(tusSettings),
|
retryDelays: computeRetryDelays(tusSettings),
|
||||||
parallelUploads: 1,
|
parallelUploads: 1,
|
||||||
|
@ -172,7 +172,8 @@ const setCenter = () => {
|
|||||||
imgex.value.style.top = position.value.center.y + "px";
|
imgex.value.style.top = position.value.center.y + "px";
|
||||||
};
|
};
|
||||||
|
|
||||||
const mousedownStart = (event: Event) => {
|
const mousedownStart = (event: MouseEvent) => {
|
||||||
|
if (event.button !== 0) return;
|
||||||
lastX.value = null;
|
lastX.value = null;
|
||||||
lastY.value = null;
|
lastY.value = null;
|
||||||
inDrag.value = true;
|
inDrag.value = true;
|
||||||
@ -184,8 +185,10 @@ const mouseMove = (event: MouseEvent) => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
};
|
};
|
||||||
const mouseUp = (event: Event) => {
|
const mouseUp = (event: Event) => {
|
||||||
inDrag.value = false;
|
if (inDrag.value) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
inDrag.value = false;
|
||||||
};
|
};
|
||||||
const touchStart = (event: TouchEvent) => {
|
const touchStart = (event: TouchEvent) => {
|
||||||
lastX.value = null;
|
lastX.value = null;
|
||||||
|
@ -4,6 +4,18 @@
|
|||||||
<action icon="close" :label="t('buttons.close')" @action="close()" />
|
<action icon="close" :label="t('buttons.close')" @action="close()" />
|
||||||
<title>{{ fileStore.req?.name ?? "" }}</title>
|
<title>{{ fileStore.req?.name ?? "" }}</title>
|
||||||
|
|
||||||
|
<action
|
||||||
|
icon="add"
|
||||||
|
@action="increaseFontSize"
|
||||||
|
:label="t('buttons.increaseFontSize')"
|
||||||
|
/>
|
||||||
|
<span class="editor-font-size">{{ fontSize }}px</span>
|
||||||
|
<action
|
||||||
|
icon="remove"
|
||||||
|
@action="decreaseFontSize"
|
||||||
|
:label="t('buttons.decreaseFontSize')"
|
||||||
|
/>
|
||||||
|
|
||||||
<action
|
<action
|
||||||
v-if="authStore.user?.perm.modify"
|
v-if="authStore.user?.perm.modify"
|
||||||
id="save-button"
|
id="save-button"
|
||||||
@ -67,6 +79,7 @@ const route = useRoute();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const editor = ref<Ace.Editor | null>(null);
|
const editor = ref<Ace.Editor | null>(null);
|
||||||
|
const fontSize = ref(parseInt(localStorage.getItem("editorFontSize") || "14"));
|
||||||
|
|
||||||
const isPreview = ref(false);
|
const isPreview = ref(false);
|
||||||
const previewContent = ref("");
|
const previewContent = ref("");
|
||||||
@ -121,6 +134,7 @@ onMounted(() => {
|
|||||||
editor.value!.setTheme("ace/theme/twilight");
|
editor.value!.setTheme("ace/theme/twilight");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
editor.value.setFontSize(fontSize.value);
|
||||||
editor.value.focus();
|
editor.value.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -186,6 +200,21 @@ const save = async () => {
|
|||||||
$showError(e);
|
$showError(e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const increaseFontSize = () => {
|
||||||
|
fontSize.value += 1;
|
||||||
|
editor.value?.setFontSize(fontSize.value);
|
||||||
|
localStorage.setItem("editorFontSize", fontSize.value.toString());
|
||||||
|
};
|
||||||
|
|
||||||
|
const decreaseFontSize = () => {
|
||||||
|
if (fontSize.value > 1) {
|
||||||
|
fontSize.value -= 1;
|
||||||
|
editor.value?.setFontSize(fontSize.value);
|
||||||
|
localStorage.setItem("editorFontSize", fontSize.value.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const close = () => {
|
const close = () => {
|
||||||
if (!editor.value?.session.getUndoManager().isClean()) {
|
if (!editor.value?.session.getUndoManager().isClean()) {
|
||||||
layoutStore.showHover("discardEditorChanges");
|
layoutStore.showHover("discardEditorChanges");
|
||||||
@ -202,3 +231,10 @@ const preview = () => {
|
|||||||
isPreview.value = !isPreview.value;
|
isPreview.value = !isPreview.value;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.editor-font-size {
|
||||||
|
margin: 0 0.5em;
|
||||||
|
color: var(--fg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -147,7 +147,8 @@ func tusPostHandler() handleFunc {
|
|||||||
// Enables the user to utilize the PATCH endpoint for uploading file data
|
// Enables the user to utilize the PATCH endpoint for uploading file data
|
||||||
registerUpload(file.RealPath(), uploadLength)
|
registerUpload(file.RealPath(), uploadLength)
|
||||||
|
|
||||||
w.Header().Set("Location", "/api/tus/"+r.URL.Path)
|
// Signal the frontend to reuse the current request URL
|
||||||
|
w.Header().Set("Location", "")
|
||||||
|
|
||||||
return http.StatusCreated, nil
|
return http.StatusCreated, nil
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user