From 53d3464e054b40a52469d6a6ccccd5cfd08bcd20 Mon Sep 17 00:00:00 2001 From: Mike Mhlv Date: Thu, 10 Jul 2025 10:37:56 +0100 Subject: [PATCH 1/8] JS-7329: wip --- src/json/relation.ts | 3 ++- src/json/text.json | 4 +++- src/ts/app.tsx | 2 +- src/ts/component/list/objectManager.tsx | 15 ++++++++++++++- src/ts/component/menu/syncStatus.tsx | 4 ++-- .../page/main/settings/space/storage.tsx | 13 +++++++++++-- src/ts/interface/syncStatus.ts | 1 + 7 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/json/relation.ts b/src/json/relation.ts index 941d84bf39..3cacfd4a6d 100644 --- a/src/json/relation.ts +++ b/src/json/relation.ts @@ -176,7 +176,8 @@ export default { syncStatus: [ 'syncStatus', 'syncDate', - 'syncError' + 'syncError', + 'fileSyncStatus' ], pageCover: 'pageCover', diff --git a/src/json/text.json b/src/json/text.json index bf12048c8d..b343ec9783 100644 --- a/src/json/text.json +++ b/src/json/text.json @@ -219,6 +219,8 @@ "commonUnmute": "Unmute", "commonDropFiles": "Drag and drop your files here", "commonObjectEmpty": "It's empty here.", + "commonSynced": "Synced", + "commonNotSynced": "Not synced", "pluralDay": "day|days", "pluralObject": "Object|Objects", @@ -898,6 +900,7 @@ "popupSettingsSpaceIndexManageSpaceTitle": "Space Preferences", "popupSettingsSpaceIndexRemoteStorageUpgrade": "✦ Upgrade", "popupSettingsSpaceIndexStorageText": "You can store up to %s of your files on our encrypted backup node for free. If you reach the limit, files will be stored only locally.", + "popupSettingsSpaceIndexStorageIsFullText": "Some files couldn't be synced because your storage is full. Upgrade your plan or remove files to free up space.", "popupSettingsSpaceIndexStorageManageFiles": "Manage files", "popupSettingsSpaceIndexHomepageDescription": "Select an Object to show when you login", "popupSettingsSpaceIndexImport": "Import to Space", @@ -1816,7 +1819,6 @@ "menuSyncStatusInfoNetworkMessageOffline": "No connection", "menuSyncStatusInfoSelfTitle": "Self Host", - "menuSyncStatusInfoSelfMessageSynced": "Synced", "menuSyncStatusInfoSelfMessageSyncing": "Syncing...", "menuSyncStatusInfoSelfMessageError": "Error", "menuSyncStatusInfoLocalOnlyTitle": "Local Only", diff --git a/src/ts/app.tsx b/src/ts/app.tsx index d024b3468f..e33b04088f 100644 --- a/src/ts/app.tsx +++ b/src/ts/app.tsx @@ -630,4 +630,4 @@ const App: FC = () => { }; -export default App; \ No newline at end of file +export default App; diff --git a/src/ts/component/list/objectManager.tsx b/src/ts/component/list/objectManager.tsx index 14b21444db..ad0d8ade69 100644 --- a/src/ts/component/list/objectManager.tsx +++ b/src/ts/component/list/objectManager.tsx @@ -14,8 +14,10 @@ interface Props { textEmpty?: string; filters?: I.Filter[]; sorts?: I.Sort[]; + keys?: string[]; rowHeight?: number; sources?: string[]; + segments?: any[]; collectionId?: string; isReadonly?: boolean; ignoreArchived?: boolean; @@ -74,8 +76,10 @@ const ObjectManager = observer(forwardRef(({ textEmpty = '', filters = [], sorts = [], + keys = [], rowHeight = 0, sources = [], + segments = [], collectionId = '', isReadonly = false, ignoreArchived = true, @@ -103,6 +107,10 @@ const ObjectManager = observer(forwardRef(({ const records = S.Record.getRecords(subId); const scrollContainer = scrollElement || isPopup ? $('#popupPage-innerWrap').get(0) : window; + + + console.log('RECORDS: ', records) + const onFilterShow = () => { $(filterWrapperRef.current).addClass('active'); filterRef.current.focus(); @@ -203,6 +211,7 @@ const ObjectManager = observer(forwardRef(({ U.Subscription.subscribe({ subId, sorts, + keys, filters: fl, ignoreArchived, ignoreHidden, @@ -241,6 +250,10 @@ const ObjectManager = observer(forwardRef(({ return ret.filter(it => it.children.length > 0); }; + const getSections = () => { + + }; + const getFilterValue = () => { return String(filterRef.current?.getValue() || ''); }; @@ -482,4 +495,4 @@ const ObjectManager = observer(forwardRef(({ ); })); -export default ObjectManager; \ No newline at end of file +export default ObjectManager; diff --git a/src/ts/component/menu/syncStatus.tsx b/src/ts/component/menu/syncStatus.tsx index 4b0e7c90fb..d8eb170d65 100644 --- a/src/ts/component/menu/syncStatus.tsx +++ b/src/ts/component/menu/syncStatus.tsx @@ -426,7 +426,7 @@ const MenuSyncStatus = observer(class MenuSyncStatus extends React.Component { const object: any = S.Common.spaceStorage.spaces.find(it => it.spaceId == space.targetSpaceId) || {}; @@ -44,13 +46,18 @@ const PageMainSettingsStorageManager = observer(class PageMainSettingsStorageMan if (isRed) { usageCn.push('red'); buttonUpgrade =