mirror of
https://github.com/openvk/openvk
synced 2024-11-14 19:19:14 +03:00
fix(feed_settings): make settings layout better
This commit is contained in:
parent
56a26109f2
commit
1cf1fd37f5
1 changed files with 42 additions and 18 deletions
|
@ -86,23 +86,44 @@ u(document).on('click', '#__feed_settings_link', (e) => {
|
||||||
const CURRENT_RETURN_BANNED = Number(__temp_url.searchParams.get('return_banned') ?? 0)
|
const CURRENT_RETURN_BANNED = Number(__temp_url.searchParams.get('return_banned') ?? 0)
|
||||||
const COUNT = [1, 5, 10, 20, 30, 40, 50]
|
const COUNT = [1, 5, 10, 20, 30, 40, 50]
|
||||||
u('#_feed_settings_container #__content').html(`
|
u('#_feed_settings_container #__content').html(`
|
||||||
<div class='settings_item'>
|
<table cellspacing="7" cellpadding="0" border="0" align="center">
|
||||||
${tr('posts_per_page')}:
|
<tbody>
|
||||||
<select id="pageSelect"></select>
|
<tr>
|
||||||
</div>
|
<td width="120" valign="top">
|
||||||
<div class='settings_item'>
|
<span class="nobold">${tr('posts_per_page')}</span>
|
||||||
${tr('start_from_page')}
|
</td>
|
||||||
<input type='number' min='1' max='${PAGES_COUNT}' id='pageNumber' value='${CURRENT_PAGE}' placeholder='${CURRENT_PAGE}'>
|
<td>
|
||||||
</div>
|
<select id="pageSelect"></select>
|
||||||
<div class='settings_item'>
|
</td>
|
||||||
<label>
|
</tr>
|
||||||
<input type='checkbox' id="showIgnored" ${CURRENT_RETURN_BANNED == 1 ? 'checked' : ''}>
|
<tr>
|
||||||
${tr('show_ignored_sources')}
|
<td width="120" valign="top">
|
||||||
</label>
|
<span class="nobold">${tr('start_from_page')}</span>
|
||||||
</div>
|
</td>
|
||||||
<div class='final_settings_item'>
|
<td>
|
||||||
<input class='button' type='button' value='${tr('apply')}'>
|
<input type='number' min='1' max='${PAGES_COUNT}' id='pageNumber' value='${CURRENT_PAGE}' placeholder='${CURRENT_PAGE}'>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="120" valign="top">
|
||||||
|
<span class="nobold">
|
||||||
|
<input type='checkbox' id="showIgnored" ${CURRENT_RETURN_BANNED == 1 ? 'checked' : ''}>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
${tr('show_ignored_sources')}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="120" valign="top">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input class='button' type='button' value='${tr('apply')}'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
`)
|
`)
|
||||||
|
|
||||||
u('#_feed_settings_container').on('click', '.final_settings_item input', (e) => {
|
u('#_feed_settings_container').on('click', '.final_settings_item input', (e) => {
|
||||||
|
@ -161,7 +182,10 @@ u(document).on('click', '#__feed_settings_link', (e) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window.openvk.ignored_list.response.items.length < 1) {
|
if(window.openvk.ignored_list.response.items.length < 1) {
|
||||||
u('#_feed_settings_container #__content').html(tr('no_ignores_count'))
|
u('#_feed_settings_container #__content').html(`
|
||||||
|
<div class="information">
|
||||||
|
${tr('no_ignores_count')}
|
||||||
|
</div>`)
|
||||||
u('#_remove_ignores').remove()
|
u('#_remove_ignores').remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue