Skip to content

Commit

Permalink
Merge pull request #16910 from johndoknjas/mobile-view-challenger
Browse files Browse the repository at this point in the history
On mobile in the lobby, allow easy viewing of a challenger's profile
  • Loading branch information
ornicar authored Feb 2, 2025
2 parents 7117078 + b692c3f commit 4b4f968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ui/lobby/src/view/realTime/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function renderHook(ctrl: LobbyController, hook: Hook) {
},
tds([
hook.rating
? h('span.ulink.ulpt', { attrs: { 'data-href': '/@/' + hook.u } }, hook.u)
? h('span.ulink.ulpt.mobile-powertip', { attrs: { 'data-href': '/@/' + hook.u } }, hook.u)
: i18n.site.anonymous,
hook.rating && ctrl.opts.showRatings ? hook.rating + (hook.prov ? '?' : '') : '',
hook.clock,
Expand Down
7 changes: 3 additions & 4 deletions ui/site/src/powertip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ const imagePowertip = (el: HTMLElement) =>
});

function powerTipWith(el: HTMLElement, ev: Event, f: (el: HTMLElement) => void) {
if (!('ontouchstart' in window)) {
f(el);
$.powerTip.show(el, ev);
}
if ('ontouchstart' in window && !el.classList.contains('mobile-powertip')) return;
f(el);
$.powerTip.show(el, ev);
}

function onIdleForAll(par: HTMLElement, sel: string, f: (el: HTMLElement) => void) {
Expand Down

0 comments on commit 4b4f968

Please sign in to comment.