Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Apr 9, 2024
1 parent ff58c03 commit 7f856b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nicegui/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, page: page, *, shared: bool = False) -> None:
self._body_html = ''

self.page = page
self.state = ObservableDict()
self.storage = ObservableDict()

self.connect_handlers: List[Union[Callable[..., Any], Awaitable]] = []
self.disconnect_handlers: List[Union[Callable[..., Any], Awaitable]] = []
Expand Down
4 changes: 2 additions & 2 deletions nicegui/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def client(self) -> ObservableDict:
if self._is_in_auto_index_context():
raise RuntimeError('app.storage.client can only be used with page builder functions '
'(https://nicegui.io/documentation/page)')
return context.get_client().state
return context.get_client().storage

@property
def tab(self) -> observables.ObservableDict:
Expand Down Expand Up @@ -201,7 +201,7 @@ def clear(self) -> None:
except RuntimeError:
pass # no client, could be a pytest
else:
client.state.clear()
client.storage.clear()
self._tabs.clear()
for filepath in self.path.glob('storage-*.json'):
filepath.unlink()
Expand Down

0 comments on commit 7f856b4

Please sign in to comment.