Separate new requests from request tracking
This commit is contained in:
@@ -326,7 +326,7 @@ const SETTING_LABEL_OVERRIDES: Record<string, string> = {
|
||||
site_login_show_local_login: 'Login page: local Magent sign-in',
|
||||
site_login_show_forgot_password: 'Login page: forgot password',
|
||||
site_login_show_signup_link: 'Login page: invite signup link',
|
||||
site_nav_show_requests: 'Top navigation: Requests',
|
||||
site_nav_show_requests: 'Top navigation: New Requests',
|
||||
log_file_max_bytes: 'Log file max size (bytes)',
|
||||
log_file_backup_count: 'Rotated log files to keep',
|
||||
log_http_client_level: 'Service HTTP log level',
|
||||
@@ -357,7 +357,7 @@ const labelFromKey = (key: string) =>
|
||||
.replace('site banner enabled', 'Sitewide banner enabled')
|
||||
.replace('site banner message', 'Sitewide banner message')
|
||||
.replace('site banner tone', 'Sitewide banner tone')
|
||||
.replace('site nav show requests', 'Top navigation: Requests')
|
||||
.replace('site nav show requests', 'Top navigation: New Requests')
|
||||
.replace('site changelog', 'Changelog text')
|
||||
|
||||
const formatBytes = (value?: number | null) => {
|
||||
@@ -869,7 +869,7 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
site_login_show_forgot_password: 'Show the forgot-password link on the login page.',
|
||||
site_login_show_signup_link: 'Show the invite signup link on the login page.',
|
||||
site_nav_show_requests:
|
||||
'Show the Requests item in the top navigation. Disable during beta while request routing is being reworked.',
|
||||
'Show the New Requests item in the top navigation. Disable it while request creation is unavailable.',
|
||||
site_changelog: 'One update per line for the public changelog.',
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { authFetch, clearToken, getApiBase, getToken } from '../../lib/auth'
|
||||
import { authFetch, clearToken, getApiBase, getToken } from '../lib/auth'
|
||||
|
||||
type MediaType = 'movie' | 'tv'
|
||||
|
||||
@@ -99,7 +99,7 @@ const formatDuration = (milliseconds?: number | null) => {
|
||||
return `${(milliseconds / 1000).toFixed(1)} s`
|
||||
}
|
||||
|
||||
export default function RequestPortalClient() {
|
||||
export default function NewRequestClient() {
|
||||
const router = useRouter()
|
||||
const searchSectionRef = useRef<HTMLElement | null>(null)
|
||||
const resultsSectionRef = useRef<HTMLElement | null>(null)
|
||||
@@ -311,7 +311,7 @@ export default function RequestPortalClient() {
|
||||
<main className="card request-portal-page">
|
||||
<header className="request-portal-hero">
|
||||
<div>
|
||||
<span className="section-kicker">Request portal</span>
|
||||
<span className="section-kicker">New requests</span>
|
||||
<h1>Find something worth watching.</h1>
|
||||
<p>Choose what you want, find the right title, then tailor the request before it goes to Seerr.</p>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
import NewRequestClient from './NewRequestClient'
|
||||
|
||||
export const metadata = {
|
||||
title: 'New Requests | Magent',
|
||||
}
|
||||
|
||||
export default function NewRequestsPage() {
|
||||
return <NewRequestClient />
|
||||
}
|
||||
@@ -253,7 +253,7 @@ export default function HomePage() {
|
||||
<section className="home-command">
|
||||
<div className="home-command-copy">
|
||||
<span className="section-kicker">Request lookup</span>
|
||||
<h1>Find a media request</h1>
|
||||
<h1>My requests</h1>
|
||||
<p>
|
||||
Enter a title and year, or jump straight to a request using its request number.
|
||||
</p>
|
||||
|
||||
@@ -692,10 +692,10 @@ export default function PortalClient({ workspace }: PortalClientProps) {
|
||||
<button
|
||||
type="button"
|
||||
className={workspace === 'request' ? 'is-active' : ''}
|
||||
onClick={() => router.push('/portal/requests')}
|
||||
onClick={() => router.push('/new-requests')}
|
||||
disabled={workspace === 'request'}
|
||||
>
|
||||
Requests
|
||||
New requests
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export default function PortalIndexPage() {
|
||||
redirect('/portal/requests')
|
||||
redirect('/new-requests')
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import RequestPortalClient from './RequestPortalClient'
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export default function RequestPortalPage() {
|
||||
return <RequestPortalClient />
|
||||
redirect('/new-requests')
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ const NAV_GROUPS = [
|
||||
items: [
|
||||
{ href: '/admin', label: 'Overview' },
|
||||
{ href: '/admin/diagnostics', label: 'System health' },
|
||||
{ href: '/portal/requests', label: 'Request portal' },
|
||||
{ href: '/new-requests', label: 'New requests' },
|
||||
{ href: '/admin/issues', label: 'Issue tracking' },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -75,13 +75,17 @@ export default function HeaderActions() {
|
||||
]
|
||||
|
||||
const commonItems = [
|
||||
{ href: '/', label: 'Health', match: (path: string) => path === '/' },
|
||||
{
|
||||
href: '/',
|
||||
label: 'My Requests',
|
||||
match: (path: string) => path === '/' || path.startsWith('/requests/'),
|
||||
},
|
||||
...(showRequestsNav
|
||||
? [
|
||||
{
|
||||
href: '/portal/requests',
|
||||
label: 'Requests',
|
||||
match: (path: string) => path === '/portal/requests' || path.startsWith('/requests/'),
|
||||
href: '/new-requests',
|
||||
label: 'New Requests',
|
||||
match: (path: string) => path === '/new-requests',
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
||||
Reference in New Issue
Block a user