mirror of
https://github.com/wekan/wekan.git
synced 2026-03-01 19:30:15 +01:00
Reverted New UI Design of WeKan v8.29 and added more fixes and performance improvements.
Thanks to xet7 !
This commit is contained in:
parent
d152d8fc1b
commit
1b8b8d2eef
196 changed files with 17659 additions and 10028 deletions
|
|
@ -5,7 +5,9 @@
|
|||
*/
|
||||
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { AttachmentMigrationStatus } from '/imports/attachmentMigrationClient';
|
||||
|
||||
// Reactive variables for attachment migration progress
|
||||
export const attachmentMigrationProgress = new ReactiveVar(0);
|
||||
|
|
@ -37,8 +39,8 @@ class AttachmentMigrationManager {
|
|||
if (!attachment) return false;
|
||||
|
||||
// Check if attachment has old structure (no meta field or missing required fields)
|
||||
return !attachment.meta ||
|
||||
!attachment.meta.cardId ||
|
||||
return !attachment.meta ||
|
||||
!attachment.meta.cardId ||
|
||||
!attachment.meta.boardId ||
|
||||
!attachment.meta.listId;
|
||||
} catch (error) {
|
||||
|
|
@ -224,6 +226,41 @@ class AttachmentMigrationManager {
|
|||
|
||||
export const attachmentMigrationManager = new AttachmentMigrationManager();
|
||||
|
||||
// Setup pub/sub for attachment migration status
|
||||
if (Meteor.isClient) {
|
||||
// Subscribe to all attachment migration statuses when component is active
|
||||
// This will be called by board components when they need migration status
|
||||
window.subscribeToAttachmentMigrationStatus = function(boardId) {
|
||||
return Meteor.subscribe('attachmentMigrationStatus', boardId);
|
||||
};
|
||||
|
||||
// Reactive tracking of migration status from published collection
|
||||
Tracker.autorun(() => {
|
||||
const statuses = AttachmentMigrationStatus.find({}).fetch();
|
||||
|
||||
statuses.forEach(status => {
|
||||
if (status.isMigrated) {
|
||||
globalMigratedBoards.add(status.boardId);
|
||||
attachmentMigrationManager.migratedBoards.add(status.boardId);
|
||||
}
|
||||
});
|
||||
|
||||
// Update UI reactive variables based on active migration
|
||||
const activeMigration = AttachmentMigrationStatus.findOne({
|
||||
status: { $in: ['migrating', 'pending'] }
|
||||
});
|
||||
|
||||
if (activeMigration) {
|
||||
isMigratingAttachments.set(true);
|
||||
attachmentMigrationProgress.set(activeMigration.progress || 0);
|
||||
attachmentMigrationStatus.set(activeMigration.status || '');
|
||||
} else {
|
||||
isMigratingAttachments.set(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue