diff --git a/app/css/post.css b/app/css/post.css index 9a1a8fc8..ee29ba6b 100644 --- a/app/css/post.css +++ b/app/css/post.css @@ -7,10 +7,10 @@ background-color: var(--postbox); border: thin solid gray; z-index: 501; - min-width: 300px; max-width: 100%; padding: 5px; border-radius: 5px; + overflow: hidden; } textarea { min-height: 100px !important; @@ -108,13 +108,18 @@ textarea { } #left-side { float: left; - width: 300px; + overflow-y: scroll; + overflow-x: hidden; + height: calc(100% - 32px); } #right-side { display: none; float: left; width: 300px; padding: 5px; + overflow-y: scroll; + overflow-x: hidden; + height: calc(100% - 32px); } #poll { } diff --git a/app/css/tl.css b/app/css/tl.css index abfb79ea..77f37184 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -285,11 +285,12 @@ iframe, text-overflow: ellipsis; overflow: hidden; } -.area-additional.acct-note p:not(:first-child) { +.area-toot.acct-note p:not(:first-child) { display: none; } -.area-additional.acct-note p:first-child:after { +.area-toot.acct-note p:first-child:after { content: "..."; + color: var(--gray) } .area-actions { diff --git a/app/js/post/emoji.js b/app/js/post/emoji.js index fdfa77ec..0ff2b131 100644 --- a/app/js/post/emoji.js +++ b/app/js/post/emoji.js @@ -13,6 +13,13 @@ function emojiToggle(reaction) { if ($("#emoji").hasClass("hide")) { $("#emoji").removeClass("hide") $("#right-side").show() + $("#right-side").css("width", "300px") + $("#left-side").css("width","calc(100% - 300px)") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 300; + if (!width) { + width = 600 + } + $("#post-box").css("width", width + "px") $("#suggest").html(""); if (!localStorage.getItem("emoji_" + acct_id)) { var html = @@ -23,9 +30,16 @@ function emojiToggle(reaction) { } } else { $("#poll").addClass("hide") + $("#right-side").hide() + $("#right-side").css("width", "300px") $("#emoji").addClass("hide") $("#suggest").html(""); - $("#right-side").hide() + $("#left-side").css("width","100%") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1; + if (!width) { + width = 300 + } + $("#post-box").css("width", width + "px") } diff --git a/app/js/post/suggest.js b/app/js/post/suggest.js index a58a9dd6..a829f890 100644 --- a/app/js/post/suggest.js +++ b/app/js/post/suggest.js @@ -18,6 +18,13 @@ input.addEventListener("focus", function () { $("#suggest").html(""); if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { $("#right-side").hide() + $("#right-side").css("width", "300px") + $("#left-side").css("width", "100%") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1; + if (!width) { + width = 300 + } + $("#post-box").css("width", width + "px") } return; } @@ -42,11 +49,25 @@ input.addEventListener("focus", function () { } if (ehtml != "") { $("#right-side").show() + $("#right-side").css("width", "200px") + $("#left-side").css("width", "calc(100% - 200px)") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200; + if (!width) { + width = 600 + } + $("#post-box").css("width", width + "px") $("#poll").addClass("hide") $("#emoji").addClass("hide") } else { if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { $("#right-side").hide() + $("#right-side").css("width", "300px") + $("#left-side").css("width", "100%") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1; + if (!width) { + width = 300 + } + $("#post-box").css("width", width + "px") } } $("#suggest").html(ehtml); @@ -62,6 +83,13 @@ input.addEventListener("focus", function () { $("#suggest").html(""); if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { $("#right-side").hide() + $("#right-side").css("width", "300px") + $("#left-side").css("width", "100%") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1; + if (!width) { + width = 300 + } + $("#post-box").css("width", width + "px") } return; } @@ -119,6 +147,13 @@ input.addEventListener("focus", function () { }); $("#suggest").html(ins); $("#right-side").show() + $("#right-side").css("width", "200px") + $("#left-side").css("width", "calc(100% - 200px)") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200; + if (!width) { + width = 600 + } + $("#post-box").css("width", width + "px") $("#poll").addClass("hide") $("#emoji").addClass("hide") } @@ -132,12 +167,26 @@ input.addEventListener("focus", function () { } }); $("#right-side").show() + $("#right-side").css("width", "200px") + $("#left-side").css("width", "calc(100% - 200px)") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200; + if (!width) { + width = 600 + } + $("#post-box").css("width", width + "px") $("#suggest").html(accts); $("#poll").addClass("hide") $("#emoji").addClass("hide") } else { if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { $("#right-side").hide() + $("#right-side").css("width", "300px") + $("#left-side").css("width", "100%") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1; + if (!width) { + width = 300 + } + $("#post-box").css("width", width + "px") } } }); @@ -172,6 +221,13 @@ function tagInsert(code, del) { $("#textarea").focus(); if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { $("#right-side").hide() + $("#right-side").css("width", "300px") + $("#left-side").css("width", "50%") + var width = localStorage.getItem("postbox-width").replace("px", "") * 1; + if (!width) { + width = 300 + } + $("#post-box").css("width", width + "px") } $("#suggest").html(""); } diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index c08a3240..550cf074 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -1039,7 +1039,7 @@ function userparse(obj, auth, acct_id, tlid, popup) { toot.acct + locked + '' + '' + '' + - '