diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..777a915 --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,27 @@ +name: npm run format + +on: [push, workflow_dispatch] + +jobs: + style: + + runs-on: ubuntu-latest + + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - run: npm install + - run: npm run format + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: format" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1cda54b --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.yml diff --git a/package-lock.json b/package-lock.json index 74682d3..290fbb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -521,6 +521,32 @@ "node": ">=6.9.0" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -971,6 +997,38 @@ "react": "^18.0.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1182,6 +1240,17 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1729,6 +1798,14 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3568,6 +3645,14 @@ "node": "14 || >=16.14" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -5029,6 +5114,70 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -5243,6 +5392,14 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", @@ -5462,6 +5619,17 @@ "node": ">= 14" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index 3c498c0..671491a 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -28,10 +28,7 @@ export default function Page() {
  • You can contribute to our website development or add your documents and user account to eeXiv on our{' '} - + GitHub repository . diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx index 81e73c7..d1206cf 100644 --- a/src/app/author/[author]/AuthorDisplay.tsx +++ b/src/app/author/[author]/AuthorDisplay.tsx @@ -178,10 +178,10 @@ export default function AuthorDisplay({ ))} -
    -
    {authorsDocuments.length > 0 && ( <> +
    +

    Published documents

    diff --git a/src/app/components/News.tsx b/src/app/components/News.tsx index 1902c2d..710a794 100644 --- a/src/app/components/News.tsx +++ b/src/app/components/News.tsx @@ -31,14 +31,21 @@ export default function News() { eeXiv is currently under active development! There may be major updates, breaking changes, or weird bugs. Report bugs, suggest new features, or give us feedback at{' '} - + our issue tracker.
  • Want to upload your documents or just make yourself a profile on - eeXiv? Check our about page for more - information! + eeXiv? Check our{' '} + + about page + {' '} + for more information!
  • diff --git a/src/app/db/data.ts b/src/app/db/data.ts index 42163a9..73848b6 100644 --- a/src/app/db/data.ts +++ b/src/app/db/data.ts @@ -1,31 +1,3 @@ -/* -documents db schema -documents { - slug: { - manifest: { - title: string - authors: string[] - date: unix epoch integer[] -> if multiple revisions, put the earlier dates first - type: presentation | report | whitepaper | other - latest: integer >= 1 -> the latest revision of the document (earliest = 1) - keywords: string[] - topics: string[] - references: string[], - code: url[] - }, - abstract: string, - file: pdf | docx | pptx | targz | other, named file[rev].[ext] - (eg. revision 1 = file1.pdf, revision 2 = file2.pdf, etc) - the "latest" should be the latest revision - citation: a string that can be used to cite the document - reviewers: an array of reviewers, following the reviewer format. if you specify a local - profile username, it will link to the author's profile, and take priority over the link - status: draft | under review | reviewed | published no review - note: published no review should be used for documents where peer review - is not appropriate or unnecessary - } -} -*/ export type FileType = 'pdf' | 'docx' | 'pptx' | 'tar.gz' | 'other' export type DocumentType = | 'presentation' @@ -42,11 +14,13 @@ export type reviewer = { profile?: string url?: string } + export type DocumentStatus = | 'draft' | 'under review' | 'reviewed' | 'published no review' + export interface Document { manifest: DocumentManifest abstract: string diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts index 2af5727..4e40eec 100644 --- a/src/app/db/loaders.ts +++ b/src/app/db/loaders.ts @@ -83,16 +83,15 @@ export const loadAllAuthors = (): Promise<{ [key: string]: Author }> => { worker.postMessage('LOAD') } else { - reject( - new Error( - 'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.' - ) - ) + return } }) } -export const loadAuthor = (id: string): Promise => { +export const loadAuthors = ( + authorIds: string[] +): Promise<{ [key: string]: Author }> => { + 'use client' return new Promise((resolve, reject) => { if (typeof Worker !== 'undefined') { const worker = new Worker( @@ -101,12 +100,10 @@ export const loadAuthor = (id: string): Promise => { ) worker.onmessage = (e: MessageEvent<{ [key: string]: Author }>) => { - const data = e.data - const author: Author | undefined = data[id] - if (!author) { - return reject(new Error('404')) + if (typeof e.data === 'object' && Object.keys(e.data).length > 0) { + resolve(e.data) } else { - resolve(author) + reject(new Error('404')) } worker.terminate() } @@ -116,7 +113,7 @@ export const loadAuthor = (id: string): Promise => { worker.terminate() } - worker.postMessage('LOAD') + worker.postMessage(authorIds) } else { reject( new Error( diff --git a/src/app/db/workers/authorLoader.worker.ts b/src/app/db/workers/authorLoader.worker.ts index 4ec63fe..0509ee4 100644 --- a/src/app/db/workers/authorLoader.worker.ts +++ b/src/app/db/workers/authorLoader.worker.ts @@ -1,7 +1,30 @@ -import { authors } from '../data' +import { authors, Author } from '../data' + +export function getAuthorsById(authorIds: string[]): { [key: string]: Author } { + const result: { [key: string]: Author } = {} + + // Iterate through the array of author IDs + for (const id of authorIds) { + const author = authors[id] // Retrieve the author entry by ID + if (author) { + result[id] = author // If the author exists, add it to the result object + } + } + + return result +} + +const checkIsStringArray = (data: unknown): data is string[] => { + if (Array.isArray(data)) { + return data.every((d) => typeof d === 'string') + } + return false +} onmessage = (e) => { - if (e.data === 'LOAD') { - self.postMessage(authors) - } + let authorIds: string[] = [] + checkIsStringArray(e.data) && (authorIds = e.data as string[]) + let results = getAuthorsById(authorIds) + + postMessage(results) } diff --git a/src/app/document/page.tsx b/src/app/document/page.tsx deleted file mode 100644 index 0b7b6ad..0000000 --- a/src/app/document/page.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function Page() { - return ( -

    - This is a placeholder for a document browser that will be implemented in - the future. In the meantime, you can view specific documents by searching. -

    - ) -} diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx index 4ecb327..6cc1e09 100644 --- a/src/app/document/view/[slug]/DocumentViewer.tsx +++ b/src/app/document/view/[slug]/DocumentViewer.tsx @@ -1,4 +1,4 @@ -import { DocumentType, documents } from '@/app/db/data' +'use client' import { Zilla_Slab } from 'next/font/google' import { epoch2datestring } from '@/app/utils/epoch2datestring' import { @@ -9,14 +9,29 @@ import { Reviewers, } from '@/app/components/DataDisplay' import { ItemBadge, Status } from '@/app/components/Badges' -import Link from 'next/link' import { notFound } from 'next/navigation' +import VersionChooser from './VersionChooser' +import crypto from 'crypto' +import { Suspense } from 'react' +import { loadDocument } from '@/app/db/loaders' +import { useSuspenseQuery } from '@tanstack/react-query' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) -export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) { - const { manifest, abstract, file, citation } = documents[slug] - if (!manifest) return notFound() +const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => { + const { data, error } = useSuspenseQuery({ + queryKey: [slug], + queryFn: () => { + const data = loadDocument(slug) + return data + }, + }) + if (error) throw error + let doc = data + // const doc = documents[slug] + const { manifest, abstract, citation } = doc + + // if (!manifest) return notFound() const { title, authors, @@ -30,6 +45,13 @@ export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) { status, } = manifest + // git style hash + const hash = crypto + .createHash('sha256') + .update(slug) + .digest('hex') + .substring(0, 7) + return (

    ) {

    - + Revision {latest} @@ -76,27 +98,21 @@ export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) {

    Cite as: - {citation ? <>{citation} : <>eeXiv:{slug}} + {citation ? <>{citation} : <>eeXiv:{hash}}

    - +
    +
    +
    +
    + } > - - + +

    ) } + +export default DocumentViewer diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx new file mode 100644 index 0000000..95d23be --- /dev/null +++ b/src/app/document/view/[slug]/VersionChooser.tsx @@ -0,0 +1,89 @@ +'use client' +import { useState } from 'react' +import { Document } from '@/app/db/data' +import Link from 'next/link' +import { loadAuthors } from '@/app/db/loaders' +import { useSuspenseQuery } from '@tanstack/react-query' +import { epoch2date } from '@/app/utils/epoch2datestring' + +const VersionChooser = ({ + doc, + slug, +}: Readonly<{ doc: Document; slug: string }>) => { + const { data, error } = useSuspenseQuery({ + queryKey: ['authors_all'], + queryFn: () => { + const data = loadAuthors(doc.manifest.authors) + return data + }, + }) + if (error) throw error + + const { file } = doc + const { authors, latest } = doc.manifest + const date = epoch2date(doc.manifest.dates[doc.manifest.dates.length - 1]) + + const fileEnding = file === 'other' ? '' : `.${file}` + const [selectedRevision, setSelectedRevision] = useState(latest) // Initialize the selected revision with the latest revision + + return ( +
    + + + + + +
    + ) +} + +export default VersionChooser diff --git a/src/app/document/view/[slug]/loading.module.css b/src/app/document/view/[slug]/loading.module.css new file mode 100644 index 0000000..34cf148 --- /dev/null +++ b/src/app/document/view/[slug]/loading.module.css @@ -0,0 +1,31 @@ +.skeleton-box { + display: inline-block; + height: 1em; + position: relative; + overflow: hidden; + background-color: #dddbdd; + + &::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + transform: translateX(-100%); + background-image: linear-gradient( + 90deg, + rgba(#fff, 0) 0, + rgba(#fff, 0.2) 20%, + rgba(#fff, 0.5) 60%, + rgba(#fff, 0) + ); + animation: shimmer 5s infinite; + content: ''; + } + + @keyframes shimmer { + 100% { + transform: translateX(100%); + } + } +} diff --git a/src/app/document/view/[slug]/page.tsx b/src/app/document/view/[slug]/page.tsx index 6905223..2307200 100644 --- a/src/app/document/view/[slug]/page.tsx +++ b/src/app/document/view/[slug]/page.tsx @@ -1,13 +1,18 @@ +'use client' import DocumentViewer from './DocumentViewer' -import { documents } from '@/app/db/data' +import ErrorBoundary from '@/app/utils/ErrorBoundary' -export function generateStaticParams() { - const docsList = Object.keys(documents) - return docsList.map((doc) => ({ doc })) -} +// export function generateStaticParams() { +// const docsList = Object.keys(documents) +// return docsList.map((doc) => ({ doc })) +// } export default function Page({ params, }: Readonly<{ params: { slug: string } }>) { - return + return ( + + + + ) } diff --git a/src/app/globals.css b/src/app/globals.css index 678f2a8..3e7e485 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -20,6 +20,11 @@ a:hover { text-decoration: underline; } +option { + @apply font-sans; + @apply p-4; +} + .button-default { @apply bg-blue-600 text-slate-100 hover:bg-blue-400 font-semibold rounded py-2 px-4 my-2 shadow-sm shadow-slate-400; } diff --git a/src/app/help/accessibility/page.tsx b/src/app/help/accessibility/page.tsx index ab26783..83be830 100644 --- a/src/app/help/accessibility/page.tsx +++ b/src/app/help/accessibility/page.tsx @@ -1,7 +1,9 @@ export default function Page() { return (
    -

    Accessibility

    +

    + Accessibility +

    If you encounter any accessibility-related issues related to your use of our site, it is likely because of our jank code architecture. diff --git a/src/app/legal/copyright/page.tsx b/src/app/legal/copyright/page.tsx index 8c75ebd..88a94ca 100644 --- a/src/app/legal/copyright/page.tsx +++ b/src/app/legal/copyright/page.tsx @@ -2,7 +2,9 @@ import Link from 'next/link' export default function Page() { return (

    -

    Copyright

    +

    + Copyright +

    All content on this site is licensed under the{' '} diff --git a/src/app/legal/privacy/page.tsx b/src/app/legal/privacy/page.tsx index 2aa189f..4449421 100644 --- a/src/app/legal/privacy/page.tsx +++ b/src/app/legal/privacy/page.tsx @@ -1,7 +1,9 @@ export default function Page() { return (

    -

    Privacy Policy

    +

    + Privacy Policy +

    {`User privacy is important to us. Just kidding. We don't collect any personal information. We only use it to help us improve eeXiv. Your diff --git a/src/app/status/notifications/page.tsx b/src/app/status/notifications/page.tsx index 537d862..4e5d04d 100644 --- a/src/app/status/notifications/page.tsx +++ b/src/app/status/notifications/page.tsx @@ -3,12 +3,15 @@ import Link from 'next/link' export default function Page() { return (

    ) diff --git a/src/app/status/page.tsx b/src/app/status/page.tsx index b0b96df..4ff8f8a 100644 --- a/src/app/status/page.tsx +++ b/src/app/status/page.tsx @@ -6,7 +6,9 @@ export default function Page() { return (

    Status

    -

    +

    eeXiv is online. All systems{' '} operational.

    diff --git a/src/app/subscribe/page.tsx b/src/app/subscribe/page.tsx index c8d62d1..14c036c 100644 --- a/src/app/subscribe/page.tsx +++ b/src/app/subscribe/page.tsx @@ -1,7 +1,9 @@ export default function Page() { return (
    -

    Subscribe

    +

    + Subscribe +

    We currently do not have the technical support to implement mailing lists in eeXiv. Check back later for updates. The best way to stay diff --git a/src/app/utils/epoch2datestring.ts b/src/app/utils/epoch2datestring.ts index f595cff..e93b144 100644 --- a/src/app/utils/epoch2datestring.ts +++ b/src/app/utils/epoch2datestring.ts @@ -11,3 +11,7 @@ export function epoch2datestring(epoch: number): string { return formattedDate } + +export function epoch2date(epoch: number): Date { + return new Date(epoch * 1000) +}