From 8ca77709186d2f19788b7b34df6043452361b25c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 29 Jun 2026 06:30:44 -0600 Subject: [PATCH] Update PersonalAccessTokens component --- public/js/developers.js | 2 +- public/mix-manifest.json | 2 +- .../passport/PersonalAccessTokens.vue | 157 +++++++++++------- 3 files changed, 99 insertions(+), 62 deletions(-) diff --git a/public/js/developers.js b/public/js/developers.js index 01efb19f2..b568822a4 100644 --- a/public/js/developers.js +++ b/public/js/developers.js @@ -1 +1 @@ -(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[755],{60621(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>a});const a={data:function(){return{tokens:[]}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens()},getTokens:function(){var t=this;axios.get("/oauth/tokens").then(function(e){t.tokens=e.data})},revoke:function(t){var e=this;axios.delete("/oauth/tokens/"+t.id).then(function(t){e.getTokens()})}}}},76860(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(74692);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}const n={data:function(){return{clients:[],createForm:{errors:[],name:"",redirect:""},editForm:{errors:[],name:"",redirect:""}}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getClients(),a("#modal-create-client").on("shown.bs.modal",function(){a("#create-client-name").focus()}),a("#modal-edit-client").on("shown.bs.modal",function(){a("#edit-client-name").focus()})},getClients:function(){var t=this;axios.get("/oauth/clients").then(function(e){t.clients=e.data})},showCreateClientForm:function(){a("#modal-create-client").modal("show")},store:function(){this.persistClient("post","/oauth/clients",this.createForm,"#modal-create-client")},edit:function(t){this.editForm.id=t.id,this.editForm.name=t.name,this.editForm.redirect=t.redirect,a("#modal-edit-client").modal("show")},update:function(){this.persistClient("put","/oauth/clients/"+this.editForm.id,this.editForm,"#modal-edit-client")},persistClient:function(t,e,s,n){var r=this;s.errors=[],axios[t](e,s).then(function(t){r.getClients(),s.name="",s.redirect="",s.errors=[],a(n).modal("hide")}).catch(function(t){"object"===o(t.response.data)?s.errors=_.flatten(_.toArray(t.response.data.errors)):s.errors=["Something went wrong. Please try again."]})},destroy:function(t){var e=this;axios.delete("/oauth/clients/"+t.id).then(function(t){e.getClients()})}}}},88838(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(74692);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}const n={data:function(){return{accessToken:null,tokens:[],scopes:[],form:{name:"",scopes:[],errors:[]}}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens(),this.getScopes(),a("#modal-create-token").on("shown.bs.modal",function(){a("#create-token-name").focus()})},getTokens:function(){var t=this;axios.get("/oauth/personal-access-tokens").then(function(e){t.tokens=e.data})},getScopes:function(){var t=this;axios.get("/oauth/scopes").then(function(e){t.scopes=e.data})},showCreateTokenForm:function(){a("#modal-create-token").modal("show")},store:function(){var t=this;this.accessToken=null,this.form.errors=[],axios.post("/oauth/personal-access-tokens",this.form).then(function(e){t.form.name="",t.form.scopes=[],t.form.errors=[],t.tokens.push(e.data.token),t.showAccessToken(e.data.accessToken)}).catch(function(e){"object"===o(e.response.data)?t.form.errors=_.flatten(_.toArray(e.response.data.errors)):t.form.errors=["Something went wrong. Please try again."]})},toggleScope:function(t){this.scopeIsAssigned(t)?this.form.scopes=_.reject(this.form.scopes,function(e){return e==t}):this.form.scopes.push(t)},scopeIsAssigned:function(t){return _.indexOf(this.form.scopes,t)>=0},showAccessToken:function(t){a("#modal-create-token").modal("hide"),this.accessToken=t,a("#modal-access-token").modal("show")},revoke:function(t){var e=this;axios.delete("/oauth/personal-access-tokens/"+t.id).then(function(t){e.getTokens()})}}}},41671(t,e,s){"use strict";s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>o});var a=function(){var t=this,e=t._self._c;return e("div",[t.tokens.length>0?e("div",[e("div",{staticClass:"card card-default mb-4"},[e("div",{staticClass:"card-header font-weight-bold bg-white"},[t._v("Authorized Applications")]),t._v(" "),e("div",{staticClass:"card-body"},[e("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),e("tbody",t._l(t.tokens,function(s){return e("tr",[e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.client.name)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[s.scopes.length>0?e("span",[t._v("\n "+t._s(s.scopes.join(", "))+"\n ")]):t._e()]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"action-link text-danger",on:{click:function(e){return t.revoke(s)}}},[t._v("\n Revoke\n ")])])])}),0)])])])]):t._e()])},o=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Scopes")]),t._v(" "),e("th")])])}]},47665(t,e,s){"use strict";s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>o});var a=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"card card-default mb-4"},[e("div",{staticClass:"card-header font-weight-bold bg-white"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e("span",[t._v("\n OAuth Clients\n ")]),t._v(" "),e("a",{staticClass:"action-link",attrs:{tabindex:"-1"},on:{click:t.showCreateClientForm}},[t._v("\n Create New Client\n ")])])]),t._v(" "),e("div",{staticClass:"card-body"},[0===t.clients.length?e("p",{staticClass:"mb-0 font-weight-bold text-center lead p-5"},[t._v("\n You have not created any OAuth clients.\n ")]):t._e(),t._v(" "),t.clients.length>0?e("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),e("tbody",t._l(t.clients,function(s){return e("tr",[e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.id)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.name)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("code",[t._v(t._s(s.secret))])]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"btn btn-outline-secondary btn-sm py-1",attrs:{tabindex:"-1"},on:{click:function(e){return t.edit(s)}}},[t._v("\n Edit\n ")])]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"btn btn-outline-danger btn-sm py-1",attrs:{href:""},on:{click:function(e){return t.destroy(s)}}},[t._v("\n Delete\n ")])])])}),0)]):t._e()])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-create-client",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),e("div",{staticClass:"modal-body"},[t.createForm.errors.length>0?e("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),e("br"),t._v(" "),e("ul",t._l(t.createForm.errors,function(s){return e("li",[t._v("\n "+t._s(s)+"\n ")])}),0)]):t._e(),t._v(" "),e("form",{attrs:{role:"form"}},[e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.name,expression:"createForm.name"}],staticClass:"form-control",attrs:{id:"create-client-name",type:"text",autocomplete:"off"},domProps:{value:t.createForm.name},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.store.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.createForm,"name",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Redirect URL")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.redirect,expression:"createForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.createForm.redirect},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.store.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.createForm,"redirect",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's authorization callback URL.\n ")])])]),t._v(" "),t._m(5)])]),t._v(" "),e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary font-weight-bold",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),e("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-edit-client",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(6),t._v(" "),e("div",{staticClass:"modal-body"},[t.editForm.errors.length>0?e("div",{staticClass:"alert alert-danger"},[t._m(7),t._v(" "),e("br"),t._v(" "),e("ul",t._l(t.editForm.errors,function(s){return e("li",[t._v("\n "+t._s(s)+"\n ")])}),0)]):t._e(),t._v(" "),e("form",{attrs:{role:"form"}},[e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.name,expression:"editForm.name"}],staticClass:"form-control",attrs:{id:"edit-client-name",type:"text"},domProps:{value:t.editForm.name},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.update.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.editForm,"name",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Redirect URL")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.redirect,expression:"editForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.editForm.redirect},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.update.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.editForm,"redirect",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's authorization callback URL.\n ")])])])])]),t._v(" "),e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),e("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.update}},[t._v("\n Save Changes\n ")])])])])])])},o=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Client ID")]),t._v(" "),e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Secret")]),t._v(" "),e("th"),t._v(" "),e("th")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Create Client\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[e("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Description")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("textarea",{staticClass:"form-control",attrs:{rows:"3"}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n A brief description of your app\n ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Website")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{staticClass:"form-control",attrs:{type:"text",autocomplete:"off"}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your website url\n ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Scopes")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("div",{staticClass:"custom-control custom-switch"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch1"}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}},[t._v("Read")])]),t._v(" "),e("div",{staticClass:"custom-control custom-switch"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch2"}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch2"}},[t._v("Write")])]),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's scopes.\n ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Edit Client\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[e("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])}]},99958(t,e,s){"use strict";s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>o});var a=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"card card-default mb-4"},[e("div",{staticClass:"card-header font-weight-bold bg-white"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e("span",[t._v("\n Personal Access Tokens\n ")]),t._v(" "),e("a",{staticClass:"action-link",attrs:{tabindex:"-1"},on:{click:t.showCreateTokenForm}},[t._v("\n Create New Token\n ")])])]),t._v(" "),e("div",{staticClass:"card-body"},[0===t.tokens.length?e("p",{staticClass:"mb-0"},[t._v("\n You have not created any personal access tokens.\n ")]):t._e(),t._v(" "),t.tokens.length>0?e("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),e("tbody",t._l(t.tokens,function(s){return e("tr",[e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.name)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"action-link text-danger",on:{click:function(e){return t.revoke(s)}}},[t._v("\n Delete\n ")])])])}),0)]):t._e()])])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-create-token",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),e("div",{staticClass:"modal-body"},[t.form.errors.length>0?e("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),e("br"),t._v(" "),e("ul",t._l(t.form.errors,function(s){return e("li",[t._v("\n "+t._s(s)+"\n ")])}),0)]):t._e(),t._v(" "),e("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.store.apply(null,arguments)}}},[e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-4 col-form-label"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"col-md-6"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",attrs:{id:"create-token-name",type:"text",name:"name",autocomplete:"off"},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}})])]),t._v(" "),t.scopes.length>0?e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-4 col-form-label"},[t._v("Scopes")]),t._v(" "),e("div",{staticClass:"col-md-6"},t._l(t.scopes,function(s){return e("div",[e("div",{staticClass:"checkbox"},[e("label",[e("input",{attrs:{type:"checkbox"},domProps:{checked:t.scopeIsAssigned(s.id)},on:{click:function(e){return t.toggleScope(s.id)}}}),t._v("\n\n "+t._s(s.id)+"\n ")])])])}),0)]):t._e()])]),t._v(" "),e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary font-weight-bold",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),e("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-access-token",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(3),t._v(" "),e("div",{staticClass:"modal-body"},[e("p",[t._v("\n Here is your new personal access token. This is the only time it will be shown so don't lose it!\n You may now use this token to make API requests.\n ")]),t._v(" "),e("textarea",{staticClass:"form-control",attrs:{rows:"10"}},[t._v(t._s(t.accessToken))])]),t._v(" "),t._m(4)])])])])},o=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Create Token\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[e("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Personal Access Token\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this._self._c;return t("div",{staticClass:"modal-footer"},[t("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[this._v("Close")])])}]},15905(t,e,s){Vue.component("passport-clients",s(19308).default),Vue.component("passport-authorized-clients",s(22593).default),Vue.component("passport-personal-access-tokens",s(87036).default)},13025(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(76798),o=s.n(a)()(function(t){return t[1]});o.push([t.id,".action-link[data-v-1b737fda]{cursor:pointer}",""]);const n=o},49921(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(76798),o=s.n(a)()(function(t){return t[1]});o.push([t.id,".action-link[data-v-d71fe564]{cursor:pointer}",""]);const n=o},49464(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(76798),o=s.n(a)()(function(t){return t[1]});o.push([t.id,".action-link[data-v-bf6d3a58]{cursor:pointer}",""]);const n=o},19318(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(85072),o=s.n(a),n=s(13025),r={insert:"head",singleton:!1};o()(n.default,r);const i=n.default.locals||{}},37622(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(85072),o=s.n(a),n=s(49921),r={insert:"head",singleton:!1};o()(n.default,r);const i=n.default.locals||{}},45149(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(85072),o=s.n(a),n=s(49464),r={insert:"head",singleton:!1};o()(n.default,r);const i=n.default.locals||{}},22593(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(93638),o=s(83382),n={};for(const t in o)"default"!==t&&(n[t]=()=>o[t]);s.d(e,n);s(703);const r=(0,s(14486).default)(o.default,a.render,a.staticRenderFns,!1,null,"1b737fda",null).exports},19308(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(28004),o=s(71991),n={};for(const t in o)"default"!==t&&(n[t]=()=>o[t]);s.d(e,n);s(54019);const r=(0,s(14486).default)(o.default,a.render,a.staticRenderFns,!1,null,"d71fe564",null).exports},87036(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(98165),o=s(38335),n={};for(const t in o)"default"!==t&&(n[t]=()=>o[t]);s.d(e,n);s(34758);const r=(0,s(14486).default)(o.default,a.render,a.staticRenderFns,!1,null,"bf6d3a58",null).exports},83382(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(60621),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o);const n=a.default},71991(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(76860),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o);const n=a.default},38335(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>n});var a=s(88838),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o);const n=a.default},93638(t,e,s){"use strict";s.r(e);var a=s(41671),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o)},28004(t,e,s){"use strict";s.r(e);var a=s(47665),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o)},98165(t,e,s){"use strict";s.r(e);var a=s(99958),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o)},703(t,e,s){"use strict";s.r(e);var a=s(19318),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o)},54019(t,e,s){"use strict";s.r(e);var a=s(37622),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o)},34758(t,e,s){"use strict";s.r(e);var a=s(45149),o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);s.d(e,o)}},t=>{t.O(0,[3660],()=>{return e=15905,t(t.s=e);var e});t.O()}]); \ No newline at end of file +(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[755],{60621(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>a});const a={data:function(){return{tokens:[]}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens()},getTokens:function(){var t=this;axios.get("/oauth/tokens").then(function(e){t.tokens=e.data})},revoke:function(t){var e=this;axios.delete("/oauth/tokens/"+t.id).then(function(t){e.getTokens()})}}}},76860(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(74692);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}const o={data:function(){return{clients:[],createForm:{errors:[],name:"",redirect:""},editForm:{errors:[],name:"",redirect:""}}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getClients(),a("#modal-create-client").on("shown.bs.modal",function(){a("#create-client-name").focus()}),a("#modal-edit-client").on("shown.bs.modal",function(){a("#edit-client-name").focus()})},getClients:function(){var t=this;axios.get("/oauth/clients").then(function(e){t.clients=e.data})},showCreateClientForm:function(){a("#modal-create-client").modal("show")},store:function(){this.persistClient("post","/oauth/clients",this.createForm,"#modal-create-client")},edit:function(t){this.editForm.id=t.id,this.editForm.name=t.name,this.editForm.redirect=t.redirect,a("#modal-edit-client").modal("show")},update:function(){this.persistClient("put","/oauth/clients/"+this.editForm.id,this.editForm,"#modal-edit-client")},persistClient:function(t,e,s,o){var r=this;s.errors=[],axios[t](e,s).then(function(t){r.getClients(),s.name="",s.redirect="",s.errors=[],a(o).modal("hide")}).catch(function(t){"object"===n(t.response.data)?s.errors=_.flatten(_.toArray(t.response.data.errors)):s.errors=["Something went wrong. Please try again."]})},destroy:function(t){var e=this;axios.delete("/oauth/clients/"+t.id).then(function(t){e.getClients()})}}}},88838(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(74692);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}const o={data:function(){return{accessToken:null,tokens:[],scopes:[],form:{name:"",scopes:[],errors:[]}}},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens(),this.getScopes(),a("#modal-create-token").on("shown.bs.modal",function(){a("#create-token-name").focus()})},getScopeBadge:function(t){switch(t){case"*":case"write":case"follow":case"admin:read":case"admin:read:domain_blocks":case"admin:write":case"admin:write:domain_blocks":return"badge-danger";case"read":return"badge-secondary";case"push":return"badge-info"}},getTokens:function(){var t=this;axios.get("/oauth/personal-access-tokens").then(function(e){t.tokens=e.data})},getScopes:function(){var t=this;axios.get("/oauth/scopes").then(function(e){t.scopes=e.data})},showCreateTokenForm:function(){a("#modal-create-token").modal("show")},store:function(){var t=this;this.accessToken=null,this.form.errors=[],axios.post("/oauth/personal-access-tokens",this.form).then(function(e){t.form.name="",t.form.scopes=[],t.form.errors=[],t.tokens.push(e.data.token),t.showAccessToken(e.data.accessToken)}).catch(function(e){"object"===n(e.response.data)?t.form.errors=_.flatten(_.toArray(e.response.data.errors)):t.form.errors=["Something went wrong. Please try again."]})},toggleScope:function(t){this.scopeIsAssigned(t)?this.form.scopes=_.reject(this.form.scopes,function(e){return e===t}):this.form.scopes.push(t)},scopeIsAssigned:function(t){return _.indexOf(this.form.scopes,t)>=0},showAccessToken:function(t){a("#modal-create-token").modal("hide"),this.accessToken=t,a("#modal-access-token").modal("show")},revoke:function(t){var e=this;window.confirm("Delete this token? Any applications using it will stop working immediately.")&&axios.delete("/oauth/personal-access-tokens/"+t.id).then(function(){e.getTokens()})},formatDate:function(t){if(!t)return"";var e=new Date(t);return isNaN(e.getTime())?t:e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric"})},isExpired:function(t){return!!t.expires_at&&new Date(t.expires_at).getTime()a,staticRenderFns:()=>n});var a=function(){var t=this,e=t._self._c;return e("div",[t.tokens.length>0?e("div",[e("div",{staticClass:"card card-default mb-4"},[e("div",{staticClass:"card-header font-weight-bold bg-white"},[t._v("Authorized Applications")]),t._v(" "),e("div",{staticClass:"card-body"},[e("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),e("tbody",t._l(t.tokens,function(s){return e("tr",[e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.client.name)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[s.scopes.length>0?e("span",[t._v("\n "+t._s(s.scopes.join(", "))+"\n ")]):t._e()]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"action-link text-danger",on:{click:function(e){return t.revoke(s)}}},[t._v("\n Revoke\n ")])])])}),0)])])])]):t._e()])},n=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Scopes")]),t._v(" "),e("th")])])}]},47665(t,e,s){"use strict";s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>n});var a=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"card card-default mb-4"},[e("div",{staticClass:"card-header font-weight-bold bg-white"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e("span",[t._v("\n OAuth Clients\n ")]),t._v(" "),e("a",{staticClass:"action-link",attrs:{tabindex:"-1"},on:{click:t.showCreateClientForm}},[t._v("\n Create New Client\n ")])])]),t._v(" "),e("div",{staticClass:"card-body"},[0===t.clients.length?e("p",{staticClass:"mb-0 font-weight-bold text-center lead p-5"},[t._v("\n You have not created any OAuth clients.\n ")]):t._e(),t._v(" "),t.clients.length>0?e("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),e("tbody",t._l(t.clients,function(s){return e("tr",[e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.id)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(s.name)+"\n ")]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("code",[t._v(t._s(s.secret))])]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"btn btn-outline-secondary btn-sm py-1",attrs:{tabindex:"-1"},on:{click:function(e){return t.edit(s)}}},[t._v("\n Edit\n ")])]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"btn btn-outline-danger btn-sm py-1",attrs:{href:""},on:{click:function(e){return t.destroy(s)}}},[t._v("\n Delete\n ")])])])}),0)]):t._e()])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-create-client",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),e("div",{staticClass:"modal-body"},[t.createForm.errors.length>0?e("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),e("br"),t._v(" "),e("ul",t._l(t.createForm.errors,function(s){return e("li",[t._v("\n "+t._s(s)+"\n ")])}),0)]):t._e(),t._v(" "),e("form",{attrs:{role:"form"}},[e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.name,expression:"createForm.name"}],staticClass:"form-control",attrs:{id:"create-client-name",type:"text",autocomplete:"off"},domProps:{value:t.createForm.name},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.store.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.createForm,"name",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Redirect URL")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.redirect,expression:"createForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.createForm.redirect},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.store.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.createForm,"redirect",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's authorization callback URL.\n ")])])]),t._v(" "),t._m(5)])]),t._v(" "),e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary font-weight-bold",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),e("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-edit-client",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(6),t._v(" "),e("div",{staticClass:"modal-body"},[t.editForm.errors.length>0?e("div",{staticClass:"alert alert-danger"},[t._m(7),t._v(" "),e("br"),t._v(" "),e("ul",t._l(t.editForm.errors,function(s){return e("li",[t._v("\n "+t._s(s)+"\n ")])}),0)]):t._e(),t._v(" "),e("form",{attrs:{role:"form"}},[e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.name,expression:"editForm.name"}],staticClass:"form-control",attrs:{id:"edit-client-name",type:"text"},domProps:{value:t.editForm.name},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.update.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.editForm,"name",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Redirect URL")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.redirect,expression:"editForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.editForm.redirect},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.update.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.editForm,"redirect",e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's authorization callback URL.\n ")])])])])]),t._v(" "),e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),e("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.update}},[t._v("\n Save Changes\n ")])])])])])])},n=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Client ID")]),t._v(" "),e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Secret")]),t._v(" "),e("th"),t._v(" "),e("th")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Create Client\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[e("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Description")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("textarea",{staticClass:"form-control",attrs:{rows:"3"}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n A brief description of your app\n ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Website")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("input",{staticClass:"form-control",attrs:{type:"text",autocomplete:"off"}}),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your website url\n ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-3 col-form-label"},[t._v("Scopes")]),t._v(" "),e("div",{staticClass:"col-md-9"},[e("div",{staticClass:"custom-control custom-switch"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch1"}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}},[t._v("Read")])]),t._v(" "),e("div",{staticClass:"custom-control custom-switch"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch2"}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch2"}},[t._v("Write")])]),t._v(" "),e("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's scopes.\n ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Edit Client\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[e("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])}]},10118(t,e,s){"use strict";s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>n});var a=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"card card-default mb-4"},[e("div",{staticClass:"card-header font-weight-bold bg-white"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e("span",[t._v("\n Personal Access Tokens\n ")]),t._v(" "),e("a",{staticClass:"action-link",attrs:{tabindex:"-1"},on:{click:t.showCreateTokenForm}},[t._v("\n Create New Token\n ")])])]),t._v(" "),e("div",{staticClass:"card-body"},[0===t.tokens.length?e("p",{staticClass:"mb-0"},[t._v("\n You have not created any personal access tokens.\n ")]):t._e(),t._v(" "),t.tokens.length>0?e("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),e("tbody",t._l(t.tokens,function(s){return e("tr",{key:s.id},[e("td",{staticStyle:{"vertical-align":"middle"}},[e("div",{staticClass:"font-weight-bold"},[t._v(t._s(s.name))]),t._v(" "),s.created_at?e("small",{staticClass:"text-muted",staticStyle:{"font-size":"12px"}},[t._v("\n Created "+t._s(t.formatDate(s.created_at))+"\n ")]):t._e()]),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[s.scopes&&s.scopes.length>0?t._l(s.scopes,function(s){return e("span",{key:s,staticClass:"badge mr-1 mb-1",class:t.getScopeBadge(s)},[t._v("\n "+t._s("*"===s?"all scopes":s)+"\n ")])}):e("span",{staticClass:"text-muted"},[t._v("—")])],2),t._v(" "),e("td",{staticStyle:{"vertical-align":"middle"}},[s.expires_at?e("span",{class:{"text-danger":t.isExpired(s)},staticStyle:{"font-size":"12px"},attrs:{title:t.formatDate(s.expires_at)}},[t._v("\n "+t._s(t.formatDate(s.expires_at))+"\n "),t.isExpired(s)?e("span",{staticClass:"font-weight-bold"},[t._v("(expired)")]):t._e()]):e("span",{staticClass:"text-muted text-xs"},[t._v("\n Never\n ")])]),t._v(" "),e("td",{staticClass:"text-right",staticStyle:{"vertical-align":"middle"}},[e("a",{staticClass:"btn btn-danger btn-sm",staticStyle:{"font-weight":"bold"},on:{click:function(e){return t.revoke(s)}}},[t._v("\n Delete\n ")])])])}),0)]):t._e()])])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-create-token",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),e("div",{staticClass:"modal-body"},[t.form.errors.length>0?e("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),e("br"),t._v(" "),e("ul",t._l(t.form.errors,function(s,a){return e("li",{key:a},[t._v("\n "+t._s(s)+"\n ")])}),0)]):t._e(),t._v(" "),e("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.store.apply(null,arguments)}}},[e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-4 col-form-label"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"col-md-6"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",attrs:{id:"create-token-name",type:"text",name:"name",autocomplete:"off"},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}})])]),t._v(" "),t.scopes.length>0?e("div",{staticClass:"form-group row"},[e("label",{staticClass:"col-md-4 col-form-label"},[t._v("Scopes")]),t._v(" "),e("div",{staticClass:"col-md-6"},t._l(t.scopes,function(s){return e("div",{key:s.id},[e("div",{staticClass:"checkbox"},[e("label",[e("input",{attrs:{type:"checkbox"},domProps:{checked:t.scopeIsAssigned(s.id)},on:{click:function(e){return t.toggleScope(s.id)}}}),t._v("\n\n "+t._s(s.id)+"\n ")]),t._v(" "),s.description?e("small",{staticClass:"text-muted d-block ml-4"},[t._v("\n "+t._s(s.description)+"\n ")]):t._e()])])}),0)]):t._e()])]),t._v(" "),e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary font-weight-bold",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),e("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),e("div",{staticClass:"modal fade",attrs:{id:"modal-access-token",tabindex:"-1",role:"dialog"}},[e("div",{staticClass:"modal-dialog"},[e("div",{staticClass:"modal-content"},[t._m(3),t._v(" "),e("div",{staticClass:"modal-body"},[e("p",[t._v("\n Here is your new personal access token. This is the only time it will be shown so don't lose it!\n You may now use this token to make API requests.\n ")]),t._v(" "),e("textarea",{staticClass:"form-control",attrs:{rows:"10",readonly:""}},[t._v(t._s(t.accessToken))])]),t._v(" "),t._m(4)])])])])},n=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Scopes")]),t._v(" "),e("th",[t._v("Expires")]),t._v(" "),e("th")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Create Token\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[e("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[t._v("\n Personal Access Token\n ")]),t._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")])])},function(){var t=this._self._c;return t("div",{staticClass:"modal-footer"},[t("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[this._v("Close")])])}]},15905(t,e,s){Vue.component("passport-clients",s(19308).default),Vue.component("passport-authorized-clients",s(22593).default),Vue.component("passport-personal-access-tokens",s(87036).default)},13025(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(76798),n=s.n(a)()(function(t){return t[1]});n.push([t.id,".action-link[data-v-1b737fda]{cursor:pointer}",""]);const o=n},49921(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(76798),n=s.n(a)()(function(t){return t[1]});n.push([t.id,".action-link[data-v-d71fe564]{cursor:pointer}",""]);const o=n},1420(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(76798),n=s.n(a)()(function(t){return t[1]});n.push([t.id,".action-link[data-v-4f2aff84]{cursor:pointer}",""]);const o=n},19318(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(85072),n=s.n(a),o=s(13025),r={insert:"head",singleton:!1};n()(o.default,r);const i=o.default.locals||{}},37622(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(85072),n=s.n(a),o=s(49921),r={insert:"head",singleton:!1};n()(o.default,r);const i=o.default.locals||{}},10621(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(85072),n=s.n(a),o=s(1420),r={insert:"head",singleton:!1};n()(o.default,r);const i=o.default.locals||{}},22593(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(93638),n=s(83382),o={};for(const t in n)"default"!==t&&(o[t]=()=>n[t]);s.d(e,o);s(703);const r=(0,s(14486).default)(n.default,a.render,a.staticRenderFns,!1,null,"1b737fda",null).exports},19308(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(28004),n=s(71991),o={};for(const t in n)"default"!==t&&(o[t]=()=>n[t]);s.d(e,o);s(54019);const r=(0,s(14486).default)(n.default,a.render,a.staticRenderFns,!1,null,"d71fe564",null).exports},87036(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(69969),n=s(38335),o={};for(const t in n)"default"!==t&&(o[t]=()=>n[t]);s.d(e,o);s(54946);const r=(0,s(14486).default)(n.default,a.render,a.staticRenderFns,!1,null,"4f2aff84",null).exports},83382(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(60621),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n);const o=a.default},71991(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(76860),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n);const o=a.default},38335(t,e,s){"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(88838),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n);const o=a.default},93638(t,e,s){"use strict";s.r(e);var a=s(41671),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n)},28004(t,e,s){"use strict";s.r(e);var a=s(47665),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n)},69969(t,e,s){"use strict";s.r(e);var a=s(10118),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n)},703(t,e,s){"use strict";s.r(e);var a=s(19318),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n)},54019(t,e,s){"use strict";s.r(e);var a=s(37622),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n)},54946(t,e,s){"use strict";s.r(e);var a=s(10621),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);s.d(e,n)}},t=>{t.O(0,[3660],()=>{return e=15905,t(t.s=e);var e});t.O()}]); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 0b5e2185b..500dc70e0 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -9,7 +9,7 @@ "/js/compose.js": "/js/compose.js?id=026f9f5ad4c97335697df06eb89458fc", "/js/compose-classic.js": "/js/compose-classic.js?id=b335bd735825156da46bd75c881855fc", "/js/search.js": "/js/search.js?id=9dfe84a2449a214a2b0e6dd5b327e07d", - "/js/developers.js": "/js/developers.js?id=625ee01911e4480efbe842114cece956", + "/js/developers.js": "/js/developers.js?id=73ea3e8690ad2b28819b345cddcc347d", "/js/hashtag.js": "/js/hashtag.js?id=e379f9a05a735bd1c3b867573e6e7b78", "/js/collectioncompose.js": "/js/collectioncompose.js?id=8cc4606d6008b6a8c013462135ee958a", "/js/collections.js": "/js/collections.js?id=750737fae261565e19f49c4d373fcd83", diff --git a/resources/assets/js/components/passport/PersonalAccessTokens.vue b/resources/assets/js/components/passport/PersonalAccessTokens.vue index 14541a292..ea8cf4514 100644 --- a/resources/assets/js/components/passport/PersonalAccessTokens.vue +++ b/resources/assets/js/components/passport/PersonalAccessTokens.vue @@ -21,30 +21,56 @@
-

You have not created any personal access tokens.

- + + - - + - + + + + @@ -55,7 +81,6 @@ -
NameScopesExpires
- {{ token.name }} +
{{ token.name }}
+ + Created {{ formatDate(token.created_at) }} +
- + + + + + Never + + + {{ formatDate(token.expires_at) }} + (expired) + + + Delete