-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Show when Subscriptions / Trending / Most Popular were last updated #4380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
FreeTubeBot
merged 28 commits into
FreeTubeApp:development
from
kommunarr:feat/refresh-button-timestamp
Apr 17, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
da0634c
Implement first draft of last subscription refresh timestamp
kommunarr 3817153
Update styling to be a top bar
kommunarr f943715
Update styling to be banner-compatible, & increase banner X button si…
kommunarr 1b0eca8
Update subscription refresh timestamp to be relative
kommunarr 76adc81
Implement refresh timestamps for Shorts, Live, and Community tabs
kommunarr 9c7ebbe
Extract refresh widget to its own component
kommunarr 9c9ccae
Add Trending and Popular refresh widgets with timestamps
kommunarr e12bea9
Fix justifying when no timestamp exists
kommunarr 15a739b
Move timestamps to utils store
kommunarr 1831912
Remove unneeded ref classes and currentLocale computed property
kommunarr c55eebe
Add page-specific titles for each feed type
kommunarr 366ecec
Implement showing least recent cache date per profile
kommunarr 518f7d5
Update styling property placement & match top nav box shadow on ft-re…
kommunarr efd2498
Implement showing timestamp for profile only if all channel subscript…
kommunarr 92837fc
Disable refresh button instead of removing it or the widget from the DOM
kommunarr 39ff1e9
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr 4be85b1
Merge branch 'development' into feat/refresh-button-timestamp
kommunarr 3beee11
Increase top banner's top margin
kommunarr cdcf425
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr c9125b6
Update channel caching calls to provide timestamps
kommunarr a4d9e6f
Modify updateCacheByChannel functions to have default timestamp of ne…
kommunarr 08b532f
Fix 30-day month relative date calculation scenarios through new opti…
kommunarr f7652b5
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr 9bf8108
Rectify Case 3 (see https://github.com/FreeTubeApp/FreeTube/pull/3668)
kommunarr 2feb50c
Add back missing line in Popular.js
kommunarr 88f996f
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr 3c33c3f
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr 608651c
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/renderer/components/ft-refresh-widget/ft-refresh-widget.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| .floatingRefreshSection { | ||
| position: fixed; | ||
| inset-block-start: 60px; | ||
| inset-inline-end: 0; | ||
| box-sizing: border-box; | ||
| inline-size: calc(100% - 80px); | ||
| padding-block: 5px; | ||
| padding-inline: 10px; | ||
| box-shadow: 0 2px 1px 0 var(--primary-shadow-color); | ||
| background-color: var(--card-bg-color); | ||
| border-inline-start: 2px solid var(--primary-color); | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 5px; | ||
| justify-content: flex-end; | ||
| } | ||
|
|
||
| .floatingRefreshSection:has(.lastRefreshTimestamp + .refreshButton) { | ||
| justify-content: space-between; | ||
| } | ||
|
|
||
| .floatingRefreshSection.sideNavOpen { | ||
| inline-size: calc(100% - 200px); | ||
| } | ||
|
|
||
| .lastRefreshTimestamp { | ||
| margin-block: 0; | ||
| text-align: center; | ||
| font-size: 16px; | ||
| } | ||
|
|
||
| @media only screen and (width <= 680px) { | ||
| .floatingRefreshSection, .floatingRefreshSection.sideNavOpen { | ||
| inline-size: 100%; | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
src/renderer/components/ft-refresh-widget/ft-refresh-widget.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { defineComponent } from 'vue' | ||
|
|
||
| import FtIconButton from '../ft-icon-button/ft-icon-button.vue' | ||
|
|
||
| export default defineComponent({ | ||
| name: 'FtRefreshWidget', | ||
| components: { | ||
| 'ft-icon-button': FtIconButton, | ||
| }, | ||
| props: { | ||
| disableRefresh: { | ||
| type: Boolean, | ||
| default: false | ||
| }, | ||
| lastRefreshTimestamp: { | ||
| type: String, | ||
| default: '' | ||
| }, | ||
| title: { | ||
| type: String, | ||
| required: true | ||
| } | ||
| }, | ||
| computed: { | ||
| isSideNavOpen: function () { | ||
| return this.$store.getters.getIsSideNavOpen | ||
| } | ||
| } | ||
| }) |
27 changes: 27 additions & 0 deletions
27
src/renderer/components/ft-refresh-widget/ft-refresh-widget.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <template> | ||
| <div | ||
| class="floatingRefreshSection" | ||
| :class="{ | ||
| sideNavOpen: isSideNavOpen | ||
| }" | ||
| > | ||
| <p | ||
| v-if="lastRefreshTimestamp" | ||
| class="lastRefreshTimestamp" | ||
| > | ||
| {{ $t('Feed.Feed Last Updated', { feedName: title, date: lastRefreshTimestamp }) }} | ||
| </p> | ||
| <ft-icon-button | ||
| :disabled="disableRefresh" | ||
| :icon="['fas', 'sync']" | ||
| class="refreshButton" | ||
| :title="$t('Feed.Refresh Feed', { subscriptionName: title })" | ||
| :size="12" | ||
| theme="primary" | ||
| @click="$emit('click')" | ||
| /> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script src="./ft-refresh-widget.js" /> | ||
| <style scoped src="./ft-refresh-widget.css" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: To more explicitly clarify what I would believe to be the logical behavior here, I think we should have this if statement condition be modified to be
!this.updateFetchSubscriptionsAutomatically || this.postCacheForAllActiveProfileChannelsPresent. And that I revert my last commit to move the minTimestamp logic outside of this if-statement as was before, as this case would no longer exist as is.