mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-29 00:13:17 +00:00
1 line
No EOL
5.1 KiB
JavaScript
Vendored
1 line
No EOL
5.1 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{16:function(t,e,i){t.exports=i("iBgk")},GicU:function(t,e,i){"use strict";i.r(e);var o={data:function(){return{limit:8,step:1,title:"",description:"",visibility:"private",ids:[],added:"",collection:[]}},mounted:function(){var t=this;axios.post("/api/local/collection/new").then(function(e){t.collection=e.data})},methods:{addToIds:function(){-1==this.ids.indexOf(this.added)?(this.ids.push(this.added),this.added=""):(window.alert("Invalid Post URL"),this.added="")}}},s=i("KHd+"),n=Object(s.a)(o,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"container"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col-12 col-md-6 offset-md-3 mt-5 pt-5"},[t._m(0),t._v(" "),i("div",{staticClass:"card"},[i("div",{staticClass:"card-body"},[1==t.step?i("div",[i("form",[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Title")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.collection.title,expression:"collection.title"}],staticClass:"form-control",attrs:{type:"text",id:"title",placeholder:"Collection Title"},domProps:{value:t.collection.title},on:{input:function(e){e.target.composing||t.$set(t.collection,"title",e.target.value)}}})]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"description"}},[t._v("Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.collection.description,expression:"collection.description"}],staticClass:"form-control",attrs:{id:"description",placeholder:"Example description here",rows:"3"},domProps:{value:t.collection.description},on:{input:function(e){e.target.composing||t.$set(t.collection,"description",e.target.value)}}})]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"visibility"}},[t._v("Visibility")]),t._v(" "),i("select",{directives:[{name:"model",rawName:"v-model",value:t.collection.visibility,expression:"collection.visibility"}],staticClass:"custom-select",on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.collection,"visibility",e.target.multiple?i:i[0])}}},[i("option",{attrs:{value:"public"}},[t._v("Public")]),t._v(" "),i("option",{attrs:{value:"private"}},[t._v("Followers Only")])])])])]):2==t.step?i("div",[i("form",[i("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Posts")]),t._v(" "),t.ids.length<=t.limit?i("div",[i("input",{directives:[{name:"model",rawName:"v-model",value:t.added,expression:"added"}],staticClass:"form-control",attrs:{type:"text",id:"title",placeholder:"https://pixelfed.dev/p/admin/1"},domProps:{value:t.added},on:{input:function(e){e.target.composing||(t.added=e.target.value)}}}),t._v(" "),i("button",{staticClass:"mt-2 btn btn-primary btn-block font-weight-bold py-1",attrs:{type:"button"},on:{click:t.addToIds}},[t._v("Add Post to Collection")])]):t._e(),t._v(" "),t._l(t.collection.items,function(t,e){return i("div",{staticClass:"form-group mt-3"},[i("input",{staticClass:"form-control my-1",attrs:{type:"text",disabled:""},domProps:{value:t.object_id}})])})],2)]):t._e()])]),t._v(" "),i("div",{staticClass:"d-flex justify-content-between mt-4"},[t.step>1?i("div",[i("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-1",on:{click:function(e){t.step--}}},[t._v("Back")])]):i("div",[i("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-1 disabled",attrs:{disabled:""}},[t._v("Back")])]),t._v(" "),t.step<3?i("div",[i("button",{staticClass:"btn btn-primary font-weight-bold py-1",on:{click:function(e){t.step++}}},[t._v("Next")])]):3==t.step?i("div",[i("button",{staticClass:"btn btn-primary font-weight-bold py-1",on:{click:function(e){t.step++}}},[t._v("Post")])]):i("div",[i("button",{staticClass:"btn btn-primary font-weight-bold py-1 disabled",attrs:{disabled:""}},[t._v("Next")])])])])])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center pb-4"},[e("h1",[this._v("Create Collection")])])}],!1,null,null,null);e.default=n.exports},"KHd+":function(t,e,i){"use strict";function o(t,e,i,o,s,n,l,a){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=i,d._compiled=!0),o&&(d.functional=!0),n&&(d._scopeId="data-v-"+n),l?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},d._ssrRegister=c):s&&(c=a?function(){s.call(this,this.$root.$options.shadowRoot)}:s),c)if(d.functional){d._injectStyles=c;var r=d.render;d.render=function(t,e){return c.call(e),r(t,e)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,c):[c]}return{exports:t,options:d}}i.d(e,"a",function(){return o})},iBgk:function(t,e,i){Vue.component("collection-compose",i("GicU").default)}},[[16,0]]]); |