From 4b9ccb5d3fdb8a30ab2299d58e72e8ef2aeb4645 Mon Sep 17 00:00:00 2001 From: Gagandeep Date: Thu, 18 Aug 2022 17:36:31 +0530 Subject: [PATCH] BUGFIX: setTimeout should handle reloadInSecs correctly --- setup.py | 4 ++-- streamlit_ws_localstorage/auth_redirect_server/auth_util.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index ede6b00..9d72f8f 100644 --- a/setup.py +++ b/setup.py @@ -7,14 +7,14 @@ setuptools.setup( name='streamlit_ws_localstorage', packages=setuptools.find_packages(), - version='1.0.4', # Ideally should be same as your GitHub release tag varsion + version='1.0.5', # Ideally should be same as your GitHub release tag varsion description="A simple synchronous way of accessing localStorage from your Streamlit app.", long_description=long_description, long_description_content_type="text/markdown", author='Gagandeep Singh', author_email='gagan@heloprotocol.in', url='https://github.com/gagangoku/streamlit-ws-localstorage', - download_url='https://github.com/gagangoku/streamlit-ws-localstorage/archive/refs/tags/1.0.4.tar.gz', + download_url='https://github.com/gagangoku/streamlit-ws-localstorage/archive/refs/tags/1.0.5.tar.gz', keywords=['python', 'websocket', 'cookies', 'localstorage', 'streamlit'], classifiers=[], python_requires=">=3.6", diff --git a/streamlit_ws_localstorage/auth_redirect_server/auth_util.py b/streamlit_ws_localstorage/auth_redirect_server/auth_util.py index 44750cf..281706e 100644 --- a/streamlit_ws_localstorage/auth_redirect_server/auth_util.py +++ b/streamlit_ws_localstorage/auth_redirect_server/auth_util.py @@ -25,7 +25,7 @@ def loginWithOAuthComponent(hostPort, uid, localStorageCodeKey, reloadInSecs=5, var div = document.getElementById("statusDiv"); div.innerHTML = 'Auth code received. Reloading page in ' + reloadInSecs + ' seconds'; - setTimeout(() => window.parent.location.reload(), reloadInSecs); + setTimeout(() => window.parent.location.reload(), reloadInSecs*1000); } };