@crowdin/app-project-module 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/index.js +4 -1
- package/out/middlewares/auto-credentials-masker.js +4 -1
- package/out/modules/integration/handlers/sync-settings-save.js +5 -2
- package/out/modules/integration/util/cron.js +16 -5
- package/out/static/ui/form.bundle.js +46368 -0
- package/out/static/ui/form.bundle.js.map +1 -0
- package/out/static/ui/main.bundle.js +9 -2
- package/out/static/ui/main.bundle.js.map +1 -1
- package/out/util/credentials-masker.d.ts +5 -1
- package/out/util/credentials-masker.js +2 -2
- package/out/views/FormPage.js +1 -1
- package/package.json +2 -7
- package/out/static/js/form.js +0 -106
|
@@ -1697,11 +1697,17 @@
|
|
|
1697
1697
|
const allFolderFiles = scheduleModal.querySelector('#all-folder-files').checked || false;
|
|
1698
1698
|
const type = scheduleModal.getAttribute('data-type');
|
|
1699
1699
|
if (type === 'crowdin') {
|
|
1700
|
+
const crowdinFiles = await appComponent.current.getCrowdinFilesData();
|
|
1701
|
+
const syncedFileIds = Object.keys(syncData.current);
|
|
1702
|
+
const crowdinFolderIds = crowdinFiles
|
|
1703
|
+
.filter((file) => file.node_type === folderType || file.node_type === branchType)
|
|
1704
|
+
.filter((file) => syncedFileIds.includes(String(file.id)))
|
|
1705
|
+
.map((file) => String(file.id));
|
|
1700
1706
|
appComponent.current.setCrowdinScheduleSync(syncData.current, newFile, selectedFiles);
|
|
1701
1707
|
appComponent.current.setCrowdinFilesHasSyncOption(true);
|
|
1702
1708
|
const syncedFiles = await appComponent.current.getCrowdinScheduleSync(true);
|
|
1703
1709
|
appComponent.current.setAttribute('is-crowdin-sync-settings-in-progress', true);
|
|
1704
|
-
updateSyncSettings(syncedFiles, 'schedule', 'crowdin');
|
|
1710
|
+
updateSyncSettings(syncedFiles, 'schedule', 'crowdin', [], crowdinFolderIds);
|
|
1705
1711
|
}
|
|
1706
1712
|
else if (type === 'integration') {
|
|
1707
1713
|
if (syncNewElements === null || syncNewElements === void 0 ? void 0 : syncNewElements.integration) {
|
|
@@ -1928,7 +1934,7 @@
|
|
|
1928
1934
|
}
|
|
1929
1935
|
updateSyncSettings(syncedFiles, 'schedule', 'crowdin');
|
|
1930
1936
|
}
|
|
1931
|
-
function updateSyncSettings(files, type, provider, expandIntegrationFolders = []) {
|
|
1937
|
+
function updateSyncSettings(files, type, provider, expandIntegrationFolders = [], folderIds = []) {
|
|
1932
1938
|
checkOrigin()
|
|
1933
1939
|
.then((restParams) => fetch('api/sync-settings' + restParams, {
|
|
1934
1940
|
method: 'POST',
|
|
@@ -1939,6 +1945,7 @@
|
|
|
1939
1945
|
provider,
|
|
1940
1946
|
expandIntegrationFolders,
|
|
1941
1947
|
hasLoadMoreElements: hasLoadMoreElements.current,
|
|
1948
|
+
folderIds,
|
|
1942
1949
|
}),
|
|
1943
1950
|
}))
|
|
1944
1951
|
.then(checkResponse)
|