Skip to content

Commit

Permalink
add overview table
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Apr 9, 2024
1 parent 6563825 commit ff58c03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions website/documentation/content/storage_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
The user storage and browser storage are only available within `page builder functions </documentation/page>`_
because they are accessing the underlying `Request` object from FastAPI.
Additionally these two types require the `storage_secret` parameter in`ui.run()` to encrypt the browser session cookie.
| Storage type | `tab` | `client` | `user` | `general` | `browser` |
|-----------------------------|--------|----------|--------|-----------|-----------|
| Location | Server | Server | Server | Server | Browser |
| Across tabs | No | No | Yes | Yes | Yes |
| Across browsers | No | No | No | Yes | No |
| Across page reloads | Yes | No | Yes | Yes | Yes |
| Needs page builder function | Yes | Yes | Yes | No | Yes |
| Needs client connection | Yes | No | No | No | No |
| Write only before response | No | No | No | No | Yes |
''')
def storage_demo():
from nicegui import app
Expand Down
4 changes: 3 additions & 1 deletion website/documentation/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def render_content():
element = ui.restructured_text(part.description.replace(':param ', ':'))
else:
element = ui.markdown(part.description)
element.classes('bold-links arrow-links rst-param-tables')
element.classes('bold-links arrow-links')
if ':param' in part.description:
element.classes('rst-param-tables')
if part.ui:
part.ui()
if part.demo:
Expand Down

0 comments on commit ff58c03

Please sign in to comment.