Make the UI use the new ShareURL option

This commit is contained in:
Caio Cotts
2024-09-15 14:45:00 -04:00
parent f0240280eb
commit 8ac133027d
7 changed files with 25 additions and 12 deletions
+2 -2
View File
@@ -6,14 +6,14 @@ import {
SimpleForm,
TextInput,
} from 'react-admin'
import { shareUrl } from '../utils'
import { sharePlayerUrl } from '../utils'
import { Link } from '@material-ui/core'
import { DateField } from '../common'
import config from '../config'
export const ShareEdit = (props) => {
const { id, basePath, hasCreate, ...rest } = props
const url = shareUrl(id)
const url = sharePlayerUrl(id)
return (
<Edit {...props}>
<SimpleForm {...rest}>
+3 -3
View File
@@ -13,7 +13,7 @@ import React from 'react'
import { IconButton, Link, useMediaQuery } from '@material-ui/core'
import ShareIcon from '@material-ui/icons/Share'
import { DateField, QualityInfo } from '../common'
import { shareUrl } from '../utils'
import { sharePlayerUrl } from '../utils'
import config from '../config'
export const FormatInfo = ({ record, size }) => {
@@ -30,7 +30,7 @@ const ShareList = (props) => {
const notify = useNotify()
const handleShare = (r) => (e) => {
const url = shareUrl(r?.id)
const url = sharePlayerUrl(r?.id)
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard
.writeText(url)
@@ -89,7 +89,7 @@ const ShareList = (props) => {
source={'id'}
render={(r) => (
<Link
href={shareUrl(r.id)}
href={sharePlayerUrl(r.id)}
label="URL"
target="_blank"
rel="noopener noreferrer"
+1
View File
@@ -39,6 +39,7 @@ const SharePlayer = () => {
src: shareDownloadUrl(shareInfo?.id),
})
}
console.log(list)
const options = {
audioLists: list,
mode: 'full',