post PR review changes

This commit is contained in:
eugene 2024-08-05 13:25:58 +03:00
parent d8395ef8b3
commit dd753186f5
5 changed files with 0 additions and 81 deletions

View File

@ -59,8 +59,6 @@
.drawingRectangle { .drawingRectangle {
position: absolute; position: absolute;
border: 1px solid #01aaad; border: 1px solid #01aaad;
//width: 40px;
//height: 40px;
z-index: 50; z-index: 50;
background-color: #01aaad4b; background-color: #01aaad4b;
cursor: pointer; cursor: pointer;

View File

@ -526,8 +526,6 @@ export const CreatePage = () => {
title title
} }
console.log('content: ', content)
setLoadingSpinnerDesc('Signing nostr event for create signature') setLoadingSpinnerDesc('Signing nostr event for create signature')
const createSignature = await signEventForMetaFile( const createSignature = await signEventForMetaFile(

View File

@ -319,8 +319,6 @@ export const SignPage = () => {
} }
} }
console.log('processed files: ', files);
setFiles(files) setFiles(files)
setCurrentFileHashes(fileHashes) setCurrentFileHashes(fileHashes)
} }
@ -455,8 +453,6 @@ export const SignPage = () => {
} }
} }
console.log('processed files: ', files);
setFiles(files) setFiles(files)
setCurrentFileHashes(fileHashes) setCurrentFileHashes(fileHashes)
@ -540,42 +536,6 @@ export const SignPage = () => {
return currentUserMarks.map(( { mark }: CurrentUserMark) => mark); return currentUserMarks.map(( { mark }: CurrentUserMark) => mark);
} }
// const handleMarkClick = (id: number) => {
// const nextMark = currentUserMarks.find(mark => mark.mark.id === id)
// setCurrentUserMark(nextMark!)
// setCurrentMarkValue(nextMark?.mark.value || "")
// }
// const getMarkConfigPerUser = (markConfig: MarkConfig) => {
// if (!usersPubkey) return;
// return markConfig[hexToNpub(usersPubkey)];
// }
// const handleChange = (event: any) => setCurrentMarkValue(event.target.value);
//
// const handleSubmit = (event: any) => {
// event.preventDefault();
// if (!currentMarkValue || !currentUserMark) return;
//
// const curMark: Mark = {
// ...currentUserMark.mark,
// value: currentMarkValue
// };
//
// const updatedMarks: Mark[] = updateMarks(marks, curMark)
//
// setMarks(updatedMarks)
// setCurrentMarkValue("")
//
// // do the similar thing to the thing above
// const metaMarks = filterMarksByPubkey(updatedMarks, usersPubkey!)
// const signedMarks = extractMarksFromSignedMeta(meta!)
// const currentUserMarks = getCurrentUserMarks(metaMarks, signedMarks)
// setCurrentUserMarks(currentUserMarks)
// setCurrentUserMark(findNextCurrentUserMark(currentUserMarks) || null)
// setIsReadyToSign(isCurrentUserMarksComplete(currentUserMarks))
// }
// Update the meta signatures // Update the meta signatures
const updateMetaSignatures = (meta: Meta, signedEvent: SignedEvent): Meta => { const updateMetaSignatures = (meta: Meta, signedEvent: SignedEvent): Meta => {
const metaCopy = _.cloneDeep(meta) const metaCopy = _.cloneDeep(meta)
@ -970,30 +930,4 @@ export const SignPage = () => {
setCurrentUserMarks={setCurrentUserMarks} setCurrentUserMarks={setCurrentUserMarks}
setUpdatedMarks={setUpdatedMarks} setUpdatedMarks={setUpdatedMarks}
/> />
// return (
// <>
// <Box className={styles.container}>
// {
// marks.length > 0 && (
// <PdfView
// files={files}
// marks={marks}
// fileHashes={currentFileHashes}
// handleMarkClick={handleMarkClick}
// currentMarkValue={currentMarkValue}
// currentUserMark={currentUserMark}
// />)}
// {
// currentUserMark !== null && (
// <MarkFormField
// handleSubmit={handleSubmit}
// handleChange={handleChange}
// currentMark={currentUserMark}
// currentMarkValue={currentMarkValue}
// />
// )}
// </Box>
// </>
// )
} }

View File

@ -380,10 +380,6 @@ export const VerifyPage = () => {
} }
const handleExport = async () => { const handleExport = async () => {
// const proverbialUrls = await addMarksV2(Object.values(files)[0].file, meta!)
// await convertToFinalPdf(proverbialUrls)
if (Object.entries(files).length === 0 ||!meta ||!usersPubkey) return; if (Object.entries(files).length === 0 ||!meta ||!usersPubkey) return;
const usersNpub = hexToNpub(usersPubkey) const usersNpub = hexToNpub(usersPubkey)

View File

@ -1,12 +1,5 @@
import { MarkType } from "./drawing"; import { MarkType } from "./drawing";
// export interface Mark {
// /**
// * @key png (pdf page) file hash
// */
// [key: string]: MarkConfigDetails[]
// }
export interface CurrentUserMark { export interface CurrentUserMark {
mark: Mark mark: Mark
isLast: boolean isLast: boolean