Skip to content

Commit c9b2bd6

Browse files
committed
Merge branch '6.2' into 6.3
2 parents 475cc74 + 4228d25 commit c9b2bd6

134 files changed

Lines changed: 1165 additions & 1079 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

com.woltlab.wcf/package.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<packagedescription>Free CMS and web-framework, designed for awesome websites and communities.</packagedescription>
66
<packagedescription language="de">Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht.</packagedescription>
77
<isapplication>1</isapplication>
8-
<version>6.2.2</version>
9-
<date>2026-03-09</date>
8+
<version>6.2.3</version>
9+
<date>2026-04-20</date>
1010
</packageinformation>
1111

1212
<authorinformation>
@@ -98,9 +98,13 @@ tar cvf com.woltlab.wcf/files_pre_check.tar -C wcfsetup/install/files/ \
9898
<instruction type="script">acp/update_com.woltlab.wcf_6.2_cleanUpDsStore.php</instruction>
9999
</instructions>
100100

101-
<instructions type="update" fromversion="6.2.1">
101+
<instructions type="update" fromversion="6.2.2">
102102
<instruction type="acpTemplate">acptemplates_update.tar</instruction>
103103
<instruction type="file">files_update.tar</instruction>
104+
<instruction type="template">templates_update.tar</instruction>
104105
<instruction type="language"/>
105106
</instructions>
107+
<instructions type="update" fromversion="6.2.3 dev 3">
108+
<instruction type="file">files_update.tar</instruction>
109+
</instructions>
106110
</package>

com.woltlab.wcf/templates/contentInteraction.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
{if $__contentInteractionDropdownItems}
5454
<div class="contentInteractionDropdown dropdown jsOnly">
55-
<button type="button" class="button small dropdownToggle" aria-label="{lang}wcf.global.button.more{/lang}">{icon name='ellipsis'}</button>
55+
<button type="button" class="button small jsTooltip dropdownToggle" title="{lang}wcf.global.button.moreOptions{/lang}">{icon name='ellipsis'}</button>
5656

5757
<ul class="contentInteractionDropdownItems dropdownMenu">
5858
{unsafe:$__contentInteractionDropdownItems}

package-lock.json

Lines changed: 624 additions & 688 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@types/sortablejs": "^1.15.9",
2828
"@types/supercluster": "^7.1.3",
2929
"@types/twitter-for-web": "0.0.6",
30-
"@woltlab/editor": "git+https://github.com/WoltLab/editor.git#be0fc99f19cdcdbaac62d02f3d4928b10249689c",
30+
"@woltlab/editor": "git+https://github.com/WoltLab/editor.git#504c659b5867178a63717113ea6fd1721ae2837a",
3131
"@woltlab/visual-dom-diff": "git+https://github.com/WoltLab/visual-dom-diff.git#e5b51fce3157d1eda310566fc1f86101341d1fea",
3232
"@woltlab/zxcvbn": "git+https://github.com/WoltLab/zxcvbn.git#5b582b24e437f1883ccad3c37dae7c3c5f1e7da3",
3333
"cropperjs": "2.1.0",
@@ -52,4 +52,4 @@
5252
]
5353
}
5454
}
55-
}
55+
}

ts/WoltLabSuite/Core/Api/Files/GenerateThumbnails.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function generateThumbnails(fileID: number): Promise<ApiResult<Resp
1717

1818
let response: Response;
1919
try {
20-
response = (await prepareRequest(url).post().fetchAsJson()) as Response;
20+
response = (await prepareRequest(url).post().disableLoadingIndicator().fetchAsJson()) as Response;
2121
} catch (e) {
2222
return apiResultFromError(e);
2323
}

ts/WoltLabSuite/Core/Api/Files/Upload.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export async function upload(
1414
objectType: string,
1515
context: string,
1616
exifBytes: Exif | null = null,
17+
ignoreExifRotation: boolean = false,
1718
): Promise<ApiResult<Response>> {
1819
const url = new URL(`${window.WSC_RPC_API_URL}core/files/upload`);
1920

@@ -32,6 +33,7 @@ export async function upload(
3233
objectType,
3334
context,
3435
exifData,
36+
ignoreExifRotation,
3537
};
3638

3739
let response: Response;

ts/WoltLabSuite/Core/Api/Result.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export function apiResultFromValue<T>(value: T): ApiResult<T> {
3838
};
3939
}
4040

41-
export async function apiResultFromError(error: Error): Promise<ApiResult<never>> {
41+
export async function apiResultFromError(error: unknown): Promise<ApiResult<never>> {
42+
if (!(error instanceof Error)) {
43+
throw new TypeError("Refusing to handle errors that are not an error.");
44+
}
45+
4246
if (error instanceof StatusNotOk) {
4347
return apiResultFromStatusNotOk(error);
4448
}

ts/WoltLabSuite/Core/Component/Attachment/Entry.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
trackUploadProgress,
1212
updateFileInformation,
1313
} from "WoltLabSuite/Core/Component/File/Helper";
14+
import { confirmationFactory } from "../Confirmation";
1415

1516
export type FileProcessorData = {
1617
attachmentID: number;
@@ -108,7 +109,9 @@ function fileInitializationCompleted(element: HTMLElement, file: WoltlabCoreFile
108109
}
109110

110111
const listItem = document.createElement("li");
111-
listItem.append(getDeleteAttachButton(fileId, (data as FileProcessorData).attachmentID, editor, element));
112+
listItem.append(
113+
getDeleteAttachButton(fileId, (data as FileProcessorData).attachmentID, editor, element, file.filename),
114+
);
112115
dropdownMenu.append(listItem);
113116

114117
const moreOptions = document.createElement("button");
@@ -137,21 +140,25 @@ function getDeleteAttachButton(
137140
attachmentId: number,
138141
editor: HTMLElement,
139142
element: HTMLElement,
143+
filename: string | undefined,
140144
): HTMLButtonElement {
141145
const button = document.createElement("button");
142146
button.type = "button";
143147
button.textContent = getPhrase("wcf.global.button.delete");
144148

145-
button.addEventListener("click", () => {
146-
void deleteFile(fileId).then((result) => {
147-
result.unwrap();
149+
button.addEventListener("click", async () => {
150+
const confirmationResult = await confirmationFactory().delete(filename);
151+
if (!confirmationResult) {
152+
return;
153+
}
148154

149-
dispatchToCkeditor(editor).removeAttachment({
150-
attachmentId,
151-
});
155+
(await deleteFile(fileId)).unwrap();
152156

153-
element.remove();
157+
dispatchToCkeditor(editor).removeAttachment({
158+
attachmentId,
154159
});
160+
161+
element.remove();
155162
});
156163

157164
return button;

ts/WoltLabSuite/Core/Component/Ckeditor.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ import type { WoltlabSmileyItem } from "@woltlab/editor/plugins/ckeditor5-woltla
3434
const instances = new WeakMap<HTMLElement, CKEditor>();
3535

3636
class Ckeditor {
37-
readonly #editor: CKEditor5.ClassicEditor.ClassicEditor;
37+
readonly #editor: CKEditor5.ClassicEditor;
3838
readonly #features: Features;
3939

40-
constructor(editor: CKEditor5.ClassicEditor.ClassicEditor, features: Features) {
40+
constructor(editor: CKEditor5.ClassicEditor, features: Features) {
4141
this.#editor = editor;
4242
this.#features = features;
4343
}
@@ -165,16 +165,16 @@ class Ckeditor {
165165
return this.#editor.sourceElement!;
166166
}
167167

168-
get focusTracker(): CKEditor5.Utils.FocusTracker {
168+
get focusTracker(): CKEditor5.FocusTracker {
169169
return this.#editor.ui.focusTracker;
170170
}
171171
}
172172

173173
function* findModelForRemoval(
174-
element: CKEditor5.Engine.ModelElement,
174+
element: CKEditor5.ModelElement,
175175
model: string,
176176
attributes: Record<string, string | number | boolean>,
177-
): Generator<CKEditor5.Engine.ModelElement> {
177+
): Generator<CKEditor5.ModelElement> {
178178
if (element.is("element", model)) {
179179
const isMatch = Object.entries(attributes).every(([key, value]) => {
180180
if (!element.hasAttribute(key)) {
@@ -221,9 +221,9 @@ function initializeConfiguration(
221221
features: Features,
222222
bbcodes: WoltlabBbcodeItem[],
223223
smileys: WoltlabSmileyItem[],
224-
codeBlockLanguages: CKEditor5.CodeBlock.CodeBlockConfig["languages"],
224+
codeBlockLanguages: CKEditor5.CodeBlockConfig["languages"],
225225
modules: typeof CKEditor5,
226-
): CKEditor5.Core.EditorConfig {
226+
): CKEditor5.EditorConfig {
227227
const configuration = createConfigurationFor(features);
228228
configuration.codeBlock = {
229229
languages: codeBlockLanguages,
@@ -242,7 +242,7 @@ function initializeConfiguration(
242242
modules,
243243
});
244244

245-
const toolbar = configuration.toolbar as CKEditor5.Core.ToolbarConfigItem[];
245+
const toolbar = configuration.toolbar as CKEditor5.ToolbarConfigItem[];
246246
for (let { name } of bbcodes) {
247247
name = `woltlabBbcode_${name}`;
248248

@@ -256,7 +256,7 @@ function initializeConfiguration(
256256
return configuration;
257257
}
258258

259-
function hasToolbarButton(items: CKEditor5.Core.ToolbarConfigItem[], name: string): boolean {
259+
function hasToolbarButton(items: CKEditor5.ToolbarConfigItem[], name: string): boolean {
260260
for (const item of items) {
261261
if (typeof item === "string") {
262262
if (item === name) {
@@ -270,7 +270,7 @@ function hasToolbarButton(items: CKEditor5.Core.ToolbarConfigItem[], name: strin
270270
return false;
271271
}
272272

273-
function notifyOfDataChanges(editor: CKEditor5.ClassicEditor.ClassicEditor, element: HTMLElement): void {
273+
function notifyOfDataChanges(editor: CKEditor5.ClassicEditor, element: HTMLElement): void {
274274
editor.model.document.on("change:data", () => {
275275
dispatchToCkeditor(element).changeData();
276276
});
@@ -281,7 +281,7 @@ export async function setupCkeditor(
281281
features: Features,
282282
bbcodes: WoltlabBbcodeItem[],
283283
smileys: WoltlabSmileyItem[],
284-
codeBlockLanguages: CKEditor5.CodeBlock.CodeBlockConfig["languages"],
284+
codeBlockLanguages: CKEditor5.CodeBlockConfig["languages"],
285285
licenseKey: string,
286286
): Promise<CKEditor> {
287287
if (instances.has(element)) {

ts/WoltLabSuite/Core/Component/Ckeditor/Autosave.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function saveDraft(element: HTMLElement, identifier: string, html: string): void
9292
}
9393
}
9494

95-
export function setupRestoreDraft(editor: CKEditor5.ClassicEditor.ClassicEditor, identifier: string): void {
95+
export function setupRestoreDraft(editor: CKEditor5.ClassicEditor, identifier: string): void {
9696
let value: AutosavePayload | undefined = undefined;
9797

9898
try {
@@ -230,7 +230,7 @@ function removeExpiredDrafts(): void {
230230

231231
export function initializeAutosave(
232232
element: HTMLElement,
233-
configuration: CKEditor5.Core.EditorConfig,
233+
configuration: CKEditor5.EditorConfig,
234234
identifier: string,
235235
): void {
236236
removeExpiredDrafts();

0 commit comments

Comments
 (0)