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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user