@@ -59,6 +59,8 @@ import { SizesConflictModal } from "./syncSizesConflictNotice";
59
59
import { publishFiles , unpublishFile } from './exporter'
60
60
import { AssetHandler } from './html-generation/asset-handler' ;
61
61
import { Path } from './utils/path' ;
62
+ import { HTMLGenerator } from './html-generation/html-generator' ;
63
+ import { RenderLog } from './html-generation/render-log' ;
62
64
import icon , { UsingIconNames , getIconSvg , addIconForconflictFile } from './utils/icon' ;
63
65
const { iconNameSyncWait, iconNameSyncPending, iconNameSyncRunning, iconNameLogs, iconNameSyncLogo } = UsingIconNames ;
64
66
@@ -311,6 +313,10 @@ export default class InvioPlugin extends Plugin {
311
313
return ;
312
314
}
313
315
316
+ let allFiles = this . app . vault . getMarkdownFiles ( ) ;
317
+ await HTMLGenerator . beginBatch ( allFiles ) ;
318
+ RenderLog . progress ( 1 , 6 , "Syncing Docs" , "..." , "var(--color-accent)" ) ;
319
+
314
320
// The operations above are almost read only and kind of safe.
315
321
// The operations below begins to write or delete (!!!) something.
316
322
await insertSyncPlanRecordByVault ( this . db , plan , this . vaultRandomID ) ;
@@ -352,6 +358,7 @@ export default class InvioPlugin extends Plugin {
352
358
self . setCurrSyncMsg ( i , totalCount , pathName , decision ) ;
353
359
354
360
log . info ( 'syncing ' , pathName , decision ) ;
361
+ RenderLog . progress ( i , totalCount , "Syncing Docs" , "Syncing: " + pathName , "var(--color-accent)" ) ;
355
362
if ( touchedFileMap ?. pathName ) {
356
363
touchedFileMap . pathName . syncStatus = 'syncing' ;
357
364
}
@@ -393,7 +400,7 @@ export default class InvioPlugin extends Plugin {
393
400
394
401
const basePath = new Path ( this . settings . localWatchDir ) ;
395
402
// get files to export
396
- let allFiles = this . app . vault . getMarkdownFiles ( ) ;
403
+ // let allFiles = this.app.vault.getMarkdownFiles();
397
404
// if we are at the root path export all files, otherwise only export files in the folder we are exporting
398
405
allFiles = allFiles . filter ( ( file : TFile ) => new Path ( file . path ) . directory . asString . startsWith ( basePath . asString ) && ( file . extension === "md" ) && ( ! file . name . endsWith ( '.conflict.md' ) ) ) ;
399
406
await publishFiles ( client , this . app . vault , pubPathList , allFiles , '' , this . settings , triggerSource , ( pathName : string , status : string ) => {
0 commit comments