mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Compare commits
11 commits
5c7eb50a2a
...
a1b4f9fd4b
Author | SHA1 | Date | |
---|---|---|---|
|
a1b4f9fd4b | ||
|
65ea49e4a9 | ||
|
a350ff870a | ||
|
32fb69da5f | ||
|
b011fe51e4 | ||
|
1cb5b68136 | ||
|
216312e58d | ||
|
a4d5bb8088 | ||
|
c4fec2bf97 | ||
|
389f0b4bb4 | ||
|
8fc47ff6cd |
31 changed files with 289 additions and 99 deletions
|
@ -22,15 +22,10 @@ final class NotesPresenter extends OpenVKPresenter
|
|||
if(!$user->getPrivacyPermission('notes.read', $this->user->identity ?? NULL))
|
||||
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
||||
|
||||
$this->template->notes = $this->notes->getUserNotes($user, (int)($this->queryParam("p") ?? 1));
|
||||
$this->template->page = (int)($this->queryParam("p") ?? 1);
|
||||
$this->template->notes = $this->notes->getUserNotes($user, $this->template->page);
|
||||
$this->template->count = $this->notes->getUserNotesCount($user);
|
||||
$this->template->owner = $user;
|
||||
$this->template->paginatorConf = (object) [
|
||||
"count" => $this->template->count,
|
||||
"page" => $this->queryParam("p") ?? 1,
|
||||
"amount" => NULL,
|
||||
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
||||
];
|
||||
}
|
||||
|
||||
function renderView(int $owner, int $note_id): void
|
||||
|
|
|
@ -125,5 +125,6 @@ final class SearchPresenter extends OpenVKPresenter
|
|||
];
|
||||
$this->template->extendedPaginatorConf = clone $this->template->paginatorConf;
|
||||
$this->template->extendedPaginatorConf->space = 11;
|
||||
$this->template->paginatorConf->atTop = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,14 @@
|
|||
{/if}
|
||||
|
||||
<div class="toTop">
|
||||
⬆ {_to_top}
|
||||
<div id='to_up'>
|
||||
<svg id="to_up_icon" viewBox="0 0 10 6"><polygon points="0 6 5 0 10 6 0 6"/></svg>
|
||||
<span>{_to_top}</span>
|
||||
</div>
|
||||
|
||||
<div id='to_back'>
|
||||
<svg id="to_back_icon" viewBox="0 0 10 6"><polygon points="0 0 5 6 10 0 0 0"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layout">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
{ifset specpage}
|
||||
{include specpage, x => $dat}
|
||||
{else}
|
||||
<div class="container_gray">
|
||||
<div class="container_gray {ifset noscroll}no_scroll_container{else}scroll_container{/ifset}">
|
||||
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
|
||||
|
||||
{ifset top}
|
||||
|
@ -27,7 +27,7 @@
|
|||
{/ifset}
|
||||
|
||||
{if sizeof($data) > 0}
|
||||
<div class="content" n:foreach="$data as $dat">
|
||||
<div class="scroll_node content" n:foreach="$data as $dat">
|
||||
<table>
|
||||
<tbody n:attr="id => is_null($table_body_id) ? NULL : $table_body_id">
|
||||
<tr>
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
<div n:if="$audiosCount <= 0" style='height: 50%;'>
|
||||
{include "../components/content_error.xml", description => $ownerId > 0 ? ($ownerId == $thisUser->getId() ? tr("no_audios_thisuser") : tr("no_audios_user")) : tr("no_audios_club")}
|
||||
</div>
|
||||
<div n:if="$audiosCount > 0" class="infContainer">
|
||||
<div class="infObj" n:foreach="$audios as $audio">
|
||||
<div n:if="$audiosCount > 0" class="scroll_container infContainer">
|
||||
<div class="scroll_node infObj" n:foreach="$audios as $audio">
|
||||
{include "player.xml", audio => $audio, club => $club}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -86,10 +86,10 @@
|
|||
{include "../components/content_error.xml", description => $ownerId > 0 ? ($ownerId == $thisUser->getId() ? tr("no_playlists_thisuser") : tr("no_playlists_user")) : tr("no_playlists_club")}
|
||||
</div>
|
||||
|
||||
<div class="infContainer playlistContainer" n:if="$playlistsCount > 0">
|
||||
{foreach $playlists as $playlist}
|
||||
<div class="scroll_container infContainer playlistContainer" n:if="$playlistsCount > 0">
|
||||
<div class='scroll_node' n:foreach='$playlists as $playlist'>
|
||||
{include 'playlistListView.xml', playlist => $playlist}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
@ -67,11 +67,11 @@
|
|||
<hr style="color: #f7f7f7;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="audiosContainer infContainer" style="margin-top: 14px;">
|
||||
<div class="audiosContainer scroll_container infContainer" style="margin-top: 14px;">
|
||||
{if $count < 1}
|
||||
{_empty_playlist}
|
||||
{else}
|
||||
<div class="infObj" n:foreach="$audios as $audio">
|
||||
<div class="scroll_node" n:foreach="$audios as $audio">
|
||||
{include "player.xml", audio => $audio}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
{/block}
|
||||
|
||||
{block content}
|
||||
<div class="gift_grid">
|
||||
<div n:foreach="$gifts as $gift" n:class="gift_sel, !$gift->canUse($thisUser) ? disabled" data-gift="{$gift->getId()}">
|
||||
<div class="gift_grid scroll_container">
|
||||
<div n:foreach="$gifts as $gift" n:class="scroll_node, gift_sel, !$gift->canUse($thisUser) ? disabled" data-gift="{$gift->getId()}">
|
||||
<img class="gift_pic" src="{$gift->getImage(2)}" alt="{_gift}" loading=lazy />
|
||||
|
||||
<strong class="gift_price">
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
{include "../components/error.xml", title => "", description => $type == "my" ? tr("no_suggested_posts_by_you") : tr("no_suggested_posts_by_people")}
|
||||
{else}
|
||||
<h4 id="cound">{if $type == "my"}{tr("suggested_posts_in_group_by_you", $count)}{else}{tr("suggested_posts_in_group", $count)}{/if}</h4>
|
||||
<div id="postz" class="infContainer">
|
||||
<div id="postz" class="infContainer scroll_container">
|
||||
{var $microblog = $thisUser->hasMicroblogEnabled()}
|
||||
<div class="infObj" n:foreach="$posts as $post">
|
||||
<div class="infObj scroll_node" n:foreach="$posts as $post">
|
||||
{if $microblog}
|
||||
{include "../components/post/microblogpost.xml", post => $post, commentSection => false, suggestion => true, forceNoCommentsLink => true, forceNoPinLink => true, forceNoLike => true, forceNoShareLink => true, forceNoDeleteLink => false}
|
||||
{else}
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
</div>
|
||||
|
||||
{if sizeof($corresps) > 0}
|
||||
<div class="crp-list">
|
||||
<div class="crp-list scroll_container">
|
||||
<div n:foreach="$corresps as $coresp"
|
||||
class="crp-entry"
|
||||
class="scroll_node crp-entry"
|
||||
onmousedown="window.location.href = {$coresp->getURL()};" >
|
||||
{var $recipient = $coresp->getCorrespondents()[1]}
|
||||
{var $lastMsg = $coresp->getPreviewMessage()}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{extends "../@listView.xml"}
|
||||
{var $iterator = iterator_to_array($notes)}
|
||||
{var $page = $paginatorConf->page}
|
||||
|
||||
{block title}{_notes}{/block}
|
||||
|
||||
|
@ -60,12 +59,12 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<div class="container_gray" style="background: white; border-top: none;">
|
||||
<div class="container_gray scroll_container" style="background: white; border-top: none;">
|
||||
|
||||
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
|
||||
{if sizeof($data) > 0}
|
||||
|
||||
<div n:foreach="$data as $dat">
|
||||
<div class='scroll_node' n:foreach="$data as $dat">
|
||||
<div class="profile_thumb">
|
||||
<a href="{$owner->getURL()}">
|
||||
<img src="{$owner->getAvatarUrl('miniscule')}" style="width: 50px;">
|
||||
|
@ -106,7 +105,15 @@
|
|||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
|
||||
{include "../components/paginator.xml", conf => (object) [
|
||||
"page" => $page,
|
||||
"count" => $count,
|
||||
"amount" => sizeof($data),
|
||||
"perPage" => 10,
|
||||
"atBottom" => true,
|
||||
]}
|
||||
|
||||
{else}
|
||||
{if isset($thisUser) && $thisUser->getId() == $owner->getId()}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
</div>
|
||||
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
|
||||
{if sizeof($data) > 0}
|
||||
<div>
|
||||
<table class="post post-divider" border="0" style="font-size: 11px;" n:foreach="$data as $dat">
|
||||
<div n:class="$mode !== 'new' ? scroll_container">
|
||||
<table class="scroll_node post post-divider" border="0" style="font-size: 11px;" n:foreach="$data as $dat">
|
||||
<tbody>
|
||||
<tr>
|
||||
{var $sxModel = $dat->getModel(1)}
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
{/if}
|
||||
<br/><br/>
|
||||
{if $album->getPhotosCount() > 0}
|
||||
<div class="container_gray album-flex">
|
||||
<div class="container_gray scroll_container album-flex">
|
||||
{foreach $photos as $photo}
|
||||
{php if($photo->isDeleted()) continue; }
|
||||
<div class="album-photo">
|
||||
<div class="album-photo scroll_node">
|
||||
<a
|
||||
n:if="!is_null($thisUser) && $album->canBeModifiedBy($thisUser)"
|
||||
href="/album{$album->getPrettyId()}/remove_photo/{$photo->getId()}" class="album-photo--delete">
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
</div>
|
||||
|
||||
<div class='page_wrap_content' id='search_page'>
|
||||
<div n:class='page_wrap_content_main, $section == "audios" && $count > 0 ? audios_padding'>
|
||||
<div n:class='page_wrap_content_main, $section != "posts" ? scroll_container, $section == "audios" && $count > 0 ? audios_padding'>
|
||||
{if $count > 0}
|
||||
{if $section === 'users'}
|
||||
<div class='search_content content def_row_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content content def_row_content' n:foreach="$data as $dat">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -125,10 +125,14 @@
|
|||
</div>
|
||||
|
||||
<script n:if='$count > 0 && !empty($query)'>
|
||||
highlightText({$query}, '.page_wrap_content_main', ['text'])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', ['text'])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{elseif $section === 'groups'}
|
||||
<div class='search_content content def_row_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content content def_row_content' n:foreach="$data as $dat">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -180,10 +184,14 @@
|
|||
</div>
|
||||
|
||||
<script n:if='$count > 0 && !empty($query)'>
|
||||
highlightText({$query}, '.page_wrap_content_main', ['text', "td[data-highlight='_clubDesc']"])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', ['text', "td[data-highlight='_clubDesc']"])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{elseif $section === 'apps'}
|
||||
<div class='search_content content def_row_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content content def_row_content' n:foreach="$data as $dat">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -210,10 +218,14 @@
|
|||
</div>
|
||||
|
||||
<script n:if='$count > 0 && !empty($query)'>
|
||||
highlightText({$query}, '.page_wrap_content_main', ['text', "span[data-highlight='_appDesc']"])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', ['text', "span[data-highlight='_appDesc']"])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{elseif $section === 'posts'}
|
||||
<div class='search_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content' n:foreach="$data as $dat">
|
||||
{if !$dat || $dat->getWallOwner()->isHideFromGlobalFeedEnabled()}
|
||||
{_closed_group_post}.
|
||||
{else}
|
||||
|
@ -222,31 +234,47 @@
|
|||
</div>
|
||||
|
||||
<script n:if='$count > 0 && !empty($query)'>
|
||||
highlightText({$query}, '.page_wrap_content_main', [".post:not(.comment) > tbody > tr > td > .post-content > .text .really_text"])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', [".post:not(.comment) > tbody > tr > td > .post-content > .text .really_text"])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{elseif $section === 'videos'}
|
||||
<div class='search_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content' n:foreach="$data as $dat">
|
||||
{include "../components/video.xml", video => $dat}
|
||||
</div>
|
||||
|
||||
<script n:if='$count > 0 && !empty($query)'>
|
||||
highlightText({$query}, '.page_wrap_content_main', [".video_name", ".video_description"])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', [".video_name", ".video_description"])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{elseif $section === 'audios'}
|
||||
<div class='search_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content' n:foreach="$data as $dat">
|
||||
{include "../Audio/player.xml", audio => $dat}
|
||||
</div>
|
||||
|
||||
<script n:if="$count > 0 && !empty($query) && empty($_REQUEST['only_performers'])">
|
||||
highlightText({$query}, '.page_wrap_content_main', [".mediaInfo .performer a", ".mediaInfo .title"])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', [".mediaInfo .performer a", ".mediaInfo .title"])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{elseif $section === 'audios_playlists'}
|
||||
<div class='search_content' n:foreach="$data as $dat">
|
||||
<div class='scroll_node search_content' n:foreach="$data as $dat">
|
||||
{include "../Audio/playlistListView.xml", playlist => $dat}
|
||||
</div>
|
||||
|
||||
<script n:if="$count > 0 && !empty($query) && empty($_REQUEST['only_performers'])">
|
||||
highlightText({$query}, '.page_wrap_content_main', [".playlistName", ".playlistDesc"])
|
||||
function __scrollHook(page) {
|
||||
highlightText({$query}, '.page_wrap_content_main', [".playlistName", ".playlistDesc"])
|
||||
}
|
||||
|
||||
__scrollHook()
|
||||
</script>
|
||||
{/if}
|
||||
{else}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{var $iterator = $user->getClubs($page, $admin)}
|
||||
{var $count = $user->getClubCount($admin)}
|
||||
|
||||
{block noscroll}{/block}
|
||||
{block title}
|
||||
{_groups}
|
||||
{/block}
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
</div>
|
||||
|
||||
{if sizeof($comments) > 0}
|
||||
{foreach $comments as $comment}
|
||||
{include "comment.xml", comment => $comment}
|
||||
{/foreach}
|
||||
<div class='scroll_container'>
|
||||
<div class='scroll_node' n:foreach="$comments as $comment">
|
||||
{include "comment.xml", comment => $comment}
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 11px;">
|
||||
{include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{var $pageCount = ceil($conf->count / $conf->perPage)}
|
||||
|
||||
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage)" n:attr="style => (!$conf->tidy ? 'padding: 8px;')">
|
||||
<div n:class="paginator, ($conf->atBottom ?? false) ? paginator-at-bottom, ($conf->tidy ? 'tidy')">
|
||||
<div n:class="paginator, (($conf->atTop || $atTop) ?? false) ? paginator-at-top, ($conf->atBottom ?? false) ? paginator-at-bottom, ($conf->tidy ? 'tidy')">
|
||||
<a n:if="$conf->page > $space" n:attr="class => ($conf->page === 1 ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => 1]), 'k', '&', PHP_QUERY_RFC3986)}">«</a>
|
||||
{for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++}
|
||||
<a n:if="$j > 0 && $j <= $pageCount" n:attr="class => ($conf->page === $j ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => $j]), 'k', '&', PHP_QUERY_RFC3986)}">{$j}</a>
|
||||
|
|
|
@ -1391,7 +1391,7 @@ textarea {
|
|||
|
||||
.toTop {
|
||||
position: fixed;
|
||||
padding: 20px;
|
||||
padding: 12px;
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
background-color: #f3f3f3;
|
||||
|
@ -1401,9 +1401,34 @@ textarea {
|
|||
opacity: 0;
|
||||
transition: .1s all;
|
||||
z-index: 129;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
body.scrolled .toTop:hover {
|
||||
.toTop > div svg {
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
width: 8px;
|
||||
height: 7px;
|
||||
fill: #3f3f3f;
|
||||
}
|
||||
|
||||
.toTop > div span {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.toTop.has_down #to_up, .toTop #to_back {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toTop.has_down #to_back {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.toTop.has_down {
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
body.scrolled .toTop:hover, .toTop.has_down:hover {
|
||||
opacity: .5;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1,4 +1,4 @@
|
|||
u(".comment-reply").on("click", function(e) {
|
||||
u(document).on("click", ".comment-reply", function(e) {
|
||||
let comment = u(e.target).closest(".post");
|
||||
let authorId = comment.data("owner-id");
|
||||
let authorNm = u(".post-author > a > b", comment.first()).text().trim();
|
||||
|
|
|
@ -641,6 +641,35 @@ class bigPlayer {
|
|||
duration: this.tracks["currentTrack"].length
|
||||
})
|
||||
}
|
||||
|
||||
loadContextPage(page, lesser = false) {
|
||||
const formdata = new FormData()
|
||||
formdata.append("context", this.context["context_type"])
|
||||
formdata.append("context_entity", this.context["context_id"])
|
||||
formdata.append("hash", u("meta[name=csrf]").attr("value"))
|
||||
formdata.append("page", page)
|
||||
|
||||
ky.post("/audios/context", {
|
||||
hooks: {
|
||||
afterResponse: [
|
||||
async (_request, _options, response) => {
|
||||
const newArr = await response.json()
|
||||
|
||||
if(lesser)
|
||||
this.tracks["tracks"] = newArr["items"].concat(this.tracks["tracks"])
|
||||
else
|
||||
this.tracks["tracks"] = this.tracks["tracks"].concat(newArr["items"])
|
||||
|
||||
this.context["playedPages"].push(String(newArr["page"]))
|
||||
|
||||
this.updateButtons()
|
||||
console.info("Loaded context for page " + page)
|
||||
}
|
||||
]
|
||||
},
|
||||
body: formdata
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
|
|
@ -201,7 +201,7 @@ $(document).on("click", ".sugglist a", (e) => {
|
|||
})
|
||||
|
||||
// нажатие на пагинатор у постов предложки
|
||||
$(document).on("click", "#postz .paginator a", (e) => {
|
||||
/*$(document).on("click", "#postz .paginator a", (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
ky(e.currentTarget.href, {
|
||||
|
@ -228,4 +228,4 @@ $(document).on("click", "#postz .paginator a", (e) => {
|
|||
]
|
||||
}
|
||||
})
|
||||
})
|
||||
})*/
|
||||
|
|
|
@ -1644,6 +1644,79 @@ $(document).on("click", ".avatarDelete", (e) => {
|
|||
]);
|
||||
})
|
||||
|
||||
async function __processPaginatorNextPage(page)
|
||||
{
|
||||
const container = u('.scroll_container')
|
||||
const container_node = '.scroll_node'
|
||||
const parser = new DOMParser
|
||||
|
||||
const replace_url = new URL(location.href)
|
||||
replace_url.searchParams.set('p', page)
|
||||
|
||||
const new_content = await fetch(replace_url.href)
|
||||
const new_content_response = await new_content.text()
|
||||
const parsed_content = parser.parseFromString(new_content_response, 'text/html')
|
||||
|
||||
const nodes = parsed_content.querySelectorAll(container_node)
|
||||
nodes.forEach(node => {
|
||||
container.append(node)
|
||||
})
|
||||
|
||||
u(`.paginator:not(.paginator-at-top)`).html(parsed_content.querySelector('.paginator:not(.paginator-at-top)').innerHTML)
|
||||
// fffffuck
|
||||
if(u(`.paginator:not(.paginator-at-top)`).nodes[0].closest('.scroll_container')) {
|
||||
container.nodes[0].append(u(`.paginator:not(.paginator-at-top)`).nodes[0].parentNode)
|
||||
}
|
||||
|
||||
if(window.player) {
|
||||
window.player.loadContextPage(page)
|
||||
}
|
||||
|
||||
if(typeof __scrollHook != 'undefined') {
|
||||
__scrollHook(page)
|
||||
}
|
||||
}
|
||||
|
||||
const showMoreObserver = new IntersectionObserver(entries => {
|
||||
entries.forEach(async x => {
|
||||
if(x.isIntersecting) {
|
||||
if(u('.scroll_container').length < 1) {
|
||||
return
|
||||
}
|
||||
|
||||
const target = u(x.target)
|
||||
if(target.length < 1 || target.hasClass('paginator-at-top')) {
|
||||
return
|
||||
}
|
||||
|
||||
const current_url = new URL(location.href)
|
||||
if(current_url.searchParams && !isNaN(parseInt(current_url.searchParams.get('p')))) {
|
||||
return
|
||||
}
|
||||
|
||||
target.addClass('lagged')
|
||||
const active_tab = target.find('.active')
|
||||
const next_page = u(active_tab.nodes[0] ? active_tab.nodes[0].nextElementSibling : null)
|
||||
if(next_page.length < 1) {
|
||||
u('.paginator:not(.paginator-at-top)').removeClass('lagged')
|
||||
return
|
||||
}
|
||||
|
||||
const page_number = Number(next_page.html())
|
||||
await __processPaginatorNextPage(page_number)
|
||||
u('.paginator:not(.paginator-at-top)').removeClass('lagged')
|
||||
}
|
||||
})
|
||||
}, {
|
||||
root: null,
|
||||
rootMargin: '0px',
|
||||
threshold: 0,
|
||||
})
|
||||
|
||||
if(u('.paginator:not(.paginator-at-top)').length > 0) {
|
||||
showMoreObserver.observe(u('.paginator:not(.paginator-at-top)').nodes[0])
|
||||
}
|
||||
|
||||
u(document).on('click', '#__sourceAttacher', (e) => {
|
||||
MessageBox(tr('add_source'), `
|
||||
<div id='source_flex_kunteynir'>
|
||||
|
|
|
@ -90,7 +90,7 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
|
|||
});
|
||||
/* @rem-pai why this func wasn't named as "#_deleteDialog"? It looks universal IMO */
|
||||
|
||||
u("#_noteDelete").on("click", function(e) {
|
||||
u(document).on("click", "#_noteDelete", function(e) {
|
||||
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
|
||||
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
|
||||
formHtml += "</form>";
|
||||
|
@ -167,7 +167,7 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
|
|||
return false;
|
||||
});
|
||||
|
||||
u("#_submitUserSubscriptionAction").handle("submit", async function(e) {
|
||||
u(document).handle("submit", "#_submitUserSubscriptionAction", async function(e) {
|
||||
u(this).nodes[0].parentElement.classList.add('loading');
|
||||
u(this).nodes[0].parentElement.classList.add('disable');
|
||||
console.log(e.target);
|
||||
|
@ -518,7 +518,7 @@ function highlightText(searchText, container_selector, selectors = []) {
|
|||
node.parentNode.insertBefore(tempDiv.firstChild, node)
|
||||
}
|
||||
node.parentNode.removeChild(node)
|
||||
} else if(node.nodeType === 1 && node.tagName !== 'SCRIPT' && node.tagName !== 'BR' && node.tagName !== 'STYLE') {
|
||||
} else if(node.nodeType === 1 && node.tagName !== 'SCRIPT' && node.tagName !== 'BR' && node.tagName !== 'STYLE' && !node.classList.contains('highlight')) {
|
||||
Array.from(node.childNodes).forEach(highlightNode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,35 @@
|
|||
window.addEventListener("scroll", function(e) {
|
||||
if(window.scrollY < 100) {
|
||||
if(window.temp_y_scroll) {
|
||||
u('.toTop').addClass('has_down')
|
||||
}
|
||||
document.body.classList.toggle("scrolled", false);
|
||||
} else {
|
||||
document.body.classList.toggle("scrolled", true);
|
||||
u('.toTop').removeClass('has_down')
|
||||
}
|
||||
});
|
||||
|
||||
u(".toTop").on("click", function(e) {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth"
|
||||
});
|
||||
});
|
||||
const y_scroll = window.scrollY
|
||||
const scroll_margin = 20
|
||||
|
||||
if(y_scroll > 100) {
|
||||
window.temp_y_scroll = y_scroll
|
||||
window.scrollTo(0, scroll_margin)
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth"
|
||||
})
|
||||
} else {
|
||||
if(window.temp_y_scroll) {
|
||||
window.scrollTo(0, window.temp_y_scroll - scroll_margin)
|
||||
window.scrollTo({
|
||||
top: window.temp_y_scroll,
|
||||
behavior: "smooth"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
u(document).trigger('scroll')
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ docker build -t ghcr.io/openvk/openvk/php:8.2-apache ../../.. -f base-php-apache
|
|||
DB images:
|
||||
```
|
||||
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-primary ../../.. -f mariadb-primary.Dockerfile
|
||||
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb ../../.. --f mariadb-eventdb.Dockerfile
|
||||
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb ../../.. -f mariadb-eventdb.Dockerfile
|
||||
```
|
||||
OpenVK main image:
|
||||
```
|
||||
|
|
|
@ -2082,7 +2082,7 @@
|
|||
"showing_x_y" = "(showing $1—$2)";
|
||||
"no_results_by_this_query" = "Nothing was found by this query.";
|
||||
"s_additional" = "Additional";
|
||||
"s_it_is_you" = "it is you";
|
||||
"s_it_is_you" = "that's you";
|
||||
|
||||
/* BadBrowser */
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ list:
|
|||
flag: "ua"
|
||||
name: "Ukrainian"
|
||||
native_name: "Українcька"
|
||||
author: "Aqukie (yaroslav.bielograd@ukr.net), Andrej Lenťaj, Maxim Hrabovi (dechioyo) and Kirill (mbsoft)"
|
||||
author: "Jaroslav (ovk.to/id6908), Andrej Lenťaj, Maxim Hrabovi (dechioyo) and Kirill (mbsoft)"
|
||||
- code: "by"
|
||||
flag: "by"
|
||||
name: "Belarussian"
|
||||
|
|
|
@ -315,7 +315,7 @@
|
|||
"group_managers" = "Керівництво";
|
||||
"group_type" = "Тип спільноти";
|
||||
"group_type_open" = "Це відкрита спільнота. В неї може вступити будь-хто охочий.";
|
||||
"group_type_closed" = "Це закрита спільноа. Для вступу необхідно подати заявку.";
|
||||
"group_type_closed" = "Це закрита спільнота. Для вступу необхідно подати заявку.";
|
||||
"creator" = "Автор";
|
||||
"administrators" = "Адміністратори";
|
||||
"add_to_left_menu" = "Додати до лівого меню";
|
||||
|
@ -343,14 +343,14 @@
|
|||
"suggest_new" = "Запропонувати новину";
|
||||
"suggested_by_you_zero" = "$1 запропонованих вами дописів";
|
||||
"suggested_by_you_one" = "Один запропонований вами допис";
|
||||
"suggested_by_you_few" = $1 запропоновані вами дописи”;
|
||||
"suggested_by_you_many" = "$1 запропонованих вами дописів”;
|
||||
"suggested_by_you_other" = "$1 запропонованих вами дописів”;
|
||||
"suggested_by_everyone_zero" = "$1 запропонованих дописів”;
|
||||
"suggested_by_everyone_one" = "Один запропонований допис”;
|
||||
"suggested_by_everyone_few" = "$1 запропоновані дописи”;
|
||||
"suggested_by_everyone_many" = "$1 запропонованих дописів”;
|
||||
"suggested_by_everyone_other" = "$1 запропонованих дописів”;
|
||||
"suggested_by_you_few" = "$1 запропоновані вами дописи";
|
||||
"suggested_by_you_many" = "$1 запропонованих вами дописів";
|
||||
"suggested_by_you_other" = "$1 запропонованих вами дописів";
|
||||
"suggested_by_everyone_zero" = "$1 запропонованих дописів";
|
||||
"suggested_by_everyone_one" = "Один запропонований допис";
|
||||
"suggested_by_everyone_few" = "$1 запропоновані дописи";
|
||||
"suggested_by_everyone_many" = "$1 запропонованих дописів";
|
||||
"suggested_by_everyone_other" = "$1 запропонованих дописів";
|
||||
"group_hide_from_global_feed" = "Не відображати дописи в глобальній стрічці";
|
||||
"suggested_posts_by_you" = "Запропоновані вами дописи";
|
||||
"suggested_posts_by_everyone" = "Запропоновані дописи";
|
||||
|
@ -455,7 +455,7 @@
|
|||
"webcam_avatar" = "Якщо ваш комп'ютер має камерою, Ви можете <a id='_takeSelfie'>зробити миттєву фотографію</a>";
|
||||
"publish_on_wall" = "Опублікувати допис на стіні";
|
||||
"take_snapshot" = "Зробити знімок";
|
||||
"your_browser_doesnt_support_webcam" = "Ваш браузер не підтримує знімання відео з камери."
|
||||
"your_browser_doesnt_support_webcam" = "Ваш браузер не підтримує знімання відео з камери.";
|
||||
"selected_area_user" = "Обрана область буде відображатися на вашій сторінці.";
|
||||
"selected_area_club" = "Обрана область буде показуватися на сторінці спільноти.";
|
||||
"selected_area_rotate" = "Якщо орієнтація зображення неправильна, фотографію можна повернути.";
|
||||
|
@ -1363,7 +1363,7 @@
|
|||
|
||||
"invalid_club" = "Ця спільнота не існує.";
|
||||
"invalid_user" = "Цього користувача не існує.";
|
||||
"ignored_sources_limit" = "Перевищено ліміт ігнорованих джерел.";
|
||||
"ignored_sources_limit" = "Досягнуто ліміт ігнорованих джерел.";
|
||||
|
||||
"invalid_audio" = "Пошкоджене аудіо.";
|
||||
"do_not_have_audio" = "У вас немає цього аудіо";
|
||||
|
@ -1439,6 +1439,8 @@
|
|||
"error_max_pinned_clubs" = "Знаходитись у лівому меню можуть максимум 10 спільнот";
|
||||
"error_viewing_subs" = "Ви не можете переглядати лист підписок $1.";
|
||||
"error_status_too_long" = "Статус надто довгий ($1 символів замість 255 символів)";
|
||||
"death" = "Смерть...";
|
||||
"nehay" = "Нехай живе";
|
||||
"user_successfully_banned" = "Користувача успішно заблоковано.";
|
||||
|
||||
"content_is_deleted" = "Коментар видалено, а користувач отримав попередження.";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.page_header {
|
||||
background-image: url('/themepack/midnight/0.0.3.0/resource/xheader.png') !important;
|
||||
background-image: url('/themepack/midnight/0.0.3.1/resource/xheader.png') !important;
|
||||
}
|
||||
|
||||
.page_custom_header {
|
||||
background-image: url('/themepack/midnight/0.0.3.0/resource/xheader_custom.png') !important;
|
||||
background-image: url('/themepack/midnight/0.0.3.1/resource/xheader_custom.png') !important;
|
||||
}
|
||||
|
|
|
@ -186,8 +186,12 @@ hr {
|
|||
.menu_divider,
|
||||
.ovk-diag-action,
|
||||
.minilink .counter,
|
||||
.topGrayBlock {
|
||||
background-color: #2c2640;
|
||||
.topGrayBlock,
|
||||
.showMore,
|
||||
.showMoreAudiosPlaylist,
|
||||
#showMorePhotos,
|
||||
#showMoreVideos {
|
||||
background-color: #2c2640 !important;
|
||||
}
|
||||
|
||||
.bsdn_contextMenu {
|
||||
|
@ -313,11 +317,11 @@ tr.v,
|
|||
}
|
||||
|
||||
.content_title_expanded {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/flex_arrow_open.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/flex_arrow_open.png") !important;
|
||||
}
|
||||
|
||||
.content_title_unexpanded {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/flex_arrow_shut.gif") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/flex_arrow_shut.gif") !important;
|
||||
}
|
||||
|
||||
.ovk-video>.preview,
|
||||
|
@ -344,17 +348,17 @@ tr.h {
|
|||
|
||||
.page_yellowheader {
|
||||
color: #c6d2e8;
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/header_purple.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/header_purple.png") !important;
|
||||
background-color: #231f34;
|
||||
border-color: #231f34;
|
||||
}
|
||||
|
||||
.page_header {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/header.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/header.png") !important;
|
||||
}
|
||||
|
||||
.page_custom_header {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/header_custom.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/header_custom.png") !important;
|
||||
}
|
||||
|
||||
.page_yellowheader span,
|
||||
|
@ -392,11 +396,11 @@ select,
|
|||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/checkbox.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/checkbox.png") !important;
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/radio.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/radio.png") !important;
|
||||
}
|
||||
|
||||
.header_navigation .link, .header_navigation .header_divider_stick {
|
||||
|
@ -404,20 +408,20 @@ input[type="radio"] {
|
|||
}
|
||||
|
||||
.heart {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/like.gif") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/like.gif") !important;
|
||||
}
|
||||
|
||||
.pinned-mark,
|
||||
.post-author .pin {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/pin.png") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/pin.png") !important;
|
||||
}
|
||||
|
||||
.repost-icon {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/published.gif") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/published.gif") !important;
|
||||
}
|
||||
|
||||
.post-author .delete {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/input_clear.gif") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/input_clear.gif") !important;
|
||||
}
|
||||
|
||||
.user-alert {
|
||||
|
@ -450,7 +454,7 @@ input[type="radio"] {
|
|||
}
|
||||
|
||||
#backdropEditor {
|
||||
background-image: url("/themepack/midnight/0.0.3.0/resource/backdrop-editor.gif") !important;
|
||||
background-image: url("/themepack/midnight/0.0.3.1/resource/backdrop-editor.gif") !important;
|
||||
border-color: #473e66 !important;
|
||||
}
|
||||
|
||||
|
@ -588,11 +592,6 @@ ul {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.showMore,
|
||||
.showMoreAudiosPlaylist {
|
||||
background: #181826 !important;
|
||||
}
|
||||
|
||||
/* Tour */
|
||||
.rightNav h1 {
|
||||
background: #000;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
id: midnight
|
||||
version: "0.0.3.0"
|
||||
version: "0.0.3.1"
|
||||
openvk_version: 0
|
||||
enabled: 1
|
||||
metadata:
|
||||
|
|
Loading…
Reference in a new issue