1import{_ as m}from"./QGNy9sQ5.js";import{_ as p,r as g,f as v,w as i,a as n,b as c,d as u,o as e,c as o,t as d,F as f,i as y,g as b,e as k,h as C,n as $}from"./Ck03Lu83.js";const w=k({name:"MetadataIndex",data(){var t;return{current_user:(t=this.$auth)==null?void 0:t.user,metadata:null,archived_count:0,error:null}},created(){this.getMetadata()},methods:{async getMetadata(){var t,s;console.log("Loading metadata...");try{const r=C(),_=await $fetch("/api/v1/entries/metadata_list/",{baseURL:r.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${(t=this.$auth)==null?void 0:t.token}`,"Content-Type":"application/json"}});console.log(_),_.status==="OK"&&(this.metadata=_.metadata,this.archived_count=_.archived_count)}catch(r){console.log("ERROR: "+r.message),this.error="Failed to load metadata",(r.status===401||r.statusCode===401)&&(await((s=this.$auth)==null?void 0:s.logout()),await $("/login"))}}}}),R={id:"metadata-index"},B={class:"sans-serif mb-10"},M={key:0,class:"error-state"},N={key:1},V={class:"mb-0"},L={key:0,class:"mt-3"},T={key:1,class:"mt-3"},A={key:2,class:"mt-3"},F={key:3,class:"mt-3"},O={class:"metadata-subheader sans-serif"},S={key:2},U={key:3},x={key:4,class:"sans-serif mt-5"};function D(t,s,r,_,E,I){const l=m,h=g("v-container");return e(),v(h,{id:"metadata-index-container",fluid:""},{default:i(()=>[n("div",R,[s[3]||(s[3]=n("h1",{class:"mb-0"},"ð Your Metadata",-1)),n("div",B,[c(l,{to:"/account"},{default:i(()=>[...s[0]||(s[0]=[u("< Return to your account",-1)])]),_:1})]),t.error?(e(),o("div",M,[n("p",null,d(t.error),1)])):t.metadata&&t.metadata.length>0?(e(),o("div",N,[(e(!0),o(f,null,y(t.metadata,a=>(e(),o("div",{key:a.label+"-"+a.type_string},[n("h3",V,[a.type_string=="hashtag"?(e(),o("div",L,[c(l,{to:"/account/metadata/"+a.label},{default:i(()=>[u("#"+d(a.label),1)]),_:2},1032,["to"])])):a.type_string=="atsign"?(e(),o("div",T,[c(l,{to:"/account/metadata/"+a.label},{default:i(()=>[u("@"+d(a.label),1)]),_:2},1032,["to"])])):a.type_string=="caps"?(e(),o("div",A,[c(l,{to:"/account/metadata/"+a.label},{default:i(()=>[u(d(a.label.toUpperCase()),1)]),_:2},1032,["to"])])):(e(),o("div",F,[c(l,{to:"/account/metadata/"+a.label},{default:i(()=>[u(d(a.label),1)]),_:2},1032,["to"])]))]),n("div",O,"Mentioned in "+d(a.count)+" entries.",1)]))),128))])):t.metadata&&t.metadata.length===0?(e(),o("div",S,[...s[1]||(s[1]=[n("p",null,"No metadata found in your entries yet. Try adding #hashtags, @atsigns, or CAPSWORDS to your writing!",-1)])])):(e(),o("div",U,[...s[2]||(s[2]=[n("p",null,"Loading your metadata...",-1)])])),t.archived_count>0?(e(),o("div",x,[c(l,{to:"/account/metadata_archived",class:"archive-link"},{default:i(()=>[u("View "+d(t.archived_count)+" archived metadata",1)]),_:1})])):b("",!0)])]),_:1})}const K=p(w,[["render",D],["__scopeId","data-v-63392603"]]);export{K 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.