[PR #477] [MERGED] feat: pages support Cloudflare Zero Trust #587

Closed
opened 2026-02-26 21:31:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/477
Author: @dreamhunter2333
Created: 11/8/2024
Status: Merged
Merged: 11/11/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • fcc09c8 feat: pages support Cloudflare Zero Trust

📊 Changes

4 files changed (+6 additions, -2 deletions)

View changed files

📝 frontend/package.json (+1 -0)
📝 frontend/src/main.js (+3 -1)
📝 frontend/vite.config.js (+1 -1)
📝 vitepress-docs/docs/zh/guide/cli/pages.md (+1 -0)

📄 Description

User description

#465


PR Type

Enhancement, Documentation


Description

  • Added a condition in frontend/src/main.js to disable PWA registration based on the VITE_PWA_DISABLED environment variable.
  • Modified the PWA registration type in frontend/vite.config.js to be conditional based on the VITE_PWA_DISABLED environment variable.
  • Added a new script build:pages:nopwa in frontend/package.json to build pages without PWA.
  • Updated documentation in vitepress-docs/docs/zh/guide/cli/pages.md to include instructions for building pages without PWA for Cloudflare Zero Trust.

Changes walkthrough 📝

Relevant files
Enhancement
main.js
Conditional PWA registration based on environment variable

frontend/src/main.js

  • Added a condition to disable PWA registration based on environment
    variable.
  • +3/-1     
    vite.config.js
    Conditional PWA registration type in Vite configuration   

    frontend/vite.config.js

    • Modified PWA registration type based on environment variable.
    +1/-1     
    package.json
    New build script for pages without PWA                                     

    frontend/package.json

    • Added a new script to build pages without PWA.
    +1/-0     
    Documentation
    pages.md
    Documentation for building pages without PWA                         

    vitepress-docs/docs/zh/guide/cli/pages.md

  • Added documentation for building pages without PWA for Cloudflare Zero
    Trust.
  • +1/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/477 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 11/8/2024 **Status:** ✅ Merged **Merged:** 11/11/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`fcc09c8`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/fcc09c855ac94b224500b6dd63eef412e1606f9b) feat: pages support Cloudflare Zero Trust ### 📊 Changes **4 files changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/package.json` (+1 -0) 📝 `frontend/src/main.js` (+3 -1) 📝 `frontend/vite.config.js` (+1 -1) 📝 `vitepress-docs/docs/zh/guide/cli/pages.md` (+1 -0) </details> ### 📄 Description ### **User description** #465 ___ ### **PR Type** Enhancement, Documentation ___ ### **Description** - Added a condition in `frontend/src/main.js` to disable PWA registration based on the `VITE_PWA_DISABLED` environment variable. - Modified the PWA registration type in `frontend/vite.config.js` to be conditional based on the `VITE_PWA_DISABLED` environment variable. - Added a new script `build:pages:nopwa` in `frontend/package.json` to build pages without PWA. - Updated documentation in `vitepress-docs/docs/zh/guide/cli/pages.md` to include instructions for building pages without PWA for Cloudflare Zero Trust. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>main.js</strong><dd><code>Conditional PWA registration based on environment variable</code></dd></summary> <hr> frontend/src/main.js <li>Added a condition to disable PWA registration based on environment <br>variable.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/477/files#diff-2f46f8a9c2b03069ecfe187fdaec0f865901d86ba8426dda8b437788b10e8ca7">+3/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>vite.config.js</strong><dd><code>Conditional PWA registration type in Vite configuration</code>&nbsp; &nbsp; </dd></summary> <hr> frontend/vite.config.js - Modified PWA registration type based on environment variable. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/477/files#diff-3ab42a14055f455cac92d192b5dfc9b850cd36f1ea3410d1694a602f6d4b83c1">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>package.json</strong><dd><code>New build script for pages without PWA</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/package.json - Added a new script to build pages without PWA. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/477/files#diff-da6498268e99511d9ba0df3c13e439d10556a812881c9d03955b2ef7c6c1c655">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>pages.md</strong><dd><code>Documentation for building pages without PWA</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/zh/guide/cli/pages.md <li>Added documentation for building pages without PWA for Cloudflare Zero <br>Trust.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/477/files#diff-ad21a1135eb7a442fb604300654290519fabdd0136940a3e59a512c7643a5e20">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:55 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#587
    No description provided.