PageSourceSearch

https://modrinth.com/_nuxt/BBxJebvp.js

js modrinth.com collected 2026-10-01 10:41:06 UTC 2,838 bytes, 3 lines download raw bytes

1import{V as M,aU as w,aV as L,aW as S,u as C,aX as x,b2 as D,a as r,b as l,j as t,k as e,F as v,y as N,bn as V,o,eI as y,q as c,p as A,bl as _,m as B,n as T,v as q,a7 as I,_ as F,U,b9 as j,l as O,ba as Q}from"./DUququmF.js";import{u as R}from"./iLXYiTCR.js";import{u as $}from"./_elIokNk.js";const H={class:"universal-card"},K={class:"text-2xl"},P={class:"preserve-lines"},X={class:"input-group"},z={key:0},E={__name:"sessions",setup(W){const g=w(),k=L(),{addNotification:h}=S(),{formatMessage:a}=C(),m=R(),f=$({timeStyle:"short",dateStyle:"long"}),i=U({currentSessionLabel:{id:"settings.sessions.current-session",defaultMessage:"Current session"},revokeSessionButton:{id:"settings.sessions.action.revoke-session",defaultMessage:"Revoke session"},createdAgoLabel:{id:"settings.sessions.created-ago",defaultMessage:"Created {ago}"},sessionsDescription:{id:"settings.sessions.description",defaultMessage:`Here are all the devices that are currently logged in with your Modrinth account. You can log out of each one individually.
2
3If you see an entry you don't recognize, log out of that device and change your Modrinth account password immediately.`},lastAccessedAgoLabel:{id:"settings.sessions.last-accessed-ago",defaultMessage:"Last accessed {ago}"},unknownOsLabel:{id:"settings.sessions.unknown-os",defaultMessage:"Unknown OS"},unknownPlatformLabel:{id:"settings.sessions.unknown-platform",defaultMessage:"Unknown platform"}});x({title:()=>`${a(y.sessions)} - Modrinth`});const{data:d}=D({queryKey:["session","list"],queryFn:()=>g.labrinth.sessions_v2.list()});async function b(u){j();try{d.value=d.value.filter(n=>n.id!==u),await g.labrinth.sessions_v2.delete(u),await k.invalidateQueries({queryKey:["session","list"]})}catch(n){h({title:a(O.errorNotificationTitle),text:n.data?n.data.description:n,type:"error"})}Q()}return(u,n)=>{const p=V("tooltip");return o(),r("div",H,[l("h2",K,t(e(a)(e(y).sessions)),1),l("p",P,t(e(a)(e(i).sessionsDescription)),1),(o(!0),r(v,null,N(e(d),s=>
3(o(),r("div",{key:s.id,class:"universal-card recessed session mt-4"},[l("div",null,[l("div",null,[l("strong",null,t(s.os??e(a)(e(i).unknownOsLabel))+" ⋅ "+t(s.platform??e(a)(e(i).unknownPlatformLabel))+" ⋅ "+t(s.ip),1)]),l("div",null,[s.city?(o(),r(v,{key:0},[c(t(s.city)+", "+t(s.country)+" ⋅ ",1)],64)):A("",!0),_((o(),r("span",null,[c(t(e(a)(e(i).lastAccessedAgoLabel,{ago:e(m)(s.last_login)})),1)])),[[p,e(f)(s.last_login)]]),n[0]||(n[0]=c(" ⋅ ",-1)),_((o(),r("span",null,[c(t(e(a)(e(i).createdAgoLabel,{ago:e(m)(s.created)})),1)])),[[p,e(f)(s.created)]])])]),l("div",X,[s.current?(o(),r("i",z,t(e(a)(e(i).currentSessionLabel)),1)):(o(),B(e(F),{key:1,onClick:Y=>b(s.id)},{default:T(()=>[q(e(I)),c(" "+t(e(a)(e(i).revokeSessionButton)),1)]),_:1},8,["onClick"]))])]))),128))])}}},ee=M(E,[["__scopeId","data-v-e2a83794"]]);export{ee as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.