Skip to content

Commit

Permalink
fix(mobile): Surface real information in "about"
Browse files Browse the repository at this point in the history
Previously we exposed "%WOPI_HOST_ID%" and "%PROXY_PREFIX_ENABLED%",
despoenite those variables being undefined for mobile. Additionally, we
incorrectly displayed the app name as MOBILEAPPNAME.

These appear to be regressions from #9442
  • Loading branch information
Minion3665 committed Aug 23, 2024
1 parent f60e589 commit b53e7ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions browser/html/cool.html.m4
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ m4_ifelse(MOBILEAPP,[true],
<div id="slow-proxy"></div>
m4_ifelse(DEBUG,[true],[<div id="js-dialog">JSDialogs: <a href="javascript:void(function() { app.socket.sendMessage('uno .uno:WidgetTestDialog') }() )">View widgets</a></div>])
<div id="routeToken"></div>
<div id="wopi-host-id">%WOPI_HOST_ID%</div>
<div id="proxy-prefix-id">%PROXY_PREFIX_ENABLED%</div>
m4_ifelse(MOBILEAPP,[],[<div id="wopi-host-id">%WOPI_HOST_ID%</div><div id="proxy-prefix-id">%PROXY_PREFIX_ENABLED%</div>],[<p></p>])
<p class="about-dialog-info-div"><span dir="ltr">Copyright © _YEAR_, VENDOR.</span></p>
</div>
</div>
Expand All @@ -219,6 +218,7 @@ m4_ifelse(MOBILEAPP, [true],
data-access-header='%ACCESS_HEADER%'
]
)
data-mobile-app-name='MOBILEAPPNAME'
/>
],
[
Expand Down
6 changes: 4 additions & 2 deletions browser/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,10 @@ class MobileAppInitializer extends InitializerBase {
window.postMobileMessage('HYPERLINK ' + url); /* don't call the 'normal' window.open on mobile at all */
};

window.MobileAppName = 'MOBILEAPPNAME';
window.brandProductName = 'MOBILEAPPNAME';
const element = document.getElementById("initial-variables");

window.MobileAppName = element.dataset.mobileAppName;
window.brandProductName = element.dataset.mobileAppName;

window.coolLogging = "true";
window.outOfFocusTimeoutSecs = 1000000;
Expand Down

0 comments on commit b53e7ed

Please sign in to comment.