From cef01dffafb373fdee343522a5af1c68f06a5c16 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 11 Sep 2026 17:32:31 -0400 Subject: [PATCH] =?UTF-8?q?fix(cloudflare):=20prevent=20Rocket=20Loader=20?= =?UTF-8?q?from=20deferring=20Alpine's=20inline=20alpine:init=20listeners?= =?UTF-8?q?=20(data-cfasync=3Dfalse=20on=20all=20Alpine-critical=20script?= =?UTF-8?q?=20blocks)=20=E2=80=94=20fixes=20partial=20page=20load=20on=20m?= =?UTF-8?q?obile=20behind=20Cloudflare?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/_page_editor_scripts.html | 23 +++++++++++++---------- app/templates/base.html | 6 +++--- app/templates/library.html | 2 +- app/templates/local_workspace.html | 2 +- app/templates/welcome.html | 2 +- flowdeck.db | Bin 598016 -> 598016 bytes 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/templates/_page_editor_scripts.html b/app/templates/_page_editor_scripts.html index c63b95c..6abd147 100644 --- a/app/templates/_page_editor_scripts.html +++ b/app/templates/_page_editor_scripts.html @@ -440,19 +440,11 @@ } var url=b.src||'';if(url){ var src=url; - try{var h=window.location.href.split('/').slice(0,3).join('/');var urlNoProto=url.replace(/^https?:\\/\\//,'');if(/^(youtube\\.com|youtu\\.be|vimeo\\.com|loom\\.com|figma\\.com|google\\.com\\/maps|codepen\\.io|miro\\.com|open\\.spotify\\.com|soundcloud\\.com|twitch\\.tv|twitter\\.com|x\\.com|pinterest\\.)/.test(urlNoProto.split('/')[0])){src=url;}}catch(e){} + try{var h=window.location.href.split('/').slice(0,3).join('/');var urlNoProto=url.replace(/^https?:\/\//,'');if(/^(youtube\.com|youtu\.be|vimeo\.com|loom\.com|figma\.com|google\.com\/maps|codepen\.io|miro\.com|open\.spotify\.com|soundcloud\.com|twitch\.tv|twitter\.com|x\.com|pinterest\.)/.test(urlNoProto.split('/')[0])){src=url;}}catch(e){} var height=b.height||520; return `
`; } return `
๐Ÿ”—
Click to add embed URL
`; - } - if(b.embed_type==='inline_dbs')return `
๐Ÿ“Š Inline Databases
`; - if(b.embed_type==='collection')return `
Loading database...
<`+`script>setTimeout(function(){var el=document.getElementById('inline-db-${b.collection_id}');if(el&&window.FlowDeckDB)window.FlowDeckDB.renderInto(el,${b.collection_id},null);},50);<`+`/script>
`; - if(b.embed_type==='pdf')return `

Failed to load PDF

Open in new tab โ†’
`; - if(b.embed_type==='download'){ - var sz=b.file_size||0;var szStr=sz<1024?sz+' B':sz<1048576?(sz/1024).toFixed(1)+' KB':(sz/1048576).toFixed(1)+' MB'; - return `
{{ fd_icon("paperclip",14) }}
${esc(b.file_name||'File')}
${szStr} ยท ${esc(b.file_mime||'')}
โฌ‡ Download
`; - } } const ph=b.type==='heading_1'?'Heading 1':b.type==='heading_2'?'Heading 2':b.type==='heading_3'?'Heading 3':b.type==='heading_4'?'Heading 4':b.type==='bulleted_list'?'List':b.type==='numbered_list'?'List':b.type==='to_do'?'To-do':b.type==='toggle'?'Toggle list':b.type==='quote'?'Empty quote':b.type==='code'?'Type code...':b.type==='callout'?'Type something...':(b.type==='paragraph'&&!b.content?'Press \'space\' for AI or \'/\' for commands':'Press \'/\' for commands...'); let inner=''; @@ -898,6 +890,18 @@ _commentSel:{range:null,bid:null,start:0,end:0}, _notifiedMentions:{}, undoStack:[],redoStack:[],_histCap:100,_histLock:false, + // โ”€โ”€ Cover & icon (v5.10+) โ”€โ”€ + coverUrl:'', + iconOpen:false, + iconValue:'', + // โ”€โ”€ Import โ”€โ”€ + importOpen:false,importText:'',importFile:null, + // โ”€โ”€ DB Templates โ”€โ”€ + dbTplOpen:false,dbTplLoading:false,dbTemplates:[], + // โ”€โ”€ Version history โ”€โ”€ + versionsOpen:false,versionsLoading:false,versionsList:[], + // โ”€โ”€ Backlinks โ”€โ”€ + backlinksOpen:false,backlinksLoading:false,backlinksList:[], get timeAgo() { if (!this.updatedAt) return 'just now'; var diff = Math.floor((Date.now() - new Date(this.updatedAt + 'Z').getTime()) / 1000); @@ -1117,7 +1121,6 @@ replaceBlock(idx,type){const b=this.blocks[idx];if(!b)return;this.sync();this.pu }, // โ”€โ”€ v5.5.0: Cover & Icon โ”€โ”€ - coverOpen:false,coverUrl:'',coverLoading:false,iconOpen:false,iconValue:'', async loadCoverIcon(){ try{ const r=await fetch('/board/api/pages/'+this.pid); diff --git a/app/templates/base.html b/app/templates/base.html index 059cd07..6d3a934 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -100,7 +100,7 @@ body.embed-mode .page-cover-area { padding-top: 0 !important; } - + @@ -710,7 +710,7 @@ - +