Discourse renders that footer based on some conditions. The footer is added here.
showFooterNav is defined here.
If either of those is true, the nav will be displayed.
isiOSPWA() and isAppWebview() are defined here
For example, isAppWebview() looks like this.
You can create an additional condition in your theme - in your Discourse site - to check for the cookie, like so
const isWKWebView = () => {
// check for the cookie and return true if it exists
// or use any other method to detect if the user is using your application
}
For other Classes, you would normally then be able to modify the showFooterNav() like so
api.modifyClass("controller:application", {
pluginId: "show-footer-nav",
@discourseComputed
showFooterNav() {
// ...
}
});
However, this is the application controller, which means that it will be cached before your code gets a chance to execute. In other words, you won’t be able to modify the Class.
That said, you can still change the showFooterNav value with something like this.
<script type="text/discourse-plugin" version="0.8">
const isWKWebView = () => {
// check and return your condition
};
if (isWKWebView()) {
const applicationController = api.container.lookup("controller:application");
applicationController.set("showFooterNav", true);
}
</script>
in the header tab of your theme or in an initializer if you’re using a remote theme.