mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 14:00:25 +00:00
Compare commits
No commits in common. "545c9722148900fe7b2a54b5260d3882f545c79b" and "e6ffb653740e37118d1882edb8d71ebe6663fece" have entirely different histories.
545c972214
...
e6ffb65374
13
CHANGELOG.md
13
CHANGELOG.md
@ -2,19 +2,6 @@
|
|||||||
|
|
||||||
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 /config/settings.json | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')}
|
PORT=${FB_PORT:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')}
|
||||||
ADDRESS=${FB_ADDRESS:-$(cat /config/settings.json | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')}
|
ADDRESS=${FB_ADDRESS:-$(cat /tmp/FB_CONFIG | 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,4 +32,7 @@ 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, origin } from "@/utils/constants";
|
import { baseURL, tusEndpoint, tusSettings } 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: `${origin}${baseURL}${resourcePath}`,
|
endpoint: `${baseURL}${resourcePath}`,
|
||||||
chunkSize: tusSettings.chunkSize,
|
chunkSize: tusSettings.chunkSize,
|
||||||
retryDelays: computeRetryDelays(tusSettings),
|
retryDelays: computeRetryDelays(tusSettings),
|
||||||
parallelUploads: 1,
|
parallelUploads: 1,
|
||||||
|
@ -172,8 +172,7 @@ const setCenter = () => {
|
|||||||
imgex.value.style.top = position.value.center.y + "px";
|
imgex.value.style.top = position.value.center.y + "px";
|
||||||
};
|
};
|
||||||
|
|
||||||
const mousedownStart = (event: MouseEvent) => {
|
const mousedownStart = (event: Event) => {
|
||||||
if (event.button !== 0) return;
|
|
||||||
lastX.value = null;
|
lastX.value = null;
|
||||||
lastY.value = null;
|
lastY.value = null;
|
||||||
inDrag.value = true;
|
inDrag.value = true;
|
||||||
@ -185,10 +184,8 @@ const mouseMove = (event: MouseEvent) => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
};
|
};
|
||||||
const mouseUp = (event: Event) => {
|
const mouseUp = (event: Event) => {
|
||||||
if (inDrag.value) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
inDrag.value = false;
|
inDrag.value = false;
|
||||||
|
event.preventDefault();
|
||||||
};
|
};
|
||||||
const touchStart = (event: TouchEvent) => {
|
const touchStart = (event: TouchEvent) => {
|
||||||
lastX.value = null;
|
lastX.value = null;
|
||||||
|
@ -4,18 +4,6 @@
|
|||||||
<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"
|
||||||
@ -79,7 +67,6 @@ 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("");
|
||||||
@ -134,7 +121,6 @@ onMounted(() => {
|
|||||||
editor.value!.setTheme("ace/theme/twilight");
|
editor.value!.setTheme("ace/theme/twilight");
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.value.setFontSize(fontSize.value);
|
|
||||||
editor.value.focus();
|
editor.value.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -200,21 +186,6 @@ 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");
|
||||||
@ -231,10 +202,3 @@ 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,8 +147,7 @@ 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)
|
||||||
|
|
||||||
// Signal the frontend to reuse the current request URL
|
w.Header().Set("Location", "/api/tus/"+r.URL.Path)
|
||||||
w.Header().Set("Location", "")
|
|
||||||
|
|
||||||
return http.StatusCreated, nil
|
return http.StatusCreated, nil
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user