Skip to content

Commit

Permalink
greatly simply file browser to just select stuff
Browse files Browse the repository at this point in the history
remove reasons why this component would randomly reload after selecting a file
  • Loading branch information
hoggatt committed Sep 13, 2023
1 parent c0b5509 commit a417064
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 50 deletions.
7 changes: 1 addition & 6 deletions st_file_browser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ def st_file_browser(
file_ignores=None,
select_filetype_ignores=None,
extentions=None,
show_delete_file=False,
show_choose_file=False,
show_download_file=True,
show_new_folder=False,
show_upload_file=False,
limit=10000,
key=None,
use_cache=False,
Expand Down Expand Up @@ -108,9 +104,8 @@ def st_file_browser(

event = _component_func(
files=files,
path=path,
show_choose_file=show_choose_file,
show_download_file=show_download_file,
show_delete_file=show_delete_file,
ignore_file_select_event=ignore_file_select_event,
key=key,
)
Expand Down
8 changes: 4 additions & 4 deletions st_file_browser/frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files": {
"main.js": "./static/js/main.8be435cb.chunk.js",
"main.js.map": "./static/js/main.8be435cb.chunk.js.map",
"main.js": "./static/js/main.4551d177.chunk.js",
"main.js.map": "./static/js/main.4551d177.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.5606d314.js",
"runtime-main.js.map": "./static/js/runtime-main.5606d314.js.map",
"static/css/2.5a3919a9.chunk.css": "./static/css/2.5a3919a9.chunk.css",
"static/js/2.0e6934a9.chunk.js": "./static/js/2.0e6934a9.chunk.js",
"static/js/2.0e6934a9.chunk.js.map": "./static/js/2.0e6934a9.chunk.js.map",
"index.html": "./index.html",
"precache-manifest.f6ea30157b08e5c9621b26aa22315f1c.js": "./precache-manifest.f6ea30157b08e5c9621b26aa22315f1c.js",
"precache-manifest.a0596225e23638cb17232461d8504d40.js": "./precache-manifest.a0596225e23638cb17232461d8504d40.js",
"service-worker.js": "./service-worker.js",
"static/css/2.5a3919a9.chunk.css.map": "./static/css/2.5a3919a9.chunk.css.map",
"static/js/2.0e6934a9.chunk.js.LICENSE.txt": "./static/js/2.0e6934a9.chunk.js.LICENSE.txt",
Expand All @@ -18,6 +18,6 @@
"static/js/runtime-main.5606d314.js",
"static/css/2.5a3919a9.chunk.css",
"static/js/2.0e6934a9.chunk.js",
"static/js/main.8be435cb.chunk.js"
"static/js/main.4551d177.chunk.js"
]
}
2 changes: 1 addition & 1 deletion st_file_browser/frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><title>Streamlit Component</title><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Streamlit Component"/><link rel="stylesheet" href="bootstrap.min.css"/><link href="./static/css/2.5a3919a9.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,l,i=r[0],f=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var f=t[i];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var i=this.webpackJsonpstreamlit_file_browser=this.webpackJsonpstreamlit_file_browser||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=f;t()}([])</script><script src="./static/js/2.0e6934a9.chunk.js"></script><script src="./static/js/main.8be435cb.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><title>Streamlit Component</title><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Streamlit Component"/><link rel="stylesheet" href="bootstrap.min.css"/><link href="./static/css/2.5a3919a9.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,l,i=r[0],f=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var f=t[i];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var i=this.webpackJsonpstreamlit_file_browser=this.webpackJsonpstreamlit_file_browser||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=f;t()}([])</script><script src="./static/js/2.0e6934a9.chunk.js"></script><script src="./static/js/main.4551d177.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "72c17be733e6957ca328e5a7ed2fd2a8",
"revision": "0cca5067d8c6de5d954432987ef27a01",
"url": "./index.html"
},
{
Expand All @@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "./static/js/2.0e6934a9.chunk.js.LICENSE.txt"
},
{
"revision": "ccfb7f702176a8fa1c4c",
"url": "./static/js/main.8be435cb.chunk.js"
"revision": "e51e5392a52097788e7e",
"url": "./static/js/main.4551d177.chunk.js"
},
{
"revision": "44e7e8c245c21e8f352f",
Expand Down
2 changes: 1 addition & 1 deletion st_file_browser/frontend/build/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"./precache-manifest.f6ea30157b08e5c9621b26aa22315f1c.js"
"./precache-manifest.a0596225e23638cb17232461d8504d40.js"
);

self.addEventListener('message', (event) => {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a417064

Please sign in to comment.