mirror of
https://github.com/Qortal/qapp-core.git
synced 2025-06-14 17:41:20 +00:00
fix mobile view for index manager
This commit is contained in:
parent
7a33cc7f65
commit
85a987cbd3
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "qapp-core",
|
"name": "qapp-core",
|
||||||
"version": "1.0.13",
|
"version": "1.0.14",
|
||||||
"description": "Qortal's core React library with global state, UI components, and utilities",
|
"description": "Qortal's core React library with global state, UI components, and utilities",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.mjs",
|
"module": "dist/index.mjs",
|
||||||
|
@ -567,7 +567,11 @@ const CreateIndex = ({
|
|||||||
const identifier = `idx-${hashedRootName}-${hashedLink}-`;
|
const identifier = `idx-${hashedRootName}-${hashedLink}-`;
|
||||||
const res = await fetch(`/arbitrary/indices/${nameParam}/${identifier}`)
|
const res = await fetch(`/arbitrary/indices/${nameParam}/${identifier}`)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
setRecommendedIndices(data)
|
const uniqueByTerm = data.filter(
|
||||||
|
(item: any, index: number, self: any) =>
|
||||||
|
index === self.findIndex((t: any) => t.term === item.term)
|
||||||
|
);
|
||||||
|
setRecommendedIndices(uniqueByTerm)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -656,7 +660,9 @@ const CreateIndex = ({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Box>
|
<Box sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
aria-labelledby="demo-controlled-radio-buttons-group"
|
aria-labelledby="demo-controlled-radio-buttons-group"
|
||||||
name="controlled-radio-buttons-group"
|
name="controlled-radio-buttons-group"
|
||||||
@ -809,6 +815,7 @@ const YourIndices = ({
|
|||||||
const identifier = `idx-${hashedRootName}-${hashedLink}-`;
|
const identifier = `idx-${hashedRootName}-${hashedLink}-`;
|
||||||
const res = await fetch(`/arbitrary/indices/${nameParam}/${identifier}`)
|
const res = await fetch(`/arbitrary/indices/${nameParam}/${identifier}`)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|
||||||
setRecommendedIndices(data)
|
setRecommendedIndices(data)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
@ -898,7 +905,9 @@ const YourIndices = ({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Box>
|
<Box sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
aria-labelledby="demo-controlled-radio-buttons-group"
|
aria-labelledby="demo-controlled-radio-buttons-group"
|
||||||
name="controlled-radio-buttons-group"
|
name="controlled-radio-buttons-group"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
export { useResourceStatus } from './hooks/useResourceStatus';
|
export { useResourceStatus } from './hooks/useResourceStatus';
|
||||||
export { Spacer } from './common/Spacer';
|
export { Spacer } from './common/Spacer';
|
||||||
import './index.css'
|
import './index.css'
|
||||||
|
export { createQortalLink } from './utils/qortal';
|
||||||
export { IndexCategory } from './state/indexes';
|
export { IndexCategory } from './state/indexes';
|
||||||
export { hashWordWithoutPublicSalt } from './utils/encryption';
|
export { hashWordWithoutPublicSalt } from './utils/encryption';
|
||||||
export { createAvatarLink } from './utils/qortal';
|
export { createAvatarLink } from './utils/qortal';
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
export const createAvatarLink = (qortalName: string)=> {
|
export const createAvatarLink = (qortalName: string)=> {
|
||||||
return `/arbitrary/THUMBNAIL/${encodeURIComponent(qortalName)}/qortal_avatar?async=true`
|
return `/arbitrary/THUMBNAIL/${encodeURIComponent(qortalName)}/qortal_avatar?async=true`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const removeTrailingSlash = (str: string) => str.replace(/\/$/, '');
|
||||||
|
|
||||||
|
export const createQortalLink = (type: 'APP' | 'WEBSITE', appName: string, path: string) => {
|
||||||
|
|
||||||
|
let link = 'qortal://' + type + '/' + appName
|
||||||
|
if(path && path.startsWith('/')){
|
||||||
|
link = link + removeTrailingSlash(path)
|
||||||
|
}
|
||||||
|
if(path && !path.startsWith('/')){
|
||||||
|
link = link + '/' + removeTrailingSlash(path)
|
||||||
|
}
|
||||||
|
return link
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user