PageSourceSearch

https://nextthere.com/assets/ApplicationList-W4CoKTi0.js

js nextthere.com collected 2026-10-02 05:06:16 UTC 4,485 bytes, 1 lines download raw bytes

1import{d as N,av as D,x as L,u as R,c as d,r as _,i as T,a as n,b as a,k as y,e as t,F as $,l as I,w as m,t as c,s as F,g as S,v as k,aw as M,o as s,_ as P}from"./index-DbpIxVVg.js";import{_ as O}from"./ErrorView.vue_vue_type_script_setup_true_lang-rTuR_K5N.js";import{u as Y}from"./entity-Dyy2H1qK.js";import"./ErrorContent.vue_vue_type_script_setup_true_lang--XFDxIpt.js";import"./RoundedBadge-zDfp8xRL.js";import"./ArrowTopRightOnSquareIcon-Bwi8lzNJ.js";import"./ChevronRightIcon-CKGSa4-R.js";import"./disclosure-DbKVSJYz.js";import"./keyboard-C910qfwt.js";const j={class:"animated fadeIn"},q={key:0},z={key:2,class:"list-unstyled"},G={key:0},H=["src"],J=["href","onClick"],K={class:"mt-2"},Q={key:3},W={key:4,class:"table table-default"},X=["src"],Z={class:"text-right"},tt=["href","onClick"],et={key:0},lt={key:5},st={class:"card"},nt={class:"card-body text-center"},at={class:"lead mt-5 mb-5"},ot={key:0},it=N({__name:"ApplicationList",setup(rt){const h=new D,E=L(),w=R(),b=Y(),o=d(()=>w.user),f=d(()=>b.applications),r=d(()=>navigator.userAgent.match(/iPhone/)!==null||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints>2),g=d(()=>o==null?void 0:o.value.hasRole("administrator")),U=d(()=>o==null?void 0:o.value.hasRole(["administrator","app-reporting","app-install"])),V=d(()=>o==null?void 0:o.value.hasRole("app-install")),i=_(!1),u=_(null),v=_(!1);T(async()=>{U.value?await A():w.user?u.value=new Error("You do not have permission to access this page"):await E.showLoginForm()});async function A(){b.applications=await h.findAll()}async function x(C){u.value=null,v.value=!0;try{await h.postEvent(C,M.Download)}catch(e){u.value=e}}return(C,e)=>{const p=F("router-link");return s(),n("div",j,[!r.value||i.value?(s(),n("header",q,e[3]||(e[3]=[t("h2",null,"Applications",-1)]))):a("",!0),u.value?(s(),y(O,{key:1,error:u.value,thing:"applications",onRetry:e[0]||(e[0]=l=>A())},null,8,["error"])):a("",!0),r.value&&!i.value&&!v.value?(s(),n("ul",z,[(s(!0),n($,null,I(f.value,l=>(s(),n("li",{key:l.id,class:"app-link"},[l.downloadUrl?(s(),n("div",G,[t("img",{class:"mr-2 icon",src:l.iconUrl,alt:"Application icon"},null,8,H),t("a",{class:"btn btn-success btn-large",href:l.otaInstallUrl,onClick:B=>x(l)}," Install "+c(l.title),9,J),t("div",K,[S(p,{class:"text-muted",to:`/application/${l.id}`},{default:m(()=>[k("Version "+c(l.currentVersion),1)]),_:2},1032,["to"])])])):a("",!0)]))),128))])):a("",!0),r.value&&!i.value?(s(),n("hr",Q)):a("",!0),!r.value||i.value?(s(),n("table",W,[e[8]||(e[8]=t("thead",null,[t("tr",null,[t("th",null,"Application"),t("th",null,"ID"),t("th",null,"Owner"),t("th")])],-1)),t("tbody",null,[(s(!0),n($,null,I(f.value,l=>(s(),n("tr",{key:l.id},[t("td",null,[S(p,{to:`/application/${l.id}`},{default:m(()=>[l.iconUrl?(s(),n("img",{key:0,class:"app-icon mr-2",src:l.iconUrl,alt:"Application icon"},null,8,X)):a("",!0),t("strong",null,c(l.title),1)]),_:2},1032,["to"])]),t("td",null,c(l.name),1),t("td",null,c(l.organisationTitle),1),t("td",Z,[V.value&&l.downloadUrl?(s(),n("a",{key:0,class:"mr-4",href:l.downloadUrl,onClick:B=>x(l)},e[4]||(e[4]=[t("i",{class:"fa fa-download mr-2"},null,-1),t("span",null,"Install link",-1)]),8,tt)):a("",!0),e[6]||(e[6]=t("span",null," ",-1)),g.value?(s(),y(p,{key:1,to:`/application/${l.id}/edit`},{default:m(()=>e[5]||(e[5]=[t("i",{class:"fa fa-edit mr-2"},null,-1),k(" Edit ",-1)])),_:2,__:[5]},1032,["to"])):a("",!0)])]))),128)),f.value.length?a("",!0):(s(),n("tr",et,e[7]||(e[7]=[t("td",{colspan:"4"},"No applications are currently defined on this environment.",-1)])))])])):a("",!0),r.value&&v.value&&!u.value?(s(),n("div",lt,[t("div",st,[t("div",nt,[t("div",at,[e[9]||(e[9]=t("i",{class:"fa fa-spinner fa-spin"},null,-1)),e[10]||(e[10]=t("span",{class:"ml-3"},"Installing...",-1)),e[11]||(e[11]=t("div",{class:"mb-5"},"Press the home button to access the installed application",-1)),t("div",null,[t("a",{class:"btn btn-primary text-white",onClick:e[1]||(e[1]=l=>v.value=!1)},"Back")])])])]),g.value?(s(),n("p",ot,[!r.value||i.value?(s(),y(p,{key:0,class:"btn btn-primary mr-2",to:"/application/new"},{default:m(()=>e[12]||(e[12]=[t("i",{class:"fa fa-plus"},null,-1),k(" Add new application ",-1)])),_:1,__:[12]})):a("",!0)])):a("",!0),t("p",null,[r.value&&!v.value?(s(),n("button",{key:0,class:"btn btn-secondary",onClick:e[2]||(e[2]=l=>i.value=!i.value)},c(i.value?"Show only mobile apps":"Show all apps"),1)):a("",!0)])])):a("",!0)])}}}),kt=P(it,[["__scopeId","data-v-6d739243"]]);export{kt 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.