-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into anon_webln_qr_fallback
- Loading branch information
Showing
25 changed files
with
1,170 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: extend-awards | ||
run-name: Extending awards | ||
on: | ||
pull_request: | ||
types: [ closed ] | ||
branches: | ||
- master | ||
jobs: | ||
unfiltered: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo '${{ toJson(github) }}' | ||
if_merged: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
- run: pip install requests | ||
- run: python extend-awards.py '${{ toJson(github) }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: peter-evans/create-pull-request@v7 | ||
with: | ||
commit-message: extending awards | ||
title: Extending awards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ Go to [localhost:3000](http://localhost:3000). | |
- ssh: `git clone [email protected]:stackernews/stacker.news.git` | ||
- https: `git clone https://github.com/stackernews/stacker.news.git` | ||
- Install [docker](https://docs.docker.com/compose/install/) | ||
- If you're running MacOS or Windows, I ***highly recommend*** using [OrbStack](https://orbstack.dev/) instead of Docker Desktop | ||
- Please make sure that at least 10 GB of free space is available, otherwise you may encounter issues while setting up the development environment. | ||
|
||
<br> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,3 +175,6 @@ SatsAllDay,issue,#1820,#1819,easy,,,1,9k,[email protected],2025-01-27 | |
Soxasora,pr,#1814,#1736,easy,,,,100k,[email protected],2025-01-27 | ||
jason-me,pr,#1857,,easy,,,,100k,[email protected],2025-02-08 | ||
ed-kung,pr,#1901,#323,good-first-issue,,,,20k,[email protected],2025-02-14 | ||
Scroogey-SN,pr,#1911,#1905,good-first-issue,,,1,18k,???,??? | ||
Scroogey-SN,pr,#1928,#1924,good-first-issue,,,,20k,???,??? | ||
dtonon,issue,#1928,#1924,good-first-issue,,,,2k,???,??? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import { useRouter } from 'next/router' | ||
import { Select, DatePicker } from './form' | ||
import { useSubs } from './sub-select' | ||
import { WHENS } from '@/lib/constants' | ||
import { whenToFrom } from '@/lib/time' | ||
import styles from './sub-select.module.css' | ||
import classNames from 'classnames' | ||
|
||
export function SubAnalyticsHeader ({ pathname = null }) { | ||
const router = useRouter() | ||
|
||
const path = pathname || 'stackers' | ||
|
||
const select = async values => { | ||
const { sub, when, ...query } = values | ||
|
||
if (when !== 'custom') { delete query.from; delete query.to } | ||
if (query.from && !query.to) return | ||
|
||
await router.push({ | ||
|
||
pathname: `/${path}/${sub}/${when}`, | ||
query | ||
}) | ||
} | ||
|
||
const when = router.query.when || 'day' | ||
const sub = router.query.sub || 'all' | ||
|
||
const subs = useSubs({ prependSubs: ['all'], sub, appendSubs: [], filterSubs: () => true }) | ||
|
||
return ( | ||
<div className='text-muted fw-bold my-0 d-flex align-items-center flex-wrap'> | ||
<div className='text-muted fw-bold mb-2 d-flex align-items-center'> | ||
stacker analytics in | ||
<Select | ||
groupClassName='mb-0 mx-2' | ||
className={classNames(styles.subSelect, styles.subSelectSmall)} | ||
name='sub' | ||
size='sm' | ||
items={subs} | ||
value={sub} | ||
noForm | ||
onChange={(formik, e) => { | ||
const range = when === 'custom' ? { from: router.query.from, to: router.query.to } : {} | ||
select({ sub: e.target.value, when, ...range }) | ||
}} | ||
/> | ||
for | ||
<Select | ||
groupClassName='mb-0 mx-2' | ||
className='w-auto' | ||
name='when' | ||
size='sm' | ||
items={WHENS} | ||
value={when} | ||
noForm | ||
onChange={(formik, e) => { | ||
const range = e.target.value === 'custom' ? { from: whenToFrom(when), to: Date.now() } : {} | ||
select({ sub, when: e.target.value, ...range }) | ||
}} | ||
/> | ||
</div> | ||
{when === 'custom' && | ||
<DatePicker | ||
noForm | ||
fromName='from' | ||
toName='to' | ||
className='p-0 px-2 mb-0' | ||
onChange={(formik, [from, to], e) => { | ||
select({ sub, when, from: from.getTime(), to: to.getTime() }) | ||
}} | ||
from={router.query.from} | ||
to={router.query.to} | ||
when={when} | ||
/>} | ||
</div> | ||
) | ||
} |
Oops, something went wrong.