Content display, requests and Google Workspace (v1.9.5 to v1.9.11-content-display) #15

Merged
ngu-git-admin merged 20 commits from content-display into main 2026-09-30 02:34:53 +01:00
7 changed files with 23 additions and 18 deletions
Showing only changes of commit 706abf6a03 - Show all commits

View file

@ -20,6 +20,7 @@
Tabs follow the ARIA tab pattern: arrow keys move between them.
═══════════════════════════════════════════════════════════════ */
import { CaretDown } from '@phosphor-icons/react'
import { useId, useState, type KeyboardEvent } from 'react'
import { Link } from 'react-router-dom'
@ -133,9 +134,11 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
className="h-8 w-8 shrink-0 rounded-full border text-sm transition-colors hover:bg-tint"
style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }}
>
<span aria-hidden="true" className={`inline-block transition-transform ${open ? 'rotate-180' : ''}`}>
▾
</span>
<CaretDown
aria-hidden="true"
weight="bold"
className={`mx-auto h-4 w-4 transition-transform ${open ? 'rotate-180' : ''}`}
/>
</button>
)}
</div>

View file

@ -29,6 +29,7 @@
cached list would lie.
═══════════════════════════════════════════════════════════════ */
import { FileAudio, X } from "@phosphor-icons/react";
import { useCallback, useEffect, useId, useRef, useState, type ReactNode } from "react";
import { ApiError, get, post, upload } from "../../lib/api.ts";
@ -214,8 +215,8 @@ export function MediaGrid({
// A still of the first frame; metadata only, not the file.
<video src={item.url} preload="metadata" muted className="h-full w-full bg-black object-contain" />
) : item.content_type.startsWith("audio/") ? (
<div className="flex h-full w-full items-center justify-center bg-tint text-3xl" aria-hidden="true">
♪
<div className="flex h-full w-full items-center justify-center bg-tint" aria-hidden="true">
<FileAudio weight="bold" className="h-10 w-10 text-link" />
</div>
) : (
<img
@ -305,9 +306,9 @@ export function MediaPicker({
type="button"
onClick={() => dialogRef.current?.close()}
aria-label="Close"
className="h-8 w-8 rounded-full text-muted hover:bg-tint"
className="flex h-8 w-8 items-center justify-center rounded-full text-muted hover:bg-tint"
>
✕
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
</button>
</div>

View file

@ -85,7 +85,7 @@
able to read and copy.
═══════════════════════════════════════════════════════════════ */
import { ArrowUp, ArrowDown, CaretRight } from "@phosphor-icons/react";
import { ArrowUp, ArrowDown, CaretRight, Copy, Plus, X } from "@phosphor-icons/react";
import { useRef, useState } from "react";
import { ApiError, post } from "../../lib/api.ts";
@ -652,20 +652,20 @@ export function Repeater({
label="Insert a new one below"
onClick={() => insertAt(index + 1, { ...spec.blank })}
>
+
<Plus size={14} weight="bold" aria-hidden="true" />
</IconButton>
<IconButton
label="Duplicate"
onClick={() => insertAt(index + 1, withoutIds(row))}
>
⧉
<Copy size={14} weight="bold" aria-hidden="true" />
</IconButton>
<IconButton
label="Remove"
danger
onClick={() => removeAt(index)}
>
✕
<X size={14} weight="bold" aria-hidden="true" />
</IconButton>
</div>
</div>
@ -733,7 +733,7 @@ function IconButton({ label, onClick, danger = false, disabled = false, children
aria-label={label}
title={label}
className={
"h-7 w-7 rounded-full border text-sm leading-none transition-colors " +
"flex h-7 w-7 items-center justify-center rounded-full border text-sm leading-none transition-colors " +
(disabled
? "cursor-default border-muted/20 text-muted/40"
: danger

View file

@ -20,6 +20,7 @@
The route guard and the API are what actually say no.
═══════════════════════════════════════════════════════════════ */
import { CaretDown } from "@phosphor-icons/react";
import { Suspense, useCallback, useEffect, useMemo, useState } from "react";
import { Link, NavLink, Outlet, useLocation, useNavigate } from "react-router-dom";
import { useAuth } from "../../lib/auth.tsx";
@ -54,9 +55,7 @@ function GroupMenu({ item, lit, pathname }) {
<NavLink to={target(item)} className={`flex items-center gap-1 ${link}`}>
{item.label}
{children.length > 1 && (
<span aria-hidden="true" className="text-[10px] opacity-60">
▾
</span>
<CaretDown aria-hidden="true" weight="bold" className="h-2.5 w-2.5 opacity-60" />
)}
</NavLink>

View file

@ -432,7 +432,7 @@ export default function QrCodeMaker() {
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-brand/10"
style={{ borderColor: BRAND, color: accentText(BRAND) }}
>
{copied ? 'Copied ✓' : 'Copy link'}
{copied ? 'Copied' : 'Copy link'}
</button>
</div>
</div>

View file

@ -1,3 +1,4 @@
import { CircleDashed } from '@phosphor-icons/react'
import {
decadeLabel,
withGapYears,
@ -44,7 +45,7 @@ export default function TimelineDecade({
{decade.blurb ? <p className="site-tl__decadeBlurb">{decade.blurb}</p> : null}
{decade.preProgram ? (
<p className="site-tl__gapNote">
<span aria-hidden="true">◌</span>
<CircleDashed aria-hidden="true" weight="bold" className="inline-block align-[-0.125em]" />
Before the program, kept for context, not part of our record
</p>
) : null}

View file

@ -1,3 +1,4 @@
import { CaretDown, CaretUp } from '@phosphor-icons/react'
import { useState } from 'react'
import type { GroupedYear, SortDirection } from '../../../lib/timeline.ts'
import TimelineYear from './TimelineYear.tsx'
@ -48,7 +49,7 @@ export default function TimelineUpcoming({
: `${count} ${count === 1 ? 'thing' : 'things'} still to come`}
</span>
<span className="site-tl__chevron" aria-hidden="true">
{open ? '▾' : '▴'}
{open ? <CaretDown weight="bold" /> : <CaretUp weight="bold" />}
</span>
</button>