* Add tech sub

* Fix line break in RSS popover

---------

Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
ekzyis 2023-06-12 19:41:22 +02:00 committed by GitHub
parent e243c1c224
commit b890215b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 4 deletions

View File

@ -80,7 +80,7 @@ const handleThemeChange = (dark) => {
const RssPopover = (
<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'>
home
</a>
@ -93,6 +93,10 @@ const RssPopover = (
nostr
</a>
<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'>
jobs
</a>

View File

@ -218,7 +218,7 @@ export default function Header ({ sub }) {
onChange={(formik, e) => router.push(e.target.value === 'home' ? '/' : `/~${e.target.value}`)}
name='sub'
size='sm'
items={['home', 'bitcoin', 'nostr', 'jobs']}
items={['home', 'bitcoin', 'nostr', 'tech', 'jobs']}
/>
</Form>
</Nav.Item>

View File

@ -21,6 +21,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
<ul>
<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 tech related, put it in the tech sub.</li>
<li>If it's a job, put it in the jobs sub.</li>
</ul>
</div>
@ -43,7 +44,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
name='sub'
size='sm'
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}

View File

@ -84,7 +84,7 @@ export function advPostSchemaMembers (client) {
export function subSelectSchemaMembers (client) {
return {
sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr'], 'required')
sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr', 'tech'], 'required')
}
}

View File

@ -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;