Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Add lofi/focus music toggle in Pomodoro timer🎵

未關閉 適合新手
#648 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
68/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript, react
領域
frontend

研究方向

從 issue 中提到的檔案 client/src/components/Pomodoro/PomodoroTimer.jsx 開始,檢查計時器如何呈現控制項以及管理元件狀態。使用 issue 中描述的 Web Audio API 方法新增環境音切換功能;完成標準是無須額外套件即可開啟和關閉環境音,且計時器仍可正常使用。

由索引模型根據 Issue 內容生成。

描述

enhancement good first issue

Add lofi/focus music toggle in Pomodoro timer

File: client/src/components/Pomodoro/PomodoroTimer.jsx

Pomodoro timer runs silently 💀
Add ambient focus sounds using Web Audio fr!!

Fix: generate lofi-style ambient tone:
const playAmbient = () => {
const ctx = new AudioContext()

// create soft rain-like white noise:
const bufferSize = 2 * ctx.sampleRate
const buffer = ctx.createBuffer(
1, bufferSize, ctx.sampleRate
)
const data = buffer.getChannelData(0)
for (let i = 0; i < bufferSize; i++) {
data[i] = Math.random() * 2 - 1
}

const source = ctx.createBufferSource()
source.buffer = buffer
source.loop = true

// lowpass filter for "rain" effect:
const filter = ctx.createBiquadFilter()
filter.type = 'lowpass'
filter.frequency.value = 400

const gain = ctx.createGain()
gain.gain.value = 0.05 // very quiet

source.connect(filter)
filter.connect(gain)
gain.connect(ctx.destination)
source.start()

return { source, ctx }
}

const [ambient, setAmbient] = useState(null)

const toggleAmbient = () => {
if (ambient) {
ambient.source.stop()
ambient.ctx.close()
setAmbient(null)
} else {
setAmbient(playAmbient())
}
}

<button onClick={toggleAmbient}
className={text-xs transition ${ambient ? 'text-green-400' : 'text-[#555]'}}>
{ambient ? '🎵 on' : '🎵 off'}

Zero packages — pure Web Audio API ✅
~30 lines! No backend needed 🎯
People will use DevBoard JUST for this!! 🔥

主要語言
JavaScript
星號
39
分支
105
平均合併
1 天 11 小時
30 天內合併 PR
47

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

anoopcodehack/DevBoard 的其他 Issue

查看 anoopcodehack/DevBoard 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。