Tech sub (#311)
* Add tech sub * Fix line break in RSS popover --------- Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
parent
e243c1c224
commit
b890215b98
|
@ -80,7 +80,7 @@ const handleThemeChange = (dark) => {
|
||||||
|
|
||||||
const RssPopover = (
|
const RssPopover = (
|
||||||
<Popover>
|
<Popover>
|
||||||
<Popover.Content style={{ fontWeight: 500, fontSize: '.9rem' }}>
|
<Popover.Content className='d-flex' style={{ fontWeight: 500, fontSize: '.9rem' }}>
|
||||||
<a href='/rss' className='nav-link p-0 d-inline-flex'>
|
<a href='/rss' className='nav-link p-0 d-inline-flex'>
|
||||||
home
|
home
|
||||||
</a>
|
</a>
|
||||||
|
@ -93,6 +93,10 @@ const RssPopover = (
|
||||||
nostr
|
nostr
|
||||||
</a>
|
</a>
|
||||||
<span className='mx-2 text-muted'> \ </span>
|
<span className='mx-2 text-muted'> \ </span>
|
||||||
|
<a href='/~tech/rss' className='nav-link p-0 d-inline-flex'>
|
||||||
|
tech
|
||||||
|
</a>
|
||||||
|
<span className='mx-2 text-muted'> \ </span>
|
||||||
<a href='/~jobs/rss' className='nav-link p-0 d-inline-flex'>
|
<a href='/~jobs/rss' className='nav-link p-0 d-inline-flex'>
|
||||||
jobs
|
jobs
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -218,7 +218,7 @@ export default function Header ({ sub }) {
|
||||||
onChange={(formik, e) => router.push(e.target.value === 'home' ? '/' : `/~${e.target.value}`)}
|
onChange={(formik, e) => router.push(e.target.value === 'home' ? '/' : `/~${e.target.value}`)}
|
||||||
name='sub'
|
name='sub'
|
||||||
size='sm'
|
size='sm'
|
||||||
items={['home', 'bitcoin', 'nostr', 'jobs']}
|
items={['home', 'bitcoin', 'nostr', 'tech', 'jobs']}
|
||||||
/>
|
/>
|
||||||
</Form>
|
</Form>
|
||||||
</Nav.Item>
|
</Nav.Item>
|
||||||
|
|
|
@ -21,6 +21,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
|
||||||
<ul>
|
<ul>
|
||||||
<li>If it's bitcoin related, put it in the bitcoin sub.</li>
|
<li>If it's bitcoin related, put it in the bitcoin sub.</li>
|
||||||
<li>If it's nostr related, put it in the nostr sub.</li>
|
<li>If it's nostr related, put it in the nostr sub.</li>
|
||||||
|
<li>If it's tech related, put it in the tech sub.</li>
|
||||||
<li>If it's a job, put it in the jobs sub.</li>
|
<li>If it's a job, put it in the jobs sub.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +44,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
|
||||||
name='sub'
|
name='sub'
|
||||||
size='sm'
|
size='sm'
|
||||||
defaultValue={props.noForm ? sub : undefined}
|
defaultValue={props.noForm ? sub : undefined}
|
||||||
items={props.noForm ? ['pick sub', 'bitcoin', 'nostr', 'jobs'] : item ? ['bitcoin', 'nostr'] : ['pick sub', 'bitcoin', 'nostr']}
|
items={props.noForm ? ['pick sub', 'bitcoin', 'nostr', 'tech', 'jobs'] : item ? ['bitcoin', 'nostr', 'tech'] : ['pick sub', 'bitcoin', 'nostr', 'tech']}
|
||||||
label={label &&
|
label={label &&
|
||||||
<>
|
<>
|
||||||
{label}
|
{label}
|
||||||
|
|
|
@ -84,7 +84,7 @@ export function advPostSchemaMembers (client) {
|
||||||
|
|
||||||
export function subSelectSchemaMembers (client) {
|
export function subSelectSchemaMembers (client) {
|
||||||
return {
|
return {
|
||||||
sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr'], 'required')
|
sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr', 'tech'], 'required')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
INSERT INTO "Sub" ("name", "desc", "postTypes", "rankingType")
|
||||||
|
VALUES ('tech', 'everything tech related', '{LINK,DISCUSSION,POLL,BOUNTY}', 'WOT') ON CONFLICT DO NOTHING;
|
Loading…
Reference in New Issue