Compare commits

..

3 commits

Author SHA1 Message Date
veselcraft
d631c7f13c
Merge remote-tracking branch 'origin/master' into banned-links-fixed 2025-02-16 16:44:09 +03:00
veselcraft
267918252c
fix(away.php): syntax 2025-02-16 16:43:37 +03:00
ayato
6d721eb8b9
fix(messagebox): make dialogue content scrollable and remove height from dialogue header and action boxes (#1230)
Sometimes dialogue boxes get too long and end up going off the screen, making the content impossible to see. This change fixes that by allowing the dialogue content to scroll. It also removes some height restrictions from the header and action sections since they didn’t seem to serve a clear purpose (to me) and might have been causing layout issues.
2025-02-16 16:21:46 +03:00
3 changed files with 4 additions and 5 deletions

View file

@ -62,10 +62,11 @@ class BannedLinks
public function genEntries($links, $uri): \Traversable public function genEntries($links, $uri): \Traversable
{ {
foreach ($links as $link) { foreach ($links as $link) {
if (preg_match($link->getRegexpRule(), $uri)) { if (preg_match($link->getRegexpRule(), $uri))
yield $link->getId(); yield $link->getId();
else if ($this->isDomainBanned($link->getDomain())) else if ($this->isDomainBanned($link->getDomain()))
yield $link->getId(); yield $link->getId();
}
} }
public function check(string $url): ?array public function check(string $url): ?array

View file

@ -15,8 +15,6 @@ final class AwayPresenter extends OpenVKPresenter
if (OPENVK_ROOT_CONF["openvk"]["preferences"]["susLinks"]["warnings"]) if (OPENVK_ROOT_CONF["openvk"]["preferences"]["susLinks"]["warnings"])
if (sizeof($checkBanEntries) > 0) if (sizeof($checkBanEntries) > 0)
$this->pass("openvk!Away->view", $checkBanEntries[0]); $this->pass("openvk!Away->view", $checkBanEntries[0]);
}
}
header("HTTP/1.0 302 Found"); header("HTTP/1.0 302 Found");
header("X-Robots-Tag: noindex, nofollow, noarchive"); header("X-Robots-Tag: noindex, nofollow, noarchive");

View file

@ -38,7 +38,6 @@ body.dimmed > .dimmer #absolute_territory {
} }
.ovk-diag-head { .ovk-diag-head {
height: 25%;
padding: 5px; padding: 5px;
background-color: #757575; background-color: #757575;
border-bottom: 1px solid #3e3e3e; border-bottom: 1px solid #3e3e3e;
@ -49,11 +48,12 @@ body.dimmed > .dimmer #absolute_territory {
.ovk-diag-body { .ovk-diag-body {
padding: 20px; padding: 20px;
overflow-y: auto;
max-height: 80vh
} }
.ovk-diag-action { .ovk-diag-action {
padding: 10px; padding: 10px;
height: 25%;
background-color: #d4d4d4; background-color: #d4d4d4;
text-align: right; text-align: right;
} }