Fixed some minor SSR issues in search grids
This commit is contained in:
@@ -4,11 +4,11 @@
|
|||||||
docker pull frikky/shuffle-backend:nightly
|
docker pull frikky/shuffle-backend:nightly
|
||||||
docker pull frikky/shuffle-frontend:nightly
|
docker pull frikky/shuffle-frontend:nightly
|
||||||
|
|
||||||
docker tag frikky/shuffle-backend:nightly ghcr.io/frikky/shuffle-backend:latest
|
docker tag frikky/shuffle-backend:nightly ghcr.io/frikky/shuffle-backend:nightly
|
||||||
docker tag frikky/shuffle-frontend:nightly ghcr.io/frikky/shuffle-frontend:latest
|
docker tag frikky/shuffle-frontend:nightly ghcr.io/frikky/shuffle-frontend:nightly
|
||||||
|
|
||||||
docker push ghcr.io/frikky/shuffle-backend:nightly
|
docker push ghcr.io/frikky/shuffle-backend:nightly
|
||||||
docker push ghcr.io/frikky/shuffle-frontend:nightly
|
docker push ghcr.io/frikky/shuffle-frontend:nightly
|
||||||
|
|
||||||
docker push ghcr.io/frikky/shuffle-backend:latest
|
#docker push ghcr.io/frikky/shuffle-backend:latest
|
||||||
docker push ghcr.io/frikky/shuffle-frontend:latest
|
#docker push ghcr.io/frikky/shuffle-frontend:latest
|
||||||
|
|||||||
@@ -1046,8 +1046,6 @@ class AppBase:
|
|||||||
# "ids": ret1.json(),
|
# "ids": ret1.json(),
|
||||||
#}
|
#}
|
||||||
|
|
||||||
def get_file_namespace_ids(self, namespace):
|
|
||||||
return get_file_category_ids(self, namespace)
|
|
||||||
|
|
||||||
# Downloads all files from a namespace
|
# Downloads all files from a namespace
|
||||||
# Currently only working on local version of Shuffle
|
# Currently only working on local version of Shuffle
|
||||||
@@ -1081,6 +1079,12 @@ class AppBase:
|
|||||||
|
|
||||||
return myzipfile
|
return myzipfile
|
||||||
|
|
||||||
|
def get_file_namespace_ids(self, namespace):
|
||||||
|
return self.get_file_category_ids(self, namespace)
|
||||||
|
|
||||||
|
def get_file_category(self, category):
|
||||||
|
return self.get_file_namespace(self, category)
|
||||||
|
|
||||||
# Things to consider for files:
|
# Things to consider for files:
|
||||||
# - How can you download / stream a file?
|
# - How can you download / stream a file?
|
||||||
# - Can you decide if you want a stream or the files directly?
|
# - Can you decide if you want a stream or the files directly?
|
||||||
|
|||||||
+37
-37
@@ -1,43 +1,43 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
frontend:
|
#frontend:
|
||||||
#build: ./frontend
|
# #build: ./frontend
|
||||||
image: ghcr.io/frikky/shuffle-frontend:nightly
|
# image: ghcr.io/frikky/shuffle-frontend:nightly
|
||||||
container_name: shuffle-frontend
|
# container_name: shuffle-frontend
|
||||||
hostname: shuffle-frontend
|
# hostname: shuffle-frontend
|
||||||
ports:
|
# ports:
|
||||||
- "${FRONTEND_PORT}:80"
|
# - "${FRONTEND_PORT}:80"
|
||||||
- "${FRONTEND_PORT_HTTPS}:443"
|
# - "${FRONTEND_PORT_HTTPS}:443"
|
||||||
networks:
|
# networks:
|
||||||
- shuffle
|
# - shuffle
|
||||||
environment:
|
# environment:
|
||||||
- BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
|
# - BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
depends_on:
|
|
||||||
- backend
|
|
||||||
backend:
|
|
||||||
#build: ./backend
|
|
||||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
|
||||||
container_name: shuffle-backend
|
|
||||||
hostname: ${BACKEND_HOSTNAME}
|
|
||||||
# Here for debugging:
|
|
||||||
ports:
|
|
||||||
- "${BACKEND_PORT}:5001"
|
|
||||||
networks:
|
|
||||||
- shuffle
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
|
|
||||||
- ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
|
|
||||||
#- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
|
|
||||||
env_file: .env
|
|
||||||
environment:
|
|
||||||
#- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
|
||||||
- SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
|
|
||||||
- SHUFFLE_FILE_LOCATION=/shuffle-files
|
|
||||||
restart: unless-stopped
|
|
||||||
# depends_on:
|
# depends_on:
|
||||||
#- opensearch #Not necessary because dependancy is handled within the backend itself instead
|
# - backend
|
||||||
|
#backend:
|
||||||
|
# #build: ./backend
|
||||||
|
# image: ghcr.io/frikky/shuffle-backend:nightly
|
||||||
|
# container_name: shuffle-backend
|
||||||
|
# hostname: ${BACKEND_HOSTNAME}
|
||||||
|
# # Here for debugging:
|
||||||
|
# ports:
|
||||||
|
# - "${BACKEND_PORT}:5001"
|
||||||
|
# networks:
|
||||||
|
# - shuffle
|
||||||
|
# volumes:
|
||||||
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
|
||||||
|
# - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
|
||||||
|
# #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
|
||||||
|
# env_file: .env
|
||||||
|
# environment:
|
||||||
|
# #- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||||
|
# - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
|
||||||
|
# - SHUFFLE_FILE_LOCATION=/shuffle-files
|
||||||
|
# restart: unless-stopped
|
||||||
|
# #depends_on:
|
||||||
|
# #- opensearch #Not necessary because dependancy is handled within the backend itself instead
|
||||||
#- database
|
#- database
|
||||||
orborus:
|
orborus:
|
||||||
image: ghcr.io/frikky/shuffle-orborus:nightly
|
image: ghcr.io/frikky/shuffle-orborus:nightly
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const searchClient = algoliasearch("JNSS5CFDZZ", "db08e40265e2941b9a7d8f644b6e52
|
|||||||
//const searchClient = algoliasearch("L55H18ZINA", "a19be455e7e75ee8f20a93d26b9fc6d6")
|
//const searchClient = algoliasearch("L55H18ZINA", "a19be455e7e75ee8f20a93d26b9fc6d6")
|
||||||
const AppGrid = props => {
|
const AppGrid = props => {
|
||||||
const { maxRows, showName, showSuggestion, isMobile, globalUrl, parsedXs, userdata } = props
|
const { maxRows, showName, showSuggestion, isMobile, globalUrl, parsedXs, userdata } = props
|
||||||
|
|
||||||
const isCloud =
|
const isCloud =
|
||||||
window.location.host === "localhost:3002" ||
|
window.location.host === "localhost:3002" ||
|
||||||
window.location.host === "shuffler.io";
|
window.location.host === "shuffler.io";
|
||||||
|
|||||||
@@ -112,8 +112,9 @@ const Docs = (defaultprops) => {
|
|||||||
const SideBar = {
|
const SideBar = {
|
||||||
minWidth: 250,
|
minWidth: 250,
|
||||||
maxWidth: 300,
|
maxWidth: 300,
|
||||||
position: "sticky",
|
position: "absolute",
|
||||||
top: 100,
|
top: 15,
|
||||||
|
left: 0,
|
||||||
maxHeight: "83vh",
|
maxHeight: "83vh",
|
||||||
overflowX: "hidden",
|
overflowX: "hidden",
|
||||||
overflowY: "auto",
|
overflowY: "auto",
|
||||||
@@ -592,13 +593,15 @@ const Docs = (defaultprops) => {
|
|||||||
<div style={{
|
<div style={{
|
||||||
color: "rgba(255, 255, 255, 0.65)",
|
color: "rgba(255, 255, 255, 0.65)",
|
||||||
flex: "1",
|
flex: "1",
|
||||||
maxWidth: mobile ? "100%" : 750,
|
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
paddingBottom: 100,
|
paddingBottom: 100,
|
||||||
marginLeft: mobile ? 0 : 50,
|
marginLeft: mobile ? 0 : 50,
|
||||||
marginTop: 50,
|
marginTop: 50,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
maxWidth: 500,
|
margin: "auto",
|
||||||
|
maxWidth: mobile ? "100%" : 900,
|
||||||
|
maxWidth: mobile ? "100%" : 900,
|
||||||
|
marginTop: 50,
|
||||||
}}>
|
}}>
|
||||||
<Typography variant="h4" style={{textAlign: "center",}}>
|
<Typography variant="h4" style={{textAlign: "center",}}>
|
||||||
Documentation
|
Documentation
|
||||||
@@ -767,11 +770,12 @@ const Docs = (defaultprops) => {
|
|||||||
mainpageInfo
|
mainpageInfo
|
||||||
:
|
:
|
||||||
<div id="markdown_wrapper_outer" style={markdownStyle}>
|
<div id="markdown_wrapper_outer" style={markdownStyle}>
|
||||||
|
<div style={{maxWidth: 750, minWidth: 750, marginTop: 50, }}>
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
id="markdown_wrapper"
|
id="markdown_wrapper"
|
||||||
escapeHtml={false}
|
escapeHtml={false}
|
||||||
source={data}
|
source={data}
|
||||||
style={{marginRight: 150}}
|
style={{}}
|
||||||
renderers={{
|
renderers={{
|
||||||
link: OuterLink,
|
link: OuterLink,
|
||||||
image: Img,
|
image: Img,
|
||||||
@@ -780,6 +784,7 @@ const Docs = (defaultprops) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,6 +38,28 @@ const Search = (props) => {
|
|||||||
const [curTab, setCurTab] = useState(0);
|
const [curTab, setCurTab] = useState(0);
|
||||||
const iconStyle = { marginRight: 10 };
|
const iconStyle = { marginRight: 10 };
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (serverside !== true && window.location.search !== undefined && window.location.search !== null) {
|
||||||
|
const urlSearchParams = new URLSearchParams(window.location.search)
|
||||||
|
const params = Object.fromEntries(urlSearchParams.entries())
|
||||||
|
const foundTab = params["tab"]
|
||||||
|
if (foundTab !== null && foundTab !== undefined) {
|
||||||
|
for (var key in Object.keys(views)) {
|
||||||
|
const value = views[key]
|
||||||
|
console.log(key, value)
|
||||||
|
if (value === foundTab) {
|
||||||
|
setConfig("", key)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
if (serverside === true) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const boxStyle = {
|
const boxStyle = {
|
||||||
color: "white",
|
color: "white",
|
||||||
flex: "1",
|
flex: "1",
|
||||||
@@ -91,24 +113,6 @@ const Search = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (serverside !== true && window.location.search !== undefined && window.location.search !== null) {
|
|
||||||
const urlSearchParams = new URLSearchParams(window.location.search)
|
|
||||||
const params = Object.fromEntries(urlSearchParams.entries())
|
|
||||||
const foundTab = params["tab"]
|
|
||||||
if (foundTab !== null && foundTab !== undefined) {
|
|
||||||
for (var key in Object.keys(views)) {
|
|
||||||
const value = views[key]
|
|
||||||
console.log(key, value)
|
|
||||||
if (value === foundTab) {
|
|
||||||
setConfig("", key)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
if (isLoaded === false) {
|
if (isLoaded === false) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user