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
1 change: 1 addition & 0 deletions com.woltlab.wcf/templates/headIncludeJavaScript.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
var ENABLE_DEBUG_MODE = {if ENABLE_DEBUG_MODE}true{else}false{/if};
var ENABLE_PRODUCTION_DEBUG_MODE = {if ENABLE_PRODUCTION_DEBUG_MODE}true{else}false{/if};
var ENABLE_DEVELOPER_TOOLS = {if ENABLE_DEVELOPER_TOOLS}true{else}false{/if};
var FORCE_LOGIN = {if FORCE_LOGIN}true{else}false{/if};
var PAGE_TITLE = '{unsafe:PAGE_TITLE|phrase|encodeJS}';

var REACTION_TYPES = {unsafe:$__wcf->getReactionHandler()->getReactionsJSVariable()};
Expand Down
16 changes: 12 additions & 4 deletions ts/WoltLabSuite/Core/Ui/Feed/Dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ function openDialog(event: Event): void {

const linkWithoutAccessToken = linkWithAccessToken.replace(/(\\?|&)at=[^&]*&?/, "$1").replace(/(\?|&)$/, "");

UiDialog.openStatic(
"feedLinkDialog",
`
// When `FORCE_LOGIN` is active, an RSS reader cannot access the feed without an
// access token. The anonymous link is therefore useless and must not be shown.
let withoutAccessToken = "";
if (!window.FORCE_LOGIN) {
withoutAccessToken = `
<woltlab-core-notice type="info">${Language.get("wcf.global.rss.accessToken.info")}</woltlab-core-notice>
<dl>
<dt>${Language.get("wcf.global.rss.withoutAccessToken")}</dt>
Expand All @@ -53,7 +55,13 @@ function openDialog(event: Event): void {
</button>
</div>
</dd>
</dl>
</dl>`;
}

UiDialog.openStatic(
"feedLinkDialog",
`
${withoutAccessToken}
<dl>
<dt>${Language.get("wcf.global.rss.withAccessToken")}</dt>
<dd>
Expand Down
1 change: 1 addition & 0 deletions ts/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ declare global {
Devtools?: typeof Devtools;
ENABLE_DEBUG_MODE: boolean;
ENABLE_DEVELOPER_TOOLS: boolean;
FORCE_LOGIN: boolean;
LANGUAGE_ID: number;
PAGE_TITLE: string;
REACTION_TYPES: {
Expand Down
11 changes: 9 additions & 2 deletions wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Feed/Dialog.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading