"No subject" -> #${postId} in several places, much nicer idea

merge-requests/341/head
Thomas Lynch 2 years ago
parent 6c8a5e7bdb
commit 0c531867f7
  1. 2
      gulp/res/js/filters.js
  2. 2
      gulp/res/js/watchlist.js
  3. 2
      views/mixins/catalogtile.pug
  4. 2
      views/mixins/watchedthread.pug

@ -267,7 +267,7 @@ const postMenuChange = function() {
return moderatePost(postContainer);
case 'watch': {
const postMessage = postContainer.querySelector('.post-message');
const watcherSubject = (postDataset.subject || (postMessage && postMessage.textContent) || 'No subject').substring(0, 25);
const watcherSubject = (postDataset.subject || (postMessage && postMessage.textContent) || `#${postDataset.postId}`).substring(0, 25);
threadWatcher.add(postDataset.board, postDataset.postId, { subject: watcherSubject, unread: 0, updatedDate: new Date() });
return;
}

@ -64,7 +64,7 @@ class ThreadWatcher {
if (json && json.replies) {
const newData = {
...data,
subject: (json.subject || json.nomarkup || 'No subject').substring(0, 25),
subject: (json.subject || json.nomarkup || `#${json.postId}`).substring(0, 25),
};
const updatedDate = new Date(data.updatedDate);
const newPosts = json.replies.filter(r => new Date(r.date) > updatedDate);

@ -36,7 +36,7 @@ mixin catalogtile(post, index, overboard=false)
else
span(class=`flag flag-${post.country.code.toLowerCase()}` title=post.country.name alt=post.country.name)
|
a.no-decoration.post-subject(href=postURL) #{post.subject || 'No subject'}
a.no-decoration.post-subject(href=postURL) #{post.subject || `#${post.postId}`}
|
select.jsonly.postmenu
option(value='single') Hide

@ -2,5 +2,5 @@ mixin watchedthread(thread)
.row.watched-thread(data-id=`${thread.board}-${thread.postId}` data-unread=(thread.unread||null))
a.close ×
- const watchedThreadLink = `/${thread.board}/thread/${thread.postId}.html`;
a(class=(thread.isCurrentThread ? 'bold' : '') href=watchedThreadLink) /#{thread.board}/ - #{thread.subject || 'No subject'}
a(class=(thread.isCurrentThread ? 'bold' : '') href=watchedThreadLink) /#{thread.board}/ - #{thread.subject || `#${thread.postId}`}
a.ml-a(href=`${watchedThreadLink}#bottom`) [▼]

Loading…
Cancel
Save