1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[3218],{3218:function(e,t,s){s.r(t),s.d(t,{default:function(){return f}});var i=s(20641),a=s(90033);const n={key:0,class:"o-minwidth"},l={class:"title"},r={class:"buttons pt-3"},o={class:"modal-card",style:{width:"auto"}},c={key:0,class:"modal-card-body"},d={class:"modal-card-foot"};function u(e,t,s,u,m,p){const h=(0,i.g2)("Form"),b=(0,i.g2)("b-modal");return m.item?((0,i.uX)(),(0,i.CE)("section",n,[(0,i.Lk)("h2",l,[(0,i.eW)(" App: "+(0,a.v_)(m.item.name)+" ( ",1),(0,i.Lk)("em",null,(0,a.v_)(e.$t("edit")),1),t[4]||(t[4]=(0,i.eW)(" ) ",-1))]),(0,i.bF)(h,{save:p.save,item:m.item},null,8,["save","item"]),t[7]||(t[7]=(0,i.Lk)("hr",null,null,-1)),(0,i.Lk)("div",r,[(0,i.Lk)("a",{class:"button is-warning",onClick:t[0]||(t[0]=(...e)=>p.generateNewAppSecret&&p.generateNewAppSecret(...e))}," Generate new App Secret "),(0,i.Lk)("a",{class:"button is-danger",onClick:t[1]||(t[1]=(...e)=>p.confirmDelete&&p.confirmDelete(...e))},(0,a.v_)(e.$t("remove")),1)]),(0,i.bF)(b,{modelValue:m.isModal,"onUpdate:modelValue":t[3]||(t[3]=e=>m.isModal=e)},{default:(0,i.k6)(()=>[(0,i.Lk)("div",o,[m.newAppSecret?((0,i.uX)(),(0,i.CE)("section",c,[(0,i.Lk)("p",null,[t[5]||(t[5]=(0,i.Lk)("strong",null,"App Secret:",-1)),(0,i.eW)(" "+(0,a.v_)(m.newAppSecret),1)]),t[6]||(t[6]=(0,i.Lk)("p",{class:"has-text-danger"},"You have to copy the App Secret on your environment, it is displayed here only once.",-1))])):(0,i.Q3)("",!0),(0,i.Lk)("footer",d,[(0,i.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[2]||(t[2]=(...e)=>p.redirectToList&&p.redirectToList(...e))}," Ok, I copied my App Secret ",2)])])]),_:1},8,["modelValue"])])):(0,i.Q3)("",!0)}s(44114);var m=s(87775),p=s(40834),h={data(){return{itemId:this.$route.params.item,item:null,isModal:!1,newAppSecret:null}},created(){this.retrieve()},methods:{...(0,p.L8)(["user"]),retrieve(){this.$http.plain.get("/apps/"+this.itemId).then(e=>{this.item=e.data}).catch(e=>console.error(e))},save(){this.$http.plain.patch("/apps/"+this.item.id,this.item).then(e=>this.saveSuccess(e)).catch(e=>console.error(e))},generateNewAppSecret(){this.$http.plain.get("/app-generate-secrete/"+this.itemId).then(e=>{this.newAppSecret=e.data.appSecret,this.isModal=!0}).catch(e=>console.error(e))},redirectToList(){this.$router.push({name:"AppList"})},saveSuccess(e){this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}),this.$router.push({name:"AppList"})},confirmDelete(){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+this.item.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.delete()})},delete(){this.$http.plain.delete("/apps/"+this.item.id).then(e=>this.deleteSuccess(e)).catch(e=>console.error(e))},deleteSuccess(){this.$router.push({name:"AppList"}),this.$buefy.toast.open(this.$t("deleted"))}},computed:{},components:{Form:m.A}},b=s(66262);const k=(0,b.A)(h,[["render",u]]);var f=k},87775:function(e,t,s){s.d(t,{A:function(){return u}});var i=s(20641),a=s(53751),n=s(90033);const l={class:"control mt-5"};function r(e,t,s,r,o,c){const d=(0,i.g2)("b-field"),u=(0,i.g2)("b-input"),m=(0,i.g2)("b-switch");return(0,i.uX)(),(0,i.CE)("section",null,[(0,i.Lk)("form",{onSubmit:t[3]||(t[3]=(0,a.D$)((...e)=>s.save&&s.save(...e),["prevent"]))},[s.item.appId?((0,i.uX)(),(0,i.Wv)(d,{key:0,label:"APP ID"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(s.item.appId),1)]),_:1})):(0,i.Q3)("",!0),t[4]||(t[4]=(0,i.Lk)("hr",null,null,-1)),(0,i.bF)(d,{label:"Title"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{modelValue:s.item.name,"onUpdate:modelValue":t[0]||(t[0]=e=>s.item.name=e),required:""},null,8,["modelValue"])]),_:1}),(0,i.bF)(d,{label:"Redirect URL (including http(s))"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{modelValue:s.item.redirectUri,"onUpdate:modelValue":t[1]||(t[1]=e=>s.item.redirectUri=e),required:""},null,8,["modelValue"])]),_:1}),(0,i.bF)(d,{label:"Access level"},{default:(0,i.k6)(()=>[(0,i.bF)(m,{modelValue:s.item.actAsMember,"onUpdate:modelValue":t[2]||(t[2]=e=>s.item.actAsMember=e)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(s.item.actAsMember?"Can act on members' behalf (read and write)":"Read-only"),1)]),_:1},8,["modelValue"])]),_:1}
1),t[5]||(t[5]=(0,i.Lk)("p",{class:"help mb-4"},"When off, tokens issued for this app can only read; they cannot make changes on the member's behalf.",-1)),(0,i.Lk)("div",l,[(0,i.Lk)("button",{class:(0,n.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),type:"submit"}," Save ",2)])],32)])}var o={components:{},props:["item","save"],data(){return{}},computed:{},created(){this.item&&void 0===this.item.actAsMember&&(this.item.actAsMember=!0)},methods:{}},c=s(66262);const d=(0,c.A)(o,[["render",r]]);var u=d}}]);
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.