bug fixes and added BTC address of uploader
This commit is contained in:
parent
50083bfe65
commit
adfeecb610
12
css/main.css
12
css/main.css
@ -250,6 +250,10 @@ ul {
|
||||
grid-auto-flow: column;
|
||||
}
|
||||
|
||||
.gap-0-3 {
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.gap-0-5 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
@ -601,13 +605,13 @@ theme-toggle {
|
||||
}
|
||||
.torrent-card__tags, .torrent-card__uploader {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(var(--text-color), 0.7);
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
.torrent-card__uploader {
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
line-height: 1.5;
|
||||
margin-top: auto;
|
||||
padding-top: 0.5rem;
|
||||
font-size: 0.7rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.torrent-card__download-button {
|
||||
background-color: rgba(var(--text-color), 0.1);
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -215,6 +215,9 @@ ul {
|
||||
.flow-column {
|
||||
grid-auto-flow: column;
|
||||
}
|
||||
.gap-0-3 {
|
||||
gap: 0.3rem;
|
||||
}
|
||||
.gap-0-5 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
@ -526,13 +529,14 @@ theme-toggle {
|
||||
&__tags,
|
||||
&__uploader {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(var(--text-color), 0.7);
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
&__uploader {
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
line-height: 1.5;
|
||||
// line-height: 1.5;
|
||||
margin-top: auto;
|
||||
padding-top: 0.5rem;
|
||||
font-size: 0.7rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
&__download-button {
|
||||
background-color: rgba(var(--text-color), 0.1);
|
||||
|
||||
11
index.html
11
index.html
@ -912,13 +912,18 @@
|
||||
const icon = new DOMParser().parseFromString(getIcon(type), 'image/svg+xml').querySelector('svg')
|
||||
// remove extension from filename
|
||||
filename = filename.split('.').slice(0, -1).join('.')
|
||||
const btcAddress = btcOperator.convert.legacy2bech(uploader)
|
||||
return html`
|
||||
<li id=${id} class="torrent-card">
|
||||
<a class="torrent-info grid" href=${`#/torrent/${id}`}>
|
||||
<div class="torrent-card__icon torrent-type-icon">${icon}</div>
|
||||
<h3 class="torrent-card__title breakable">${filename}</h3>
|
||||
<p class="torrent-card__tags">${tags.replace(/[\/,]/g, ' • ')}</p>
|
||||
<span class="torrent-card__uploader">${`by ${uploader}`}</span>
|
||||
<div class="torrent-card__uploader grid breakable">
|
||||
Uploaded by
|
||||
<span>FLO address: ${uploader}</span>
|
||||
<span>(BTC address: ${btcAddress})</span>
|
||||
</div>
|
||||
</a>
|
||||
<button class="torrent-card__download-button">
|
||||
Get Torrent
|
||||
@ -1176,6 +1181,10 @@
|
||||
}
|
||||
|
||||
async function renderSearchSuggestions(searchKey, advance = false) {
|
||||
if (searchKey.trim() === '') {
|
||||
renderElem(getRef('search_suggestions'), html``)
|
||||
return
|
||||
}
|
||||
const result = await getFilteredTorrents(['name', 'filename'], searchKey, { limit: 6 })
|
||||
const suggestions = result.map(elem => {
|
||||
const regEx = new RegExp(`(${searchKey})`, 'gi')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user