PageSourceSearch

https://metropol-mediensuche.de/assets/scheduler--aPvXNnZ.js

js metropol-mediensuche.de collected 2026-10-07 04:13:15 UTC 5,107 bytes, 1 lines download raw bytes

1import{d as G,u as H,s as Q,y as M,bj as J,o as s,f as _,e,c,M as B,w as t,i as l,t as r,j as u,b as a,V as K,O as z,p as d,z as U,x as W,G as X,J as w,I as R,h as L,C as P,F as A,K as j,r as q,L as D,bv as Y,bt as Z,l as E}from"./index-Dvevn98Y.js";import{h as ee}from"./humanize-duration-iZfkBnMG.js";import{_ as te}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ae={"data-testid":"sk-scheduler-account-refresh"},re=G({__name:"SkSchedulerAccountRefresh",props:{accountRefresh:{},account:{}},setup(T){const n=T,{t:f,locale:p}=H(),y=Q(),{libraries:k}=M(y),{findLibraryAccount:b}=y,{maxAllowedFails:v}=J(),o=d(()=>n.accountRefresh?.userId??""),$=d(()=>k.value.find(V=>n.accountRefresh.libraryId===V.id)?.libname??""+n.accountRefresh.libraryId),g=d(()=>n.accountRefresh.errorCount??0),S=d(()=>n.accountRefresh.lastSuccess?.toLocaleString(p.value)),I=d(()=>n.accountRefresh.lastFail?.toLocaleString(p.value)),x=d(()=>n.account??b(n.accountRefresh)),C=d(()=>x.value?.name??"");return(V,F)=>(s(),_("div",ae,[e(C)?(s(),c(B,{key:0,class:"font-weight-bold"},{default:t(()=>[l(r(e(C)),1)]),_:1})):u("",!0),a(B,null,{default:t(()=>[l(r(e($)),1)]),_:1}),a(B,{class:"mb-1"},{default:t(()=>[l(r(e(o)),1)]),_:1}),e(x)?u("",!0):(s(),c(K,{key:1,class:"mb-2",density:"compact",type:"warning",variant:"outlined"},{default:t(()=>[l(r(e(f)("scheduler.account-missing")),1)]),_:1})),e(S)?(s(),c(z,{key:2,class:"text-success font-weight-bold"},{default:t(()=>[l(r(e(f)("scheduler.lastSuccess"))+": "+r(e(S)),1)]),_:1})):u("",!0),e(I)?(s(),c(z,{key:3,class:"text-error font-weight-bold"},{default:t(()=>[l(r(e(f)("scheduler.lastFail"))+": "+r(e(I)),1)]),_:1})):u("",!0),e(g)>0?(s(),c(z,{key:4,class:"text-error font-weight-bold"},{default:t(()=>[l(r(e(f)("scheduler.retries"))+": "+r(e(g))+" / "+r(e(v)),1)]),_:1})):u("",!0)]))}}),se=G({__name:"SkScheduler",setup(T){const n=J(),{reset:f}=n,{pendingAccountRefreshes:p,failedAccountRefreshes:y,currentRefresh:k,currentAccount:b,nextRefreshTime:v}=M(n),{t:o,locale:$}=H(),g=U(),{schedulerRenewTime:S}=M(W()),{offline:I}=X(),x=d(()=>v.value??!1?ee(v.value,{language:$.value,largest:1,round:!0}):""),C=d(()=>100-Math.round(v.value/(S.value*10)));function V(){g.push({name:"accounts"})}function F(m){g.push({name:"login",query:{redirect:"/scheduler"},params:{libraryId:""+m.libraryId,userId:m.userId}})}return(m,h)=>{const N=re;return s(),c(E,{"data-testid":"sk-accounts"},{default:t(()=>[a(w,{class:"sticky-header"},{default:t(()=>[a(R,null,{default:t(()=>[l(r(e(o)("nav.scheduler")),1)]),_:1}),a(L,{"aria-label":m.$t("refresh"),class:"mx-3",color:"primary",elevation:"2",icon:"",onClick:e(f)},{default:t(()=>[a(P,null,{default:t(()=>[...h[0]||(h[0]=[l("mdi-reload",-1)])]),_:1})]),_:1},8,["aria-label","onClick"]),a(L,{"append-icon":"mdi-account-multiple","aria-label":m.$t("nav.accounts"),class:"mx-3",color:"primary",elevation:"2",onClick:V},{default:t(()=>[l(r(m.$t("nav.accounts")),1)]),_:1},8,["aria-label"])]),_:1}),e(I)?(s(),c(K,{key:0,class:"my-3",text:e(o)("status.check"),title:e(o)("status.offline"),type:"warning",variant:"tonal"},null,8,["text","title"])):u("",!0),e(y)?.length>0?(s(),_(A,{key:1},[a(w,{color:"error",density:"compact"},{default:t(()=>[a(R,null,{default:t(()=>[l(r(e(o)("scheduler.failed")),1)]),_:1})]),_:1}),a(j,{"aria-label":e(o)("nav.scheduler"),color:"primary",lines:"one"},{default:t(()=>[(s(!0),_(A,null,q(e(y),i=>(s(),c(D,{key:i.libraryId+"|"+i.userId,onClick:O=>F(i)},{prepend:t(()=>[a(P,{color:"error"},{default:t(()=>[...h[1]||(h[1]=[l("mdi-alert",-1)])]),_:1})]),append:t(()=>[a(L,{icon:"mdi-account-key-outline"})]),default:t(()=>[a(N,{"account-refresh":i},null,8,["account-refresh"])]),_:2},1032,["onClick"]))),128))]),_:1},8,["aria-label"])],64)):u("",!0),e(k)&&e(b)?(s(),c(w,{key:2,color:"success",density:"compact"},{default:t(()=>[a(R,null,{default:t(()=>[l(r(e(o)("scheduler.current")),1)]),_:1})]),_:1})):u("",!0),e(k)&&e(b)?(s(),c(j,{key:3},{default:t(()=>[a(D,null,{prepend:t(()=>[a(Y,{color:"primary",indeterminate:""})]),default:t(()=>[a(N,{account:e(b),"account-refresh":e(k)},null,8,["account","account-refresh"])]),_:1})]),_:1})):u("",!0),e(p)?.length>0?(s(),_(A,{key:4},[a(w,{density:"compact"},{append:t(()=>[a(E,{class:"text-title-small"},{default:t(()=>[l(r(e(x)),1)]),_:1})]),default:t(()=>[a(R,null,{default:t(()=>[l(r(e(o)("scheduler.pending")),1)]),_:1}),a(Z,{absolute:"","chunk-width":"4",location:"bottom","model-value":e(C)},null,8,["model-value"])]),_:1}),a(j,{"aria-label":e(o)("nav.scheduler"),color:"primary",lines:"one"},{default:t(()=>[(s(!0),_(A,null,q(e(p),i=>
1(s(),c(D,{key:i.libraryId+"|"+i.userId,onClick:O=>F(i)},{prepend:t(()=>[a(P,null,{default:t(()=>[...h[2]||(h[2]=[l("mdi-account-clock",-1)])]),_:1})]),append:t(()=>[a(L,{icon:"mdi-account-key-outline"})]),default:t(()=>[a(N,{"account-refresh":i},null,8,["account-refresh"])]),_:2},1032,["onClick"]))),128))]),_:1},8,["aria-label"])],64)):u("",!0)]),_:1})}}}),le={},ne={class:"sk-view-scheduler","data-testid":"sk-view-scheduler"};function ce(T,n){const f=se;return s(),_("div",ne,[a(f)])}const de=te(le,[["render",ce]]);export{de 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.