Skip to content

Add demo warning banner#620

Merged
josecelano merged 2 commits into
torrust:developfrom
josecelano:619-demo-mode-add-a-fixed-top-banner-with-the-warning
Sep 15, 2024
Merged

Add demo warning banner#620
josecelano merged 2 commits into
torrust:developfrom
josecelano:619-demo-mode-add-a-fixed-top-banner-with-the-warning

Conversation

@josecelano

@josecelano josecelano commented Sep 15, 2024

Copy link
Copy Markdown
Member

Add demo warning banner. The text can be overridden in the Index configuration:

[website.demo]
warning = """
⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements.
"""

See torrust/torrust-index#730

@josecelano josecelano added this to the v3.0.0 milestone Sep 15, 2024
@josecelano josecelano linked an issue Sep 15, 2024 that may be closed by this pull request
@josecelano

Copy link
Copy Markdown
Member Author

The banner in light mode:

image

and dark mode:

image

Fixes this error:

```output
Run npm run build

> torrust-index-gui@3.0.0-beta build
> nuxt build

[log] Nuxt 3.11.2 with Nitro 2.9.6
[info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/css/tailwind.css
[info] Building client...
[info] vite v5.2.13 building for production...
[info] transforming...

🌼   daisyUI [4](https://github.com/torrust/torrust-index-gui/actions/runs/10869961534/job/30161927416?pr=620#step:5:5).12.2
├─ ✔︎ 4 themes added		https://daisyui.com/docs/themes
╰─ ❤︎ Support daisyUI project:	https://opencollective.com/daisyui

[info] ✓ 172 modules transformed.
Error:  x Build failed in 6.21s
Error:  Nuxt Build Error: [vite]: Rollup failed to resolve import "torrust-index-types-lib" from "/home/runner/work/torrust-index-gui/torrust-index-gui/components/registration/RegistrationForm.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
  This is most likely unintended because it can break your application at runtime.
  If you do want to externalize this module explicitly add it to
  `build.rollupOptions.external`
  at viteWarn (node_modules/vite/dist/node/chunks/dep-DEPSZ3SS.js:68871:27)
  at onRollupWarning (node_modules/vite/dist/node/chunks/dep-DEPSZ3SS.js:68899:9)
  at onwarn (node_modules/vite/dist/node/chunks/dep-DEPSZ3SS.js:68[5](https://github.com/torrust/torrust-index-gui/actions/runs/10869961534/job/30161927416?pr=620#step:5:6)82:13)
  at node_modules/rollup/dist/es/shared/node-entry.js:18514:13
  at Object.logger [as onLog] (node_modules/rollup/dist/es/shared/node-entry.js:201[6](https://github.com/torrust/torrust-index-gui/actions/runs/10869961534/job/30161927416?pr=620#step:5:7)2:9)
  at ModuleLoader.handleInvalidResolvedId (node_modules/rollup/dist/es/shared/node-entry.js:1[9](https://github.com/torrust/torrust-index-gui/actions/runs/10869961534/job/30161927416?pr=620#step:5:10)104:26)
  at node_modules/rollup/dist/es/shared/node-entry.js:19062:26
Error: Process completed with exit code 1.
```
@josecelano josecelano linked an issue Sep 15, 2024 that may be closed by this pull request
@josecelano

Copy link
Copy Markdown
Member Author

ACK 562dd29

@josecelano josecelano self-assigned this Sep 15, 2024
@josecelano josecelano added Enhancement / Feature Request Something New Legal Licenses and other Official Documents - User - Enjoyable to Use our Software labels Sep 15, 2024
@josecelano josecelano merged commit cf18f58 into torrust:develop Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

- User - Enjoyable to Use our Software Enhancement / Feature Request Something New Legal Licenses and other Official Documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build error in runner: Rollup failed to resolve import ... Demo mode: Add a fixed top banner with the warning

1 participant