Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
431 changes: 0 additions & 431 deletions ts/WoltLabSuite/Core/Acp/Ui/Article/InlineEditor.ts

This file was deleted.

23 changes: 23 additions & 0 deletions ts/WoltLabSuite/Core/Api/Articles/MarkAllArticlesAsRead.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Mark all articles as read
*
* @author Olaf Braun
* @copyright 2001-2025 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @since 6.3
*/

import { prepareRequest } from "WoltLabSuite/Core/Ajax/Backend";
import { ApiResult, apiResultFromError, apiResultFromValue } from "WoltLabSuite/Core/Api/Result";

export async function markAllArticlesAsRead(): Promise<ApiResult<[]>> {
try {
await prepareRequest(new URL(`${window.WSC_RPC_API_URL}core/articles/mark-all-as-read`))
.post()
.fetchAsJson();
} catch (e) {
return apiResultFromError(e);
}

return apiResultFromValue([]);
}
4 changes: 2 additions & 2 deletions ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
*/

import { showDefaultSuccessSnackbar } from "WoltLabSuite/Core/Component/Snackbar";
import { dboAction } from "../../Ajax";
import { markAllArticlesAsRead } from "WoltLabSuite/Core/Api/Articles/MarkAllArticlesAsRead";

async function markAllAsRead(): Promise<void> {
await dboAction("markAllAsRead", "wcf\\data\\article\\ArticleAction").dispatch();
await markAllArticlesAsRead();

document.querySelectorAll(".contentItemList .contentItemBadgeNew").forEach((el: HTMLElement) => el.remove());
document.querySelectorAll(".boxMenu .active .badge").forEach((el: HTMLElement) => el.remove());
Expand Down

This file was deleted.

Loading