chore: add changelog entry; replace var with ref (linter)

2448-complete-tags
Flupsi 2025-06-06 21:49:32 +02:00
rodzic 9168016cb8
commit ead964a931
2 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -22,6 +22,10 @@ Bugfixes:
- Fixed database migrations for trackfavorite, playlist and playlisttrack
Other:
- Fixed regressions in Tags selector after removal of jQuery (#2440, #2390)
## 2.0.0-alpha.1 (2025-05-23)
Carefully read [this blog post](https://blog.funkwhale.audio/2025-funkwhale-2-news.html) before upgrading. This alpha release might break your db.

Wyświetl plik

@ -53,16 +53,16 @@ export const useDataStore
}
const tagsCache = ref<Tag[]>([])
var tagsTimestamp = 0
const tagsTimestamp = ref(0)
/**
* @returns an auto-updating reference to all tags or `[]` if either none are loaded yet, or there was an error
*/
const tags = () => {
// Re-fetch if immediate is true or the item is not cached or older than 1 second
if (tagsTimestamp< Date.now() - 1000) {
if (tagsTimestamp.value < Date.now() - 1000) {
axios.get<components['schemas']['PaginatedTagList']>('tags/', { params: { page_size: 10000 } }).then(({ data }) => {
tagsTimestamp = Date.now();
tagsTimestamp.value = Date.now();
tagsCache.value = data.results;
});
}