mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
parent
ca8d9efcfd
commit
00fcc881ee
@ -8,12 +8,12 @@ function showModal(encodedPath, pages, percentage, encodedeTitle, encodedEntryTi
|
||||
if (percentage === 0) {
|
||||
$('#continue-btn').attr('hidden', '');
|
||||
$('#unread-btn').attr('hidden', '');
|
||||
} else if (percentage === 100) {
|
||||
$('#read-btn').attr('hidden', '');
|
||||
$('#continue-btn').attr('hidden', '');
|
||||
} else {
|
||||
$('#continue-btn').text('Continue from ' + percentage + '%');
|
||||
}
|
||||
if (percentage === 100) {
|
||||
$('#read-btn').attr('hidden', '');
|
||||
}
|
||||
|
||||
$('#modal-title-link').text(title);
|
||||
$('#modal-title-link').attr('href', `${base_url}book/${titleID}`);
|
||||
|
@ -15,6 +15,9 @@ class ReaderRouter < Router
|
||||
# might not have actually read them
|
||||
page = [page - 2 * IMGS_PER_PAGE, 1].max
|
||||
|
||||
# start from page 1 if the user has finished reading the entry
|
||||
page = 1 if entry.finished? username
|
||||
|
||||
redirect env, "/reader/#{title.id}/#{entry.id}/#{page}"
|
||||
rescue e
|
||||
@context.error e
|
||||
|
Loading…
x
Reference in New Issue
Block a user