Improve client accessibility and bump Harbor versions
This commit is contained in:
@@ -98,6 +98,15 @@ export async function copyText(text, options = {}) {
|
||||
await clipboard.writeText(text);
|
||||
}
|
||||
|
||||
export function accessTabForKey(tabs, current, key) {
|
||||
const index = tabs.indexOf(current);
|
||||
if (key === 'Home') return tabs[0];
|
||||
if (key === 'End') return tabs.at(-1);
|
||||
if (key === 'ArrowLeft') return tabs[(index - 1 + tabs.length) % tabs.length];
|
||||
if (key === 'ArrowRight') return tabs[(index + 1) % tabs.length];
|
||||
return current;
|
||||
}
|
||||
|
||||
export function subscriptionUsage(userInfo = {}) {
|
||||
const upload = Math.max(0, Number(userInfo.upload) || 0);
|
||||
const download = Math.max(0, Number(userInfo.download) || 0);
|
||||
|
||||
Reference in New Issue
Block a user