chore: initialize frontend repo with teaching terminology updates

Add the current frontend codebase with a baseline .gitignore and update piano-specific UI terms to teaching-oriented terms for the current product context.

Made-with: Cursor
This commit is contained in:
2026-04-23 16:37:14 +08:00
commit a661e439a0
216 changed files with 50419 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const log = require('./log.js')
function shortTail(s, tailLen) {
tailLen = tailLen || 8
if (!s) return ''
var t = String(s)
return t.length <= tailLen ? t : '…' + t.slice(-tailLen)
}
function logWeapp(phase, payload) {
try {
var line = typeof payload === 'string' ? payload : JSON.stringify(payload)
if (line.length > 1500) {
line = line.slice(0, 1500) + '…(truncated)'
}
log.info('[HtyWeapp]', phase, line)
} catch (err) {
log.info('[HtyWeapp]', phase, String(payload))
}
}
module.exports = {
shortTail: shortTail,
logWeapp: logWeapp
}