mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 21:33:35 -05:00
fixes(imagePreview): & toggle setting
This commit is contained in:
parent
a16f241b85
commit
bfda6a5c26
3 changed files with 11 additions and 4 deletions
|
@ -263,8 +263,10 @@ function loadImagePreview(url: string, sticker: boolean) {
|
|||
fileSize.appendChild(showingSize);
|
||||
}
|
||||
|
||||
if (settings.store.fileInformation) {
|
||||
preview.appendChild(fileName);
|
||||
preview.appendChild(fileInfo);
|
||||
}
|
||||
});
|
||||
|
||||
if (loadingSpinner) loadingSpinner.remove();
|
||||
|
@ -287,7 +289,7 @@ function loadImagePreview(url: string, sticker: boolean) {
|
|||
}
|
||||
});
|
||||
|
||||
currentPreview.addEventListener("mouseout", () => {
|
||||
currentPreviewFile.addEventListener("mouseout", () => {
|
||||
if (currentPreview && !isCtrlHeld && shouldKeepPreviewOpen) {
|
||||
deleteCurrentPreview();
|
||||
shouldKeepPreviewOpen = false;
|
||||
|
|
|
@ -43,6 +43,11 @@ const settings = definePluginSettings({
|
|||
description: "Fixes the image preview to the initial point of hover",
|
||||
default: false
|
||||
},
|
||||
fileInformation: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Show file information on hover",
|
||||
default: true
|
||||
},
|
||||
hoverDelay: {
|
||||
type: OptionType.SLIDER,
|
||||
description: "Delay in seconds before the image preview appears",
|
||||
|
|
Loading…
Reference in a new issue