PageSourceSearch

https://vocadb.net/assets/UserRequestVerification-BaKNedZM.js

js vocadb.net collected 2026-09-25 02:40:35 UTC 4,254 bytes, 1 lines download raw bytes

1var b=Object.defineProperty;var V=(i,t,e)=>t in i?b(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var r=(i,t,e)=>V(i,typeof t!="symbol"?t+"":t,e);import{m as y,i as c,o as f,k as w,am as A,D as q,s as M,R as U,aB as T,ae as L,bG as N,j as s,a as o,ao as m,E as P,d as k,av as v}from"./index-Cn21bPyG.js";import{A as R,L as S}from"./Layout-DvTAbHXk.js";import{A as x}from"./ArtistAutoComplete-Doftd1zP.js";import{s as C,a as _}from"./ui-hm8_IjVA.js";import{g as I}from"./utils-functions-B5N3535E.js";import{T as B}from"./Trans-SzFFLMQR.js";import"./EntryAutoComplete-DzEsTBOD.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};i.__faroBundleId_vocadb_frontend="1779057177036d7b93c7ca4"}catch{}})();var j=Object.defineProperty,d=(i,t,e,a)=>{for(var n=void 0,u=i.length-1,p;u>=0;u--)(p=i[u])&&(n=p(t,e,n)||n);return n&&j(t,e,n),n};class l{constructor(t,e){r(this,"linkToProof","");r(this,"message","");r(this,"privateMessage",!1);r(this,"selectedArtist");r(this,"submitting",!1);r(this,"clearArtist",()=>{this.selectedArtist=void 0});r(this,"setArtist",async t=>{const e=await this.artistRepo.getOne({id:t,lang:this.values.languagePreference});c(()=>{this.selectedArtist=e})});r(this,"submit",async()=>{if(this.selectedArtist)try{this.submitting=!0,await this.artistRepo.requestVerification({artistId:this.selectedArtist.id,message:this.message,linkToProof:this.linkToProof,privateMessage:this.privateMessage})}finally{c(()=>{this.submitting=!1})}});this.values=t,this.artistRepo=e,y(this)}}d([f],l.prototype,"linkToProof");d([f],l.prototype,"message");d([f],l.prototype,"privateMessage");d([f],l.prototype,"selectedArtist");d([f],l.prototype,"submitting");d([w],l.prototype,"submit");const J=A(()=>{const i=q(),t=M(),[e]=U.useState(()=>new l(i.values,T)),{t:a,ready:n}=L(["ViewRes","ViewRes.User"]),{t:u}=N(),p=a("ViewRes.User:RequestVerification.PageTitle");return s(S,{pageTitle:p,ready:n,title:p,children:o("div",{className:"row-fluid",children:[t.isLoggedIn?o("form",{onSubmit:async g=>{g.preventDefault();try{await e.submit(),C("Request sent")}catch(h){throw _(h.response&&h.response.status?I(h.response.status):"Unable to send request."),h}},className:"span6 form",children:[s("label",{children:a("ViewRes.User:RequestVerification.ArtistTitle")}),e.selectedArtist?o("div",{children:[s(m,{to:P.details(k.Artist,e.selectedArtist.id),children:e.selectedArtist.name})," ",s(v,{onClick:e.clearArtist,variant:"danger",className:"btn-mini",children:a("ViewRes:Shared.Clear")})]}):s("div",{children:s(x,{type:"text",maxLength:128,placeholder:a("ViewRes:Shared.Search"),className:"input-xlarge",required:!0,properties:{acceptSelection:e.setArtist}})}),s("br",{}),o("label",{children:[s("input",{type:"radio",checked:e.privateMessage===!1,onChange:()=>c(()=>{e.privateMessage=!1})})," ",a("ViewRes.User:RequestVerification.NoPrivateMessage")]}),o("label",{children:[s("input",{type:"radio",checked:e.privateMessage===!0,onChange:()=>c(()=>{e.privateMessage=!0})})," ",a("ViewRes.User:RequestVerification.PrivateMessage")]}),!e.privateMessage&&o("div",{children:[s("label",{children:a("ViewRes.User:RequestVerification.URL")}),o("div",{className:"inline input-prepend",children:[s("span",{className:"add-on",title:"URL",children:s("i",{className:"icon-globe"})}),s("input",{type:"text",className:"input-xlarge",maxLength:255,required:!0,value:e.linkToProof,onChange:g=>c(()=>{e.linkToProof=g.target.value})})]})]}),s("br",{}),s("label",{children:a("ViewRes.User:RequestVerification.MessageTitle")}),s("textarea",{className:"span11",cols:50,rows:10,value:e.message,onChange:g=>c(()=>{e.message=g.target.value})}),s("br",{}),s(v,{type:"submit",variant:"primary",disabled:!e.selectedArtist||e.submitting,children:a("ViewRes.User:RequestVerification.Send")})]}):s(R,{className:"span6",children:s(B,{i18nKey:"ViewRes.User:RequestVerification.NotLoggedInMessage",components:{1:s(m,{to:"/User/Login",children:a("ViewRes.User:RequestVerification.Login")}),2:s(m,{to:"/User/Create",children:a("ViewRes.User:RequestVerification.Create")})}})}),s(R,{variant:"info",className:"span4",children:s("span",{dangerouslySetInnerHTML:{__html:u("UserRes.RequestVerificationInfo")}})})]})})});export{J 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.