PageSourceSearch

https://www.bscotch.net/js/ExternalApis-DsayljJc.js

js bscotch.net collected 2026-09-24 09:03:47 UTC 1,934 bytes, 2 lines download raw bytes

1import{d as l,K as d,r as i,_ as h,a as y,o,c as r,F as m,e as f,b as a,M as _,q as n,g,t as u,p as k,h as K}from"./index-kY4EFsKJ.js";const b=l({mixins:[d],data(){return{services:["github","blork","favro","clickup"],existingKeys:null}},computed:{currentUser(){return this.$store.getters.currentUser||{}}},created(){this.fetchApiKeys()},methods:{async fetchApiKeys(){const e=await i("/api/auth/accounts/@me/external-api-keys");this.existingKeys=e.data.map(s=>s.party)},hasKey(e){return(this.existingKeys||[]).includes(e)},async updateKey(e){try{const s=this.$refs[e][0].value;if(!s)throw new Error("No key was provided!");await i({url:`/api/auth/accounts/@me/external-api-keys/${e}`,method:"put",data:{key:s}}),this.showSuccessMessage("Uploaded!"),this.$refs[e].value="",await this.fetchApiKeys()}catch(s){this.showErrorMessage(s.message)}}}}),c=e=>(k("data-v-3f701f19"),e=e(),K(),e),v={key:0,class:"account-settings-group external-apis"},w=c(()=>a("h1",{class:"account-settings-header"},"External API Keys",-1)),x=c(()=>a("p",null," Some Rumpus functionality comes from 3rd party services. For Rumpus to act on your behalf in those services, you'll need to provide API keys. ",-1)),$={key:0},A=c(()=>a("h2",null,"Services",-1)),S={class:"rumpus-form-label"},I=["onClick"];function C(e,s,E,B,N,U){const p=y("icon");return e.currentUser.isStaff?(o(),r("div",v,[w,x,e.existingKeys?(o(),r("section",$,[A,(o(!0),r(m,null,f(e.services,t=>(o(),r("div",{key:t},[a("label",S,[e.hasKey(t)?(o(),_(p,{key:0,icon:"check-circle",class:"green"})):n("",!0),g(" "+u(t)+" ",1),a("input",{ref_for:!0,ref:t,type:"text",class:"rumpus-form-field form-control inline"},null,512),a("button",{class:"btn rumpus-button",onClick:F=>e.updateKey(t)},u(e.hasKey(t)?"Replace":"Add")+" Key ",9,I)])]))),128))])):n("",!0)])):n("",!0)}const R=h(b,[["render",C],["__scopeId","data-v-3f701f19"]]);export{R as default};
2//# sourceMappingURL=ExternalApis-DsayljJc.js.map

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.