Frontend for the Tophhie Cloud block page for Cloudflare Zero Trust.

Updated texts

tophhie.cloud 9005619e 2176f96c

verified
+17 -2
+2
README.md
··· 42 static readonly CONTACT_WEB: string = "https://support.tophhie.cloud"; 43 static readonly BLOCKED_HEADER: string = "Access restricted!"; 44 static readonly BLOCKED_TEXT: string = "Access to this website is restricted. Use the contact button below to request access."; 45 static readonly CONTACT_BUTTON_TXT: string = "Request access"; 46 } 47 ``` ··· 81 VITE_CONTACT_WEB=https://support.tophhie.cloud 82 VITE_BLOCKED_HEADER=Access restricted! 83 VITE_BLOCKED_TEXT=Access to this website is restricted. Use the contact button below to request access. 84 VITE_CONTACT_BUTTON_TXT=Request access 85 ``` 86
··· 42 static readonly CONTACT_WEB: string = "https://support.tophhie.cloud"; 43 static readonly BLOCKED_HEADER: string = "Access restricted!"; 44 static readonly BLOCKED_TEXT: string = "Access to this website is restricted. Use the contact button below to request access."; 45 + static readonly BLOCKED_TEXT_NOMETA: string = "Access to this website is restricted." 46 static readonly CONTACT_BUTTON_TXT: string = "Request access"; 47 } 48 ``` ··· 82 VITE_CONTACT_WEB=https://support.tophhie.cloud 83 VITE_BLOCKED_HEADER=Access restricted! 84 VITE_BLOCKED_TEXT=Access to this website is restricted. Use the contact button below to request access. 85 + VITE_BLOCKED_TEXT_NOMETA=Access to this website is restricted. 86 VITE_CONTACT_BUTTON_TXT=Request access 87 ``` 88
+6 -1
src/config.ts
··· 15 static readonly BLOCKED_HEADER: string = "Access restricted!"; 16 17 /** 18 - * Block page detail text 19 */ 20 static readonly BLOCKED_TEXT: string = "Access to this website has been restricted. Use the contact button below to request access."; 21 22 /** 23 * Contact email button text
··· 15 static readonly BLOCKED_HEADER: string = "Access restricted!"; 16 17 /** 18 + * Block page detail text (if Cloudflare metadata is provided) 19 */ 20 static readonly BLOCKED_TEXT: string = "Access to this website has been restricted. Use the contact button below to request access."; 21 + 22 + /** 23 + * Block page detail text (if no Cloudflare metadata is provided) 24 + */ 25 + static readonly BLOCKED_TEXT_NOMETA = "Access has been restricted. No website information has been supplied."; 26 27 /** 28 * Contact email button text
+9 -1
src/routes/+page.svelte
··· 50 showAddInfo = !showAddInfo 51 } 52 53 54 function sendBlockedRequestEmail(): void { 55 const subject = "Cloudflare Zero Trust - Blocked Request"; ··· 106 </div> 107 {/if} 108 <p> 109 {Config.BLOCKED_TEXT} 110 </p> 111 - {#if rows.length > 0 && rows.some(([label]) => label != "Date/Time")} 112 <button class="block w-full px-3 py-1.5 text-sm text-gray-700 rounded transition-colors" style="cursor: pointer;" onclick={showAdditionalInfo}> 113 {detailButtonTxt} 114 </button>
··· 50 showAddInfo = !showAddInfo 51 } 52 53 + function metadataAvailable(): boolean { 54 + return rows.length > 0 && rows.some(([label]) => label != "Date/Time") 55 + } 56 + 57 58 function sendBlockedRequestEmail(): void { 59 const subject = "Cloudflare Zero Trust - Blocked Request"; ··· 110 </div> 111 {/if} 112 <p> 113 + {#if metadataAvailable()} 114 {Config.BLOCKED_TEXT} 115 + {:else} 116 + {Config.BLOCKED_TEXT_NOMETA} 117 + {/if} 118 </p> 119 + {#if metadataAvailable()} 120 <button class="block w-full px-3 py-1.5 text-sm text-gray-700 rounded transition-colors" style="cursor: pointer;" onclick={showAdditionalInfo}> 121 {detailButtonTxt} 122 </button>