How to change default size of dialog used for adding new topic?
-
Usually size of dialog is only half-screen but I want fullscreen/maximized by default. I've tried adding class "maximized" to class "composer", but didn't get desired effect. There must be something I've missed when I was looking into code on Github.
Default size:
https://postimg.org/image/xxoi2wuh7/Desired size:
https://postimg.org/image/6od4oete3/Also is it possible to link directly to this dialog in particular category? For example: I want to send someone who needs help with NodeBB a link which would lead him directly to this category (Tech support on comunity.nodebb.org), with maximized/fullscreen dialog for creating a new thread.
-
I found this: https://community.nodebb.org/topic/9492/open-new-topic-composer/6
It works from navbar but doesn't seem to work if I add the link on custom homepage.
I'm using plugins nodebb-plugin-custom-homepg and nodebb-plugin-custom-pages.
-
@metalkramp size of new topic composer
depends on function resize.repositionlib/composer/resize.js
resize.reposition = function(postContainer) { console.info('[resize.js] reposition called'); var ratio = getSavedRatio(); // get size ratio here if (ratio >= 1 - snapMargin) { ratio = 1; postContainer.addClass('maximized'); } resizeIt(postContainer, ratio); };
getSavedRatio:
function getSavedRatio() { return localStorage.getItem('composer:resizeRatio') || 0.5; }
try setting it before resize.reposition called, like:
localStorage.setItem('composer:resizeRatio', 1);