From 6e49effb7fd8c122183d17881b66ea69044a51aa Mon Sep 17 00:00:00 2001 From: Team 1280 Programming Laptop <59985235+Team1280Programming@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:38:48 -0800 Subject: [PATCH 01/21] `npm run format` --- package-lock.json | 183 +++++++++++++++++++++++++- src/app/about/page.tsx | 5 +- src/app/components/News.tsx | 13 +- src/app/help/accessibility/page.tsx | 4 +- src/app/legal/copyright/page.tsx | 4 +- src/app/legal/privacy/page.tsx | 4 +- src/app/page.tsx | 4 +- src/app/status/notifications/page.tsx | 11 +- src/app/status/page.tsx | 4 +- src/app/subscribe/page.tsx | 4 +- 10 files changed, 215 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2948213..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", @@ -1001,13 +1059,13 @@ "version": "15.7.11", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", - "dev": true + "devOptional": true }, "node_modules/@types/react": { "version": "18.2.55", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", - "dev": true, + "devOptional": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1027,7 +1085,7 @@ "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", - "dev": true + "devOptional": true }, "node_modules/@typescript-eslint/parser": { "version": "6.21.0", @@ -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", @@ -1759,7 +1836,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true + "devOptional": true }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -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", @@ -4344,6 +4429,13 @@ "node": ">=8.10.0" } }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "dev": true, + "peer": true + }, "node_modules/reflect.getprototypeof": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", @@ -5022,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", @@ -5236,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", @@ -5455,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() {
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 (
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 (
{`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/page.tsx b/src/app/page.tsx
index 1132f39..7e41dbd 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -45,7 +45,9 @@ export default function Home() {
We currently do not have the technical support to implement mailing
- lists in eeXiv. Check status frequently for updates.
- The best way to stay connected with the status of the eeXiv project is
- to watch it on GitHub.
+ lists in eeXiv. Check status frequently for
+ updates. The best way to stay connected with the status of the eeXiv
+ project is to watch it on{' '}
+ GitHub.
+
eeXiv is online. All systems{' '}
operational.
We currently do not have the technical support to implement mailing
lists in eeXiv. Check back later for updates. The best way to stay
From 9445a624ad7811f1969c7433e2d7eb636a6f00d6 Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:38:54 -0800
Subject: [PATCH 02/21] Add document version chooser
---
.../document/view/[slug]/DocumentViewer.tsx | 33 +++-------
.../document/view/[slug]/VersionChooser.tsx | 62 +++++++++++++++++++
src/app/globals.css | 5 ++
3 files changed, 77 insertions(+), 23 deletions(-)
create mode 100644 src/app/document/view/[slug]/VersionChooser.tsx
diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx
index 4ecb327..e79fea9 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'
+import { documents } from '@/app/db/data'
import { Zilla_Slab } from 'next/font/google'
import { epoch2datestring } from '@/app/utils/epoch2datestring'
import {
@@ -11,11 +11,14 @@ import {
import { ItemBadge, Status } from '@/app/components/Badges'
import Link from 'next/link'
import { notFound } from 'next/navigation'
+import VersionChooser from './VersionChooser'
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
-export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) {
- const { manifest, abstract, file, citation } = documents[slug]
+const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => {
+ const doc = documents[slug]
+ const { manifest, abstract, file, citation } = doc
+
if (!manifest) return notFound()
const {
title,
@@ -51,7 +54,7 @@ export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) {
Cite as:
- {citation ? <>{citation}> : <>eeXiv:{slug}>}
+ {citation ? <>{citation}> : <>eeXiv:{hash}>}
Privacy Policy
+
+ Privacy Policy
+
-
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 (
Get status notifications
+
+ Get status notifications
+
Status
- Subscribe
+
+ Subscribe
+
- 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 e79fea9..0532e37 100644
--- a/src/app/document/view/[slug]/DocumentViewer.tsx
+++ b/src/app/document/view/[slug]/DocumentViewer.tsx
@@ -9,7 +9,6 @@ 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'
@@ -17,7 +16,7 @@ const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => {
const doc = documents[slug]
- const { manifest, abstract, file, citation } = doc
+ const { manifest, abstract, citation } = doc
if (!manifest) return notFound()
const {
diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx
index 918e1ee..55f3027 100644
--- a/src/app/document/view/[slug]/VersionChooser.tsx
+++ b/src/app/document/view/[slug]/VersionChooser.tsx
@@ -9,16 +9,7 @@ const VersionChooser = ({
}: Readonly<{ doc: Document; slug: string }>) => {
const { file } = doc
const {
- title,
- authors,
- topics,
- dates,
- references,
- code,
- type,
latest,
- reviewers,
- status,
} = doc.manifest
const fileEnding = file === 'other' ? '' : `.${file}`
From 81b3e029264816260da9e126f03fefdb0b0cfeb8 Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:45:38 -0800
Subject: [PATCH 07/21] Fix autocommit in style workflow
---
.github/workflows/style.yml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index f055c56..934596c 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -1,6 +1,6 @@
name: npm run format
-on: [push]
+on: [push, manual_dispatch]
jobs:
style:
@@ -14,12 +14,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: stefanzweifel/git-auto-commit-action@v5
- with:
- commit_message: "style: format"
+
- 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"
From 6039e8fbdc3cd119dbbdddad2d8dbde13bfe3e4e Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:46:28 -0800
Subject: [PATCH 08/21] Fix manual dispatch name in workflow
---
.github/workflows/style.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 934596c..777a915 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -1,6 +1,6 @@
name: npm run format
-on: [push, manual_dispatch]
+on: [push, workflow_dispatch]
jobs:
style:
From 4a5649a83297aa5e2ff58fda9169339b74c921e0 Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:48:05 -0800
Subject: [PATCH 09/21] Give style workflow permission to update workflows
---
.github/workflows/style.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 777a915..475b4b1 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -11,6 +11,7 @@ jobs:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
+ workflows: write
steps:
- uses: actions/checkout@v4
From 63d34e475a273489369a1f67132ade495fa9c5db Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:48:50 -0800
Subject: [PATCH 10/21] YAML issue?
---
.github/workflows/style.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 475b4b1..7c19a86 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -10,8 +10,8 @@ jobs:
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
- contents: write
- workflows: write
+ - contents: write
+ - workflows: write
steps:
- uses: actions/checkout@v4
From 929908d6e32de7e6593ea92108512e8ff4578c51 Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:49:59 -0800
Subject: [PATCH 11/21] I give up
---
.github/workflows/style.yml | 3 +--
.prettierrc | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 7c19a86..777a915 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -10,8 +10,7 @@ jobs:
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
- - contents: write
- - workflows: write
+ contents: write
steps:
- uses: actions/checkout@v4
diff --git a/.prettierrc b/.prettierrc
index c5b38cc..6dae609 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -8,5 +8,6 @@
"jsxSingleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": false,
- "arrowParens": "always"
+ "arrowParens": "always",
+ "disableLanguages": ["yaml"]
}
From a388035ce7fc0b8fb518557dfdc87d1d6e510295 Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 16:52:16 -0800
Subject: [PATCH 12/21] Don't trust Codeium
But I trusted Codeium again
---
.prettierignore | 1 +
.prettierrc | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
create mode 100644 .prettierignore
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..1cda54b
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+*.yml
diff --git a/.prettierrc b/.prettierrc
index 6dae609..c5b38cc 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -8,6 +8,5 @@
"jsxSingleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": false,
- "arrowParens": "always",
- "disableLanguages": ["yaml"]
+ "arrowParens": "always"
}
From aef3211beebd2b58f100641aab64a92b380a986a Mon Sep 17 00:00:00 2001
From: Team1280Programming
-
{authorsDocuments.length > 0 && (
<>
+
+
Published documents
From 442484438eede796b0796f96f5b46b43460121cc Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 18:10:51 -0800
Subject: [PATCH 15/21] Remove comments in data
---
src/app/db/data.ts | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/src/app/db/data.ts b/src/app/db/data.ts
index a5a1c73..6e4d5db 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
From 6fd3a94fac5fb8ba036990e609d5fc9cdc6ee633 Mon Sep 17 00:00:00 2001
From: Team 1280 Programming Laptop
<59985235+Team1280Programming@users.noreply.github.com>
Date: Wed, 14 Feb 2024 18:11:07 -0800
Subject: [PATCH 16/21] Enable BibTeX export
---
src/app/db/loaders.ts | 6 +--
.../document/view/[slug]/DocumentViewer.tsx | 10 ++++-
.../document/view/[slug]/VersionChooser.tsx | 42 ++++++++++++++++++-
src/app/utils/epoch2datestring.ts | 4 ++
4 files changed, 54 insertions(+), 8 deletions(-)
diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts
index 2af5727..7f5ecea 100644
--- a/src/app/db/loaders.ts
+++ b/src/app/db/loaders.ts
@@ -83,11 +83,7 @@ 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
}
})
}
diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx
index 0532e37..6066257 100644
--- a/src/app/document/view/[slug]/DocumentViewer.tsx
+++ b/src/app/document/view/[slug]/DocumentViewer.tsx
@@ -11,6 +11,7 @@ import {
import { ItemBadge, Status } from '@/app/components/Badges'
import { notFound } from 'next/navigation'
import VersionChooser from './VersionChooser'
+import crypto from 'crypto'
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
@@ -32,6 +33,13 @@ const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => {
status,
} = manifest
+ // git style hash
+ const hash = crypto
+ .createHash('sha256')
+ .update(slug)
+ .digest('hex')
+ .substring(0, 7)
+
return (
) => {