mirror of
https://git.v0l.io/florian/bouquet.git
synced 2025-03-18 01:13:00 +01:00
chore: formatting
This commit is contained in:
parent
4f49341581
commit
d4ca14e0f7
@ -82,10 +82,7 @@ const FileEventEditor = ({ data }: { data: FileEventData }) => {
|
||||
placeholder="Caption"
|
||||
></textarea>
|
||||
<span className="font-bold">URL</span>
|
||||
<textarea
|
||||
value={fileEventData.url.join('\n')}
|
||||
className="textarea"
|
||||
placeholder="URL"/>
|
||||
<textarea value={fileEventData.url.join('\n')} className="textarea" placeholder="URL" />
|
||||
<button className="btn btn-primary" onClick={() => publishFileEvent(fileEventData)}>
|
||||
Publish
|
||||
</button>
|
||||
|
@ -55,7 +55,7 @@ const Server = ({
|
||||
</div>
|
||||
{serverInfo.isError ? (
|
||||
<div className="badge badge-error">
|
||||
<ExclamationTriangleIcon className='w-4 mr-2'/> Error connecting to server
|
||||
<ExclamationTriangleIcon className="w-4 mr-2" /> Error connecting to server
|
||||
</div>
|
||||
) : (
|
||||
<div className="server-stats">
|
||||
|
@ -22,7 +22,7 @@ export const ServerList = ({
|
||||
onTransfer,
|
||||
onCancel,
|
||||
title,
|
||||
showAddButton = false
|
||||
showAddButton = false,
|
||||
}: ServerListProps) => {
|
||||
const { serverInfo, distribution } = useServerInfo();
|
||||
const blobsWithOnlyOneOccurance = Object.values(distribution)
|
||||
@ -33,11 +33,14 @@ export const ServerList = ({
|
||||
<>
|
||||
<div className={`server-list-header ${!title ? 'justify-end' : ''}`}>
|
||||
{title && <h2>{title}</h2>}
|
||||
{showAddButton && <div className="content-center">
|
||||
<button onClick={() => {}} className='flex flex-row gap-2' title="Add server">
|
||||
<PlusIcon/><ServerIcon />
|
||||
</button>
|
||||
</div>}
|
||||
{showAddButton && (
|
||||
<div className="content-center">
|
||||
<button onClick={() => {}} className="flex flex-row gap-2" title="Add server">
|
||||
<PlusIcon />
|
||||
<ServerIcon />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="server-list">
|
||||
|
@ -11,12 +11,12 @@ const ThemeSwitcher = () => {
|
||||
document.querySelector('html')?.setAttribute('data-theme', theme);
|
||||
}, [theme]);
|
||||
return (
|
||||
<div className='tooltip tooltip-bottom' data-tip="Switch theme">
|
||||
<label className="swap swap-rotate">
|
||||
<input onClick={toggleTheme} type="checkbox" />
|
||||
<MoonIcon className="tooltip swap-on" />
|
||||
<SunIcon className="tooltip swap-off" />
|
||||
</label>
|
||||
<div className="tooltip tooltip-bottom" data-tip="Switch theme">
|
||||
<label className="swap swap-rotate">
|
||||
<input onClick={toggleTheme} type="checkbox" />
|
||||
<MoonIcon className="tooltip swap-on" />
|
||||
<SunIcon className="tooltip swap-off" />
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
function Check() {
|
||||
/*
|
||||
const { serverInfo } = useServerInfo();
|
||||
@ -17,7 +16,7 @@ function Check() {
|
||||
onCancel={() => navigate('/')}
|
||||
></ServerList>
|
||||
*/}
|
||||
<button className="btn">dfgfdgdfg</button>
|
||||
<button className="btn">dfgfdgdfg</button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -29,4 +29,3 @@
|
||||
.error-log div span {
|
||||
@apply overflow-ellipsis overflow-hidden text-nowrap;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,11 @@ export const Transfer = () => {
|
||||
<ServerList
|
||||
servers={Object.values(serverInfo).filter(s => s.name == transferSource)}
|
||||
onCancel={() => closeTransferMode()}
|
||||
title={<><ArrowUpOnSquareIcon /> Transfer Source</>}
|
||||
title={
|
||||
<>
|
||||
<ArrowUpOnSquareIcon /> Transfer Source
|
||||
</>
|
||||
}
|
||||
></ServerList>
|
||||
<ServerList
|
||||
servers={Object.values(serverInfo)
|
||||
@ -114,7 +118,11 @@ export const Transfer = () => {
|
||||
.sort()}
|
||||
selectedServer={transferTarget}
|
||||
setSelectedServer={setTransferTarget}
|
||||
title={<><ArrowDownOnSquareIcon /> Transfer Target</>}
|
||||
title={
|
||||
<>
|
||||
<ArrowDownOnSquareIcon /> Transfer Target
|
||||
</>
|
||||
}
|
||||
></ServerList>
|
||||
{transferTarget && transferJobs && transferJobs.length > 0 ? (
|
||||
<>
|
||||
|
@ -136,7 +136,9 @@ function Upload() {
|
||||
fileDimensions[file.name] = {
|
||||
...fileDimensions[file.name],
|
||||
x: newBlob.sha256,
|
||||
url: primary ? [newBlob.url, ...fileDimensions[file.name].url] : [...fileDimensions[file.name].url, newBlob.url],
|
||||
url: primary
|
||||
? [newBlob.url, ...fileDimensions[file.name].url]
|
||||
: [...fileDimensions[file.name].url, newBlob.url],
|
||||
size: newBlob.size,
|
||||
m: newBlob.type,
|
||||
};
|
||||
|
@ -25,16 +25,12 @@ console.log(allXTags);
|
||||
}, [fileMetaSub.events]);
|
||||
*/
|
||||
|
||||
|
||||
const fileMetaEventsByHash = useMemo(
|
||||
() => {
|
||||
const allXTags = fileMetaSub.events.flatMap(ev => ev.tags.filter(t => t[0]=='x').flatMap(t => ({x:t[1], ev})));
|
||||
const groupedByX= groupBy(allXTags, item => item.x);
|
||||
return mapValues(groupedByX, v => v.map(e => e.ev));
|
||||
},
|
||||
[fileMetaSub]
|
||||
);
|
||||
console.log(fileMetaEventsByHash)
|
||||
const fileMetaEventsByHash = useMemo(() => {
|
||||
const allXTags = fileMetaSub.events.flatMap(ev => ev.tags.filter(t => t[0] == 'x').flatMap(t => ({ x: t[1], ev })));
|
||||
const groupedByX = groupBy(allXTags, item => item.x);
|
||||
return mapValues(groupedByX, v => v.map(e => e.ev));
|
||||
}, [fileMetaSub]);
|
||||
console.log(fileMetaEventsByHash);
|
||||
|
||||
return fileMetaEventsByHash;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user