Download mathly2/static/access.js from wzender/mathly: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/spaces/wzender/mathly/resolve/main/mathly2/static/access.js
- Command line
-
hf download hf://spaces/wzender/mathly/mathly2/static/access.js
-
curl -L -o access.js https://huggingface.co/spaces/wzender/mathly/resolve/main/mathly2/static/access.js
707 Bytes
| // "My access": the signed-in account's own roles and what each allows (open to every account). | |
| import { esc } from "./math.js"; | |
| import { ROLE_ALLOWS, ROLE_NAMES, visibleRoles } from "./roles.js"; | |
| export async function show(me, view) { | |
| const held = visibleRoles(me.roles).filter(role => me.roles.includes(role)); | |
| view(`<section class="card" id="my-access"><h2>讛讛专砖讗讜转 砖诇讬</h2> | |
| <p class="muted" dir="ltr">${esc(me.email)}</p> | |
| <ul class="plain">${held.map(role => `<li><b>${ROLE_NAMES[role]}</b><span>${ROLE_ALLOWS[role]}</span></li>`).join("")}</ul> | |
| ${me.roles.includes("developer") ? "" : `<p class="muted">转驻拽讬讚 讞讚砖 谞讜转谉 诪谞讛诇 讛讛专砖讗讜转.</p>`}</section>`); | |
| } | |