generic-skin 3.7.8 → 3.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/vueChrono.js +26 -26
- package/apps/vueChrono.min.js +1 -1
- package/apps/vueDefault.js +24 -24
- package/apps/vueDefault.min.js +2 -2
- package/apps/vueMulti.js +24 -24
- package/apps/vueMulti.min.js +1 -1
- package/apps/vueRela.js +28 -28
- package/apps/vueRela.min.js +1 -1
- package/config/vueComponents.js +80 -80
- package/config/vueComponents.min.js +2 -2
- package/extensions/vueRouter.js +1 -1
- package/general.js +6 -6
- package/general.min.js +1 -1
- package/options/noManagers.js +15 -15
- package/options/noManagers.min.js +1 -1
- package/package.json +1 -1
- package/pages/ucp.js +14 -14
- package/pages/ucp.min.js +1 -1
package/apps/vueChrono.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Vue.component('modal-cronologia', {
|
|
2
|
-
props: ['
|
|
2
|
+
props: ['element', 'type'],
|
|
3
3
|
data() {
|
|
4
4
|
return {
|
|
5
5
|
page: 0,
|
|
@@ -12,15 +12,15 @@ Vue.component('modal-cronologia', {
|
|
|
12
12
|
selector: true
|
|
13
13
|
},
|
|
14
14
|
content: {
|
|
15
|
-
edit: JSON.parse(JSON.stringify(this.
|
|
16
|
-
current: this.
|
|
15
|
+
edit: JSON.parse(JSON.stringify(this.element)),
|
|
16
|
+
current: this.element
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
computed: {
|
|
21
21
|
modalTitle() {
|
|
22
|
-
if (this.
|
|
23
|
-
else if (this.
|
|
22
|
+
if (this.type === 'new') return 'Nueva entrada';
|
|
23
|
+
else if (this.type === 'edit') return 'Editar entrada';
|
|
24
24
|
},
|
|
25
25
|
oneCheck() {
|
|
26
26
|
let final = '';
|
|
@@ -198,7 +198,7 @@ Vue.component('modal-cronologia', {
|
|
|
198
198
|
this.info.people = list;
|
|
199
199
|
},
|
|
200
200
|
template: `
|
|
201
|
-
<modal-foro :
|
|
201
|
+
<modal-foro :title="modalTitle" @modal-close="modalClose()">
|
|
202
202
|
<template v-if="page === 0">
|
|
203
203
|
<template slot="content">
|
|
204
204
|
<aviso-foro v-show="oneCheck.length">
|
|
@@ -206,17 +206,17 @@ Vue.component('modal-cronologia', {
|
|
|
206
206
|
</aviso-foro>
|
|
207
207
|
<ul class="forum-fieldlist no-style">
|
|
208
208
|
<li>
|
|
209
|
-
<campo-foro
|
|
209
|
+
<campo-foro name="Título">
|
|
210
210
|
<input type="text" v-model="content.edit.name" placeholder="Escribe el nombre del tema." />
|
|
211
211
|
</campo-foro>
|
|
212
212
|
</li>
|
|
213
213
|
<li>
|
|
214
|
-
<campo-foro
|
|
214
|
+
<campo-foro name="Enlace">
|
|
215
215
|
<input type="text" v-model="content.edit.link" placeholder="Escribe el enlace del tema." />
|
|
216
216
|
</campo-foro>
|
|
217
217
|
</li>
|
|
218
218
|
<li>
|
|
219
|
-
<campo-foro
|
|
219
|
+
<campo-foro name="Fecha">
|
|
220
220
|
<div class="input-date">
|
|
221
221
|
<div class="date-element date-dmy">
|
|
222
222
|
<label>
|
|
@@ -262,7 +262,7 @@ Vue.component('modal-cronologia', {
|
|
|
262
262
|
</aviso-foro>
|
|
263
263
|
<ul class="forum-fieldlist no-style">
|
|
264
264
|
<li>
|
|
265
|
-
<campo-foro
|
|
265
|
+
<campo-foro name="Estado">
|
|
266
266
|
<div class="select-container">
|
|
267
267
|
<select v-model="content.edit.status">
|
|
268
268
|
<option value="-1" selected="selected" hidden="hidden">Selecciona un estado para el tema</option>
|
|
@@ -274,7 +274,7 @@ Vue.component('modal-cronologia', {
|
|
|
274
274
|
</campo-foro>
|
|
275
275
|
</li>
|
|
276
276
|
<li>
|
|
277
|
-
<campo-foro
|
|
277
|
+
<campo-foro name="Personajes">
|
|
278
278
|
<div class="character-selector">
|
|
279
279
|
<input type="text" v-model="info.user" placeholder="Escribe el nombre de un personaje." />
|
|
280
280
|
<ul class="no-style selector-list" v-if="sortedCharacters.length > 0 && info.selector">
|
|
@@ -458,11 +458,11 @@ Vue.component('gestor-cronologia', {
|
|
|
458
458
|
</div>
|
|
459
459
|
<separador-foro />
|
|
460
460
|
<template v-if="state.page === 0">
|
|
461
|
-
<cargando-foro
|
|
461
|
+
<cargando-foro text="Cargando utilidad…"></cargando-foro>
|
|
462
462
|
</template>
|
|
463
463
|
<template v-else-if="state.page === 1">
|
|
464
|
-
<modal-cronologia v-if="modal.status" :
|
|
465
|
-
<mando-foro
|
|
464
|
+
<modal-cronologia v-if="modal.status" :type="modal.type" :element="entry"></modal-cronologia>
|
|
465
|
+
<mando-foro id="upper-controls" app="true">
|
|
466
466
|
<template slot="pagination" v-if="paginationContent.pages.length > 1">
|
|
467
467
|
<a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" @click="state.pagination -= 1">
|
|
468
468
|
<i class="fas fa-chevron-left"></i>
|
|
@@ -477,10 +477,10 @@ Vue.component('gestor-cronologia', {
|
|
|
477
477
|
</template>
|
|
478
478
|
<template slot="controls">
|
|
479
479
|
<li @click="addEntry($event)">
|
|
480
|
-
<boton-foro
|
|
480
|
+
<boton-foro url="#" name="Añadir" icon="fas fa-plus"></boton-foro>
|
|
481
481
|
</li>
|
|
482
482
|
<li v-if="finalCheck" @click="save($event)">
|
|
483
|
-
<boton-foro
|
|
483
|
+
<boton-foro url="#" name="Guardar" icon="fas fa-save" type="no-name"></boton-foro>
|
|
484
484
|
</li>
|
|
485
485
|
</template>
|
|
486
486
|
</mando-foro>
|
|
@@ -491,10 +491,10 @@ Vue.component('gestor-cronologia', {
|
|
|
491
491
|
</li>
|
|
492
492
|
</template>
|
|
493
493
|
<template v-else v-for="rp in paginationContent.content">
|
|
494
|
-
<elemento-cronologia :
|
|
494
|
+
<elemento-cronologia :element="rp" type="manager" :id="rp.position" />
|
|
495
495
|
</template>
|
|
496
496
|
</ul>
|
|
497
|
-
<mando-foro
|
|
497
|
+
<mando-foro id="lower-controls" app="true">
|
|
498
498
|
<template slot="pagination" v-if="paginationContent.pages.length > 1">
|
|
499
499
|
<a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" @click="state.pagination -= 1">
|
|
500
500
|
<i class="fas fa-chevron-left"></i>
|
|
@@ -509,16 +509,16 @@ Vue.component('gestor-cronologia', {
|
|
|
509
509
|
</template>
|
|
510
510
|
<template slot="controls">
|
|
511
511
|
<li @click="addEntry($event)">
|
|
512
|
-
<boton-foro
|
|
512
|
+
<boton-foro url="#" name="Añadir" icon="fas fa-plus"></boton-foro>
|
|
513
513
|
</li>
|
|
514
514
|
<li v-if="finalCheck" @click="save($event)">
|
|
515
|
-
<boton-foro
|
|
515
|
+
<boton-foro url="#" name="Guardar" icon="fas fa-save" type="no-name"></boton-foro>
|
|
516
516
|
</li>
|
|
517
517
|
</template>
|
|
518
518
|
</mando-foro>
|
|
519
519
|
</template>
|
|
520
520
|
<template v-else-if="state.page === 2">
|
|
521
|
-
<cargando-foro
|
|
521
|
+
<cargando-foro text="Actualizando información…"></cargando-foro>
|
|
522
522
|
</template>
|
|
523
523
|
</section>
|
|
524
524
|
`
|
|
@@ -526,17 +526,17 @@ Vue.component('gestor-cronologia', {
|
|
|
526
526
|
|
|
527
527
|
|
|
528
528
|
Vue.component('elemento-cronologia', {
|
|
529
|
-
props: ['
|
|
529
|
+
props: ['element', 'type', 'id'],
|
|
530
530
|
data() {
|
|
531
531
|
return {
|
|
532
|
-
content: this.
|
|
532
|
+
content: this.element
|
|
533
533
|
}
|
|
534
534
|
},
|
|
535
535
|
methods: {
|
|
536
536
|
deleteElement() {
|
|
537
537
|
this.$parent.content.edit.splice(this.$parent.content.edit.map((item) => {
|
|
538
538
|
return item.position;
|
|
539
|
-
}).indexOf(this.
|
|
539
|
+
}).indexOf(this.id), 1);
|
|
540
540
|
|
|
541
541
|
if (this.$parent.paginationContent.content.length === 0 && this.$parent.state.pagination !== 0) {
|
|
542
542
|
this.$parent.state.pagination -= 1;
|
|
@@ -552,7 +552,7 @@ Vue.component('elemento-cronologia', {
|
|
|
552
552
|
},
|
|
553
553
|
template: `
|
|
554
554
|
<li class="rp-list">
|
|
555
|
-
<template v-if="
|
|
555
|
+
<template v-if="type === 'manager'">
|
|
556
556
|
<a class="rp-element rp-manager">
|
|
557
557
|
<div class="rp-icon">
|
|
558
558
|
<template v-if="content.status === 'ropened'">
|
|
@@ -578,7 +578,7 @@ Vue.component('elemento-cronologia', {
|
|
|
578
578
|
</div>
|
|
579
579
|
</a>
|
|
580
580
|
</template>
|
|
581
|
-
<template v-else-if="
|
|
581
|
+
<template v-else-if="type === 'profile'">
|
|
582
582
|
<a class="rp-element" :href="content.link" target="_blank" :title="'Ir al tema «' + content.name + '»'">
|
|
583
583
|
<div class="rp-icon">
|
|
584
584
|
<template v-if="content.status === 'ropened'">
|
package/apps/vueChrono.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Vue.component("modal-cronologia",{props:["dataElement","dataType"],data(){return{page:0,state:{modal:!1},info:{user:"",people:[],selector:!0},content:{edit:JSON.parse(JSON.stringify(this.dataElement)),current:this.dataElement}}},computed:{modalTitle(){return"new"===this.dataType?"Nueva entrada":"edit"===this.dataType?"Editar entrada":void 0},oneCheck(){let t="";if(!Object.keys(this.content.edit).length)return t;this.content.edit.name.length<5&&(t+="<li>Escribe un título lo suficientemente largo.</li>"),-1===this.content.edit.link.indexOf("/t")&&(t+="<li>Escribe un enlace válido.</li>");let e=[];if((1>parseFloat(this.content.edit.date.day)||parseFloat(this.content.edit.date.day)>forumData.date.day||""===this.content.edit.date.day||Number.isNaN(parseFloat(this.content.edit.date.day)))&&e.push("un día correcto (1 al "+forumData.date.day+")"),(1>parseFloat(this.content.edit.date.month)||parseFloat(this.content.edit.date.month)>forumData.date.month||""===this.content.edit.date.month||Number.isNaN(parseFloat(this.content.edit.date.month)))&&e.push("un mes correcto (1 al "+forumData.date.month+")"),("DFI"===this.content.edit.date.time&&parseFloat(this.content.edit.date.year)>forumData.date.year||"DFI"===this.content.edit.date.time&&parseFloat(this.content.edit.date.year)<1||""===this.content.edit.date.year||Number.isNaN(parseFloat(this.content.edit.date.year)))&&e.push("un año correcto"),-1===this.content.edit.date.time&&e.push("un periodo correcto"),e.length){let n="";n+="<li>Recuerda poner ",[].forEach.call(e,(t,e,a)=>{n+=t,a.length-2===e?n+=" y ":a.length===e+1?n+=".":a.length>e&&(n+=", ")}),n+="</li>",t+=n}return t},secondCheck(){let t="";return Object.keys(this.content.edit).length?(-1===this.content.edit.status&&(t+="<li>Selecciona un estado para el tema.</li>"),this.info.people.length||(t+="<li>Selecciona al menos un personaje.</li>"),t):t},finalCheck(){return JSON.stringify(this.content.current)!==JSON.stringify(this.finalData)},finalData(){let t=JSON.parse(JSON.stringify(this.content.edit));if(!Object.keys(this.content.edit).length)return t;let e="",n="";return[].forEach.call(JSON.parse(JSON.stringify(this.sortedEditCharacters)),(t,a,o)=>{e+=t,n+=Vue.filter("just-name")(t),o.length-2===a?(e+=" y ",n+=" y "):o.length===a+1?(e+="",n+=""):o.length>a&&(e+=", ",n+=", ")}),t.people.count=this.info.people.length,t.people.list=e,t.people.short=n,"new"===this.$parent.modal.type&&(t.position=this.$parent.content.edit.length),t},sortedCharacters(){return Object.keys(this.content.edit).length?this.$parent.users.map(t=>t.user).filter(t=>-1===this.info.people.indexOf(t)).filter(t=>t.toLowerCase().indexOf(this.info.user.toLowerCase())>-1):this.$parent.users.map(t=>t.user)},sortedEditCharacters(){return this.info.people.sort((t,e)=>t<e?-1:t>e?1:0)}},methods:{modalClose(){this.$parent.modal.type="new",this.$parent.modal.status=!1,this.$parent.setEntry()},pushElement(){"edit"===this.$parent.modal.type&&this.$parent.content.edit.splice(this.$parent.content.edit.map(t=>t.position).indexOf(this.content.current.position),1),this.$parent.content.edit.push(this.finalData),this.modalClose()},addCharacter:function(t){this.info.people.push(t),this.info.selector=!1,this.info.user="",setTimeout(()=>{this.info.selector=!0},250)},deleteCharacter:function(t){const e=JSON.parse(JSON.stringify(this.content.edit.status));this.info.people.splice(t,1),this.forceRerender(),this.content.edit.status=-1,this.content.edit.status=e}},created(){let t=[];""!==this.content.edit.people.list&&(t=-1===this.content.edit.people.list.indexOf(" y ")?[this.content.edit.people.list]:this.content.edit.people.list.split(" y ")[0].split(", ").concat(this.content.edit.people.list.split(" y ")[1])),this.info.people=t},template:'\n <modal-foro :data-title="modalTitle" @modal-close="modalClose()">\n <template v-if="page === 0">\n <template slot="content">\n <aviso-foro v-show="oneCheck.length">\n <ul v-html="oneCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro data-name="Título">\n <input type="text" v-model="content.edit.name" placeholder="Escribe el nombre del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Enlace">\n <input type="text" v-model="content.edit.link" placeholder="Escribe el enlace del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Fecha">\n <div class="input-date">\n <div class="date-element date-dmy">\n <label>\n Día\n <input type="text" v-model="content.edit.date.day" placeholder="0" />\n </label>\n <label>\n Mes\n <input type="text" v-model="content.edit.date.month" placeholder="0" />\n </label>\n <label>\n Año\n <input type="text" v-model="content.edit.date.year" placeholder="0" />\n </label>\n </div>\n <div class="date-element not-show mt-4">\n <label>\n Periodo\n <div class="select-container">\n <select v-model="content.edit.date.time">\n <option value="-1" hidden>-</option>\n <option value="AFI">AFI</option>\n <option value="DFI">DFI</option>\n </select>\n </div>\n </label>\n </div>\n </div>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls" v-if="!oneCheck.length">\n <controles-modal>\n <button class="button1 btn-main" @click="page = 1" title="Paso siguiente">Siguiente</button>\n </controles-modal>\n </template>\n </template>\n <template v-else-if="page === 1">\n <template slot="content">\n <aviso-foro v-show="secondCheck.length">\n <ul v-html="secondCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro data-name="Estado">\n <div class="select-container">\n <select v-model="content.edit.status">\n <option value="-1" selected="selected" hidden="hidden">Selecciona un estado para el tema</option>\n <option value="ropened">Activo</option>\n <option value="rclosed">Cerrado</option>\n <option value="rabandoned">Abandonado</option>\n </select>\n </div>\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Personajes">\n <div class="character-selector">\n <input type="text" v-model="info.user" placeholder="Escribe el nombre de un personaje." />\n <ul class="no-style selector-list" v-if="sortedCharacters.length > 0 && info.selector">\n <li v-for="(character, index) in sortedCharacters" @click="addCharacter(character)" :title="\'Seleccionar «\' + character + \'»\'">{{ character }}<i class="fas fa-plus"></i></li>\n </ul>\n <a class="character-custom" @click="addCharacter(info.user)" v-if="info.user.length > 2" :title="\'Seleccionar «\' + info.user + \'»\'">\n <i class="fas fa-plus"></i>\n </a>\n </div>\n <ul v-if="info.people.length" class="no-style character-list">\n <li v-for="(character, index) in sortedEditCharacters" @click="deleteCharacter(index)" :title="\'Quitar \' + character"><i class="fas fa-times"></i> {{ character }}</li>\n </ul>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls">\n <controles-modal>\n <button class="button2" @click="page = 0" title="Paso anterior">Anterior</button>\n <button class="button1 btn-main" @click="pushElement()" v-if="!secondCheck.length && finalCheck" title="Guardar entrada">Guardar</button>\n </controles-modal>\n </template>\n </template>\n </modal-foro>\n '}),Vue.component("gestor-cronologia",{data:()=>({render:0,modal:{type:"new",status:!1},users:[],state:{page:0,pagination:0},entry:{},content:{edit:[],current:[]}}),computed:{sortedContent(){return JSON.parse(JSON.stringify(this.content.edit)).sort(({date:t,name:e},{date:n,name:a})=>{if(t.time!==n.time)return"AFI"===t.time?-1:1;const o="AFI"===t.time?n:t,i="AFI"===t.time?t:n;return parseFloat(t.year)!==parseFloat(n.year)?parseFloat(o.year)-parseFloat(i.year):parseFloat(t.month)!==parseFloat(n.month)?parseFloat(o.month)-parseFloat(i.month):parseFloat(t.day)!==parseFloat(n.day)?parseFloat(o.day)-parseFloat(i.day):e-a})},paginationContent(){const t=forumConfig.skinOptions.paginationDefault,e=Math.floor((this.sortedContent.length-1)/t)+1;let n=[];for(let t=0;t<e;t++)n.push(t);return this.forceRerender(),{pages:n,content:this.sortedContent.slice(this.state.pagination*t,(this.state.pagination+1)*t)}},finalCheck(){return JSON.stringify(this.content.current)!==JSON.stringify(this.content.edit)}},methods:{forceRerender(){this.render+=1},setEntry(){this.entry={link:"",name:"",status:-1,people:{list:"",short:"",count:0},date:{time:"DFI",day:"",month:"",year:""}}},addEntry:function(t){t.preventDefault(),this.modal.status=!0},save:function(t){t.preventDefault(),this.state.page=2;const e=this.sortedContent.map(t=>(void 0!==t.desc&&delete t.desc,void 0!==t.position&&delete t.position,t));FNR.user.profile.setData([{name:forumConfig.profileUser.cronoField,type:"textarea",value:JSON.stringify(e).replace(/"/g,"`")}]).then(t=>{t?(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),setTimeout(()=>{window.location.reload()},2e3)):FNR.html.genNotification("Atención","Hubo un problema al actualizar. Dale otro intento.","fas fa-exclamation")})}},created(){FNR.user.profile.getData([{name:forumConfig.profileUser.cronoField,type:"textarea"}]).then(t=>{const e=FNR.utility.genArray(t[0].value).map((t,e)=>{let n=t;return n.position=e,n});this.content.edit=e,this.content.current=JSON.parse(JSON.stringify(e)),FNR.forum.getMembers().then(t=>{this.setEntry(),this.users=t,this.state.page=1})})},template:'\n <section id="forum-chronology" class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Cronología</h2>\n <hr />\n <p>En esta página podrás editar la cronología de tu personaje.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro data-text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <modal-cronologia v-if="modal.status" :data-type="modal.type" :data-element="entry"></modal-cronologia>\n <mando-foro data-id="upper-controls" data-app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" @click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" :title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else @click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" @click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li @click="addEntry($event)">\n <boton-foro data-url="#" data-name="Añadir" data-icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" @click="save($event)">\n <boton-foro data-url="#" data-name="Guardar" data-icon="fas fa-save" data-type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n <ul id="forum-rplist" :class="\'no-style\' + (!paginationContent.content.length ? \' no-results\': \'\')" :key="render">\n <template v-if="!paginationContent.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No hay entradas en tu cronología</h6>\n </li>\n </template>\n <template v-else v-for="rp in paginationContent.content">\n <elemento-cronologia :data-element="rp" data-type="manager" :data-id="rp.position" />\n </template>\n </ul>\n <mando-foro data-id="lower-controls" data-app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" @click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" :title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else @click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" @click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li @click="addEntry($event)">\n <boton-foro data-url="#" data-name="Añadir" data-icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" @click="save($event)">\n <boton-foro data-url="#" data-name="Guardar" data-icon="fas fa-save" data-type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n </template>\n <template v-else-if="state.page === 2">\n <cargando-foro data-text="Actualizando información…"></cargando-foro>\n </template>\n </section>\n '}),Vue.component("elemento-cronologia",{props:["dataElement","dataType","dataId"],data(){return{content:this.dataElement}},methods:{deleteElement(){this.$parent.content.edit.splice(this.$parent.content.edit.map(t=>t.position).indexOf(this.dataId),1),0===this.$parent.paginationContent.content.length&&0!==this.$parent.state.pagination&&(this.$parent.state.pagination-=1),this.$parent.forceRerender()},editElement(){this.$parent.modal.type="edit",this.$parent.entry=this.content,this.$parent.modal.status=!0}},template:'\n <li class="rp-list">\n <template v-if="dataType === \'manager\'">\n <a class="rp-element rp-manager">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n <div class="rp-controls">\n <span @click="editElement()" title="Editar entrada">Editar</span> / <span @click="deleteElement()" title="Eliminar entrada">Eliminar</span>\n </div>\n </div>\n </a>\n </template>\n <template v-else-if="dataType === \'profile\'">\n <a class="rp-element" :href="content.link" target="_blank" :title="\'Ir al tema «\' + content.name + \'»\'">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n </div>\n </a>\n </template>\n </li>\n '});
|
|
1
|
+
Vue.component("modal-cronologia",{props:["element","type"],data(){return{page:0,state:{modal:!1},info:{user:"",people:[],selector:!0},content:{edit:JSON.parse(JSON.stringify(this.element)),current:this.element}}},computed:{modalTitle(){return"new"===this.type?"Nueva entrada":"edit"===this.type?"Editar entrada":void 0},oneCheck(){let t="";if(!Object.keys(this.content.edit).length)return t;this.content.edit.name.length<5&&(t+="<li>Escribe un título lo suficientemente largo.</li>"),-1===this.content.edit.link.indexOf("/t")&&(t+="<li>Escribe un enlace válido.</li>");let e=[];if((1>parseFloat(this.content.edit.date.day)||parseFloat(this.content.edit.date.day)>forumData.date.day||""===this.content.edit.date.day||Number.isNaN(parseFloat(this.content.edit.date.day)))&&e.push("un día correcto (1 al "+forumData.date.day+")"),(1>parseFloat(this.content.edit.date.month)||parseFloat(this.content.edit.date.month)>forumData.date.month||""===this.content.edit.date.month||Number.isNaN(parseFloat(this.content.edit.date.month)))&&e.push("un mes correcto (1 al "+forumData.date.month+")"),("DFI"===this.content.edit.date.time&&parseFloat(this.content.edit.date.year)>forumData.date.year||"DFI"===this.content.edit.date.time&&parseFloat(this.content.edit.date.year)<1||""===this.content.edit.date.year||Number.isNaN(parseFloat(this.content.edit.date.year)))&&e.push("un año correcto"),-1===this.content.edit.date.time&&e.push("un periodo correcto"),e.length){let n="";n+="<li>Recuerda poner ",[].forEach.call(e,(t,e,a)=>{n+=t,a.length-2===e?n+=" y ":a.length===e+1?n+=".":a.length>e&&(n+=", ")}),n+="</li>",t+=n}return t},secondCheck(){let t="";return Object.keys(this.content.edit).length?(-1===this.content.edit.status&&(t+="<li>Selecciona un estado para el tema.</li>"),this.info.people.length||(t+="<li>Selecciona al menos un personaje.</li>"),t):t},finalCheck(){return JSON.stringify(this.content.current)!==JSON.stringify(this.finalData)},finalData(){let t=JSON.parse(JSON.stringify(this.content.edit));if(!Object.keys(this.content.edit).length)return t;let e="",n="";return[].forEach.call(JSON.parse(JSON.stringify(this.sortedEditCharacters)),(t,a,o)=>{e+=t,n+=Vue.filter("just-name")(t),o.length-2===a?(e+=" y ",n+=" y "):o.length===a+1?(e+="",n+=""):o.length>a&&(e+=", ",n+=", ")}),t.people.count=this.info.people.length,t.people.list=e,t.people.short=n,"new"===this.$parent.modal.type&&(t.position=this.$parent.content.edit.length),t},sortedCharacters(){return Object.keys(this.content.edit).length?this.$parent.users.map(t=>t.user).filter(t=>-1===this.info.people.indexOf(t)).filter(t=>t.toLowerCase().indexOf(this.info.user.toLowerCase())>-1):this.$parent.users.map(t=>t.user)},sortedEditCharacters(){return this.info.people.sort((t,e)=>t<e?-1:t>e?1:0)}},methods:{modalClose(){this.$parent.modal.type="new",this.$parent.modal.status=!1,this.$parent.setEntry()},pushElement(){"edit"===this.$parent.modal.type&&this.$parent.content.edit.splice(this.$parent.content.edit.map(t=>t.position).indexOf(this.content.current.position),1),this.$parent.content.edit.push(this.finalData),this.modalClose()},addCharacter(t){this.info.people.push(t),this.info.selector=!1,this.info.user="",setTimeout(()=>{this.info.selector=!0},250)},deleteCharacter(t){const e=JSON.parse(JSON.stringify(this.content.edit.status));this.info.people.splice(t,1),this.forceRerender(),this.content.edit.status=-1,this.content.edit.status=e}},created(){let t=[];""!==this.content.edit.people.list&&(t=-1===this.content.edit.people.list.indexOf(" y ")?[this.content.edit.people.list]:this.content.edit.people.list.split(" y ")[0].split(", ").concat(this.content.edit.people.list.split(" y ")[1])),this.info.people=t},template:'\n <modal-foro :title="modalTitle" @modal-close="modalClose()">\n <template v-if="page === 0">\n <template slot="content">\n <aviso-foro v-show="oneCheck.length">\n <ul v-html="oneCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro name="Título">\n <input type="text" v-model="content.edit.name" placeholder="Escribe el nombre del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro name="Enlace">\n <input type="text" v-model="content.edit.link" placeholder="Escribe el enlace del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro name="Fecha">\n <div class="input-date">\n <div class="date-element date-dmy">\n <label>\n Día\n <input type="text" v-model="content.edit.date.day" placeholder="0" />\n </label>\n <label>\n Mes\n <input type="text" v-model="content.edit.date.month" placeholder="0" />\n </label>\n <label>\n Año\n <input type="text" v-model="content.edit.date.year" placeholder="0" />\n </label>\n </div>\n <div class="date-element not-show mt-4">\n <label>\n Periodo\n <div class="select-container">\n <select v-model="content.edit.date.time">\n <option value="-1" hidden>-</option>\n <option value="AFI">AFI</option>\n <option value="DFI">DFI</option>\n </select>\n </div>\n </label>\n </div>\n </div>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls" v-if="!oneCheck.length">\n <controles-modal>\n <button class="button1 btn-main" @click="page = 1" title="Paso siguiente">Siguiente</button>\n </controles-modal>\n </template>\n </template>\n <template v-else-if="page === 1">\n <template slot="content">\n <aviso-foro v-show="secondCheck.length">\n <ul v-html="secondCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro name="Estado">\n <div class="select-container">\n <select v-model="content.edit.status">\n <option value="-1" selected="selected" hidden="hidden">Selecciona un estado para el tema</option>\n <option value="ropened">Activo</option>\n <option value="rclosed">Cerrado</option>\n <option value="rabandoned">Abandonado</option>\n </select>\n </div>\n </campo-foro>\n </li>\n <li>\n <campo-foro name="Personajes">\n <div class="character-selector">\n <input type="text" v-model="info.user" placeholder="Escribe el nombre de un personaje." />\n <ul class="no-style selector-list" v-if="sortedCharacters.length > 0 && info.selector">\n <li v-for="(character, index) in sortedCharacters" @click="addCharacter(character)" :title="\'Seleccionar «\' + character + \'»\'">{{ character }}<i class="fas fa-plus"></i></li>\n </ul>\n <a class="character-custom" @click="addCharacter(info.user)" v-if="info.user.length > 2" :title="\'Seleccionar «\' + info.user + \'»\'">\n <i class="fas fa-plus"></i>\n </a>\n </div>\n <ul v-if="info.people.length" class="no-style character-list">\n <li v-for="(character, index) in sortedEditCharacters" @click="deleteCharacter(index)" :title="\'Quitar \' + character"><i class="fas fa-times"></i> {{ character }}</li>\n </ul>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls">\n <controles-modal>\n <button class="button2" @click="page = 0" title="Paso anterior">Anterior</button>\n <button class="button1 btn-main" @click="pushElement()" v-if="!secondCheck.length && finalCheck" title="Guardar entrada">Guardar</button>\n </controles-modal>\n </template>\n </template>\n </modal-foro>\n '}),Vue.component("gestor-cronologia",{data:()=>({render:0,modal:{type:"new",status:!1},users:[],state:{page:0,pagination:0},entry:{},content:{edit:[],current:[]}}),computed:{sortedContent(){return JSON.parse(JSON.stringify(this.content.edit)).sort(({date:t,name:e},{date:n,name:a})=>{if(t.time!==n.time)return"AFI"===t.time?-1:1;const o="AFI"===t.time?n:t,i="AFI"===t.time?t:n;return parseFloat(t.year)!==parseFloat(n.year)?parseFloat(o.year)-parseFloat(i.year):parseFloat(t.month)!==parseFloat(n.month)?parseFloat(o.month)-parseFloat(i.month):parseFloat(t.day)!==parseFloat(n.day)?parseFloat(o.day)-parseFloat(i.day):e-a})},paginationContent(){const t=forumConfig.skinOptions.paginationDefault,e=Math.floor((this.sortedContent.length-1)/t)+1;let n=[];for(let t=0;t<e;t++)n.push(t);return this.forceRerender(),{pages:n,content:this.sortedContent.slice(this.state.pagination*t,(this.state.pagination+1)*t)}},finalCheck(){return JSON.stringify(this.content.current)!==JSON.stringify(this.content.edit)}},methods:{forceRerender(){this.render+=1},setEntry(){this.entry={link:"",name:"",status:-1,people:{list:"",short:"",count:0},date:{time:"DFI",day:"",month:"",year:""}}},addEntry(t){t.preventDefault(),this.modal.status=!0},save(t){t.preventDefault(),this.state.page=2;const e=this.sortedContent.map(t=>(void 0!==t.desc&&delete t.desc,void 0!==t.position&&delete t.position,t));FNR.user.profile.setData([{name:forumConfig.profileUser.cronoField,type:"textarea",value:JSON.stringify(e).replace(/"/g,"`")}]).then(t=>{t?(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),setTimeout(()=>{window.location.reload()},2e3)):FNR.html.genNotification("Atención","Hubo un problema al actualizar. Dale otro intento.","fas fa-exclamation")})}},created(){FNR.user.profile.getData([{name:forumConfig.profileUser.cronoField,type:"textarea"}]).then(t=>{const e=FNR.utility.genArray(t[0].value).map((t,e)=>{let n=t;return n.position=e,n});this.content.edit=e,this.content.current=JSON.parse(JSON.stringify(e)),FNR.forum.getMembers().then(t=>{this.setEntry(),this.users=t,this.state.page=1})})},template:'\n <section id="forum-chronology" class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Cronología</h2>\n <hr />\n <p>En esta página podrás editar la cronología de tu personaje.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <modal-cronologia v-if="modal.status" :type="modal.type" :element="entry"></modal-cronologia>\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" @click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" :title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else @click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" @click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li @click="addEntry($event)">\n <boton-foro url="#" name="Añadir" icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" @click="save($event)">\n <boton-foro url="#" name="Guardar" icon="fas fa-save" type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n <ul id="forum-rplist" :class="\'no-style\' + (!paginationContent.content.length ? \' no-results\': \'\')" :key="render">\n <template v-if="!paginationContent.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No hay entradas en tu cronología</h6>\n </li>\n </template>\n <template v-else v-for="rp in paginationContent.content">\n <elemento-cronologia :element="rp" type="manager" :id="rp.position" />\n </template>\n </ul>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" @click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" :title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else @click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" @click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li @click="addEntry($event)">\n <boton-foro url="#" name="Añadir" icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" @click="save($event)">\n <boton-foro url="#" name="Guardar" icon="fas fa-save" type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n </template>\n <template v-else-if="state.page === 2">\n <cargando-foro text="Actualizando información…"></cargando-foro>\n </template>\n </section>\n '}),Vue.component("elemento-cronologia",{props:["element","type","id"],data(){return{content:this.element}},methods:{deleteElement(){this.$parent.content.edit.splice(this.$parent.content.edit.map(t=>t.position).indexOf(this.id),1),0===this.$parent.paginationContent.content.length&&0!==this.$parent.state.pagination&&(this.$parent.state.pagination-=1),this.$parent.forceRerender()},editElement(){this.$parent.modal.type="edit",this.$parent.entry=this.content,this.$parent.modal.status=!0}},template:'\n <li class="rp-list">\n <template v-if="type === \'manager\'">\n <a class="rp-element rp-manager">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n <div class="rp-controls">\n <span @click="editElement()" title="Editar entrada">Editar</span> / <span @click="deleteElement()" title="Eliminar entrada">Eliminar</span>\n </div>\n </div>\n </a>\n </template>\n <template v-else-if="type === \'profile\'">\n <a class="rp-element" :href="content.link" target="_blank" :title="\'Ir al tema «\' + content.name + \'»\'">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n </div>\n </a>\n </template>\n </li>\n '});
|
package/apps/vueDefault.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Vue.component('panel-control', {
|
|
2
|
-
props: ['
|
|
2
|
+
props: ['elements'],
|
|
3
3
|
data() {
|
|
4
4
|
return {
|
|
5
5
|
userId: _userdata.user_id,
|
|
@@ -66,7 +66,7 @@ Vue.component('panel-control', {
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
created() {
|
|
69
|
-
FNR.user.profile.getData(JSON.parse(this.
|
|
69
|
+
FNR.user.profile.getData(JSON.parse(this.elements.replace(/'/g, '"'))).then((r) => {
|
|
70
70
|
this.content.original = JSON.parse(JSON.stringify(r));
|
|
71
71
|
this.content.current = r;
|
|
72
72
|
this.state.page = 1;
|
|
@@ -83,7 +83,7 @@ Vue.component('panel-control', {
|
|
|
83
83
|
</div>
|
|
84
84
|
<separador-foro />
|
|
85
85
|
<template v-if="state.page === 0">
|
|
86
|
-
<cargando-foro
|
|
86
|
+
<cargando-foro text="Cargando utilidad…"></cargando-foro>
|
|
87
87
|
</template>
|
|
88
88
|
<template v-else-if="state.page === 1">
|
|
89
89
|
<aviso-foro v-show="validationPanel !== ''">
|
|
@@ -91,7 +91,7 @@ Vue.component('panel-control', {
|
|
|
91
91
|
</aviso-foro>
|
|
92
92
|
<ul class="forum-fieldlist no-style">
|
|
93
93
|
<li v-for="item in content.current">
|
|
94
|
-
<campo-foro :
|
|
94
|
+
<campo-foro :name="item.name">
|
|
95
95
|
<input v-model="item.value" v-if="item.type === 'input' || item.type === 'avatar'" type="text"/>
|
|
96
96
|
<textarea v-model="item.value" v-else-if="item.type === 'textarea'"></textarea>
|
|
97
97
|
<div v-else-if="item.type === 'select'" class="select-container">
|
|
@@ -107,7 +107,7 @@ Vue.component('panel-control', {
|
|
|
107
107
|
</div>
|
|
108
108
|
</template>
|
|
109
109
|
<template v-if="state.page === 2">
|
|
110
|
-
<cargando-foro
|
|
110
|
+
<cargando-foro text="Actualizando información…"></cargando-foro>
|
|
111
111
|
</template>
|
|
112
112
|
</section>
|
|
113
113
|
`
|
|
@@ -139,14 +139,14 @@ Vue.component('lista-bosquejos', {
|
|
|
139
139
|
</div>
|
|
140
140
|
<separador-foro />
|
|
141
141
|
<template v-if="state.page === 0">
|
|
142
|
-
<cargando-foro
|
|
142
|
+
<cargando-foro text="Cargando utilidad…"></cargando-foro>
|
|
143
143
|
</template>
|
|
144
144
|
<template v-else-if="state.page === 1">
|
|
145
145
|
<section id="forum-drafts" class="forum-topiclist">
|
|
146
146
|
<div class="is-content mb-4">
|
|
147
147
|
<h4>Mensajes</h4>
|
|
148
148
|
</div>
|
|
149
|
-
<lista-temas-cabecera
|
|
149
|
+
<lista-temas-cabecera elements="['Tema', 'Información']"></lista-temas-cabecera>
|
|
150
150
|
<ul :class="'topiclist-topics no-style' + (!drafts.msgDrafts.length ? ' no-results': '')">
|
|
151
151
|
<template v-if="!drafts.msgDrafts.length">
|
|
152
152
|
<li class="is-not-topic is-not-lastpost">
|
|
@@ -155,7 +155,7 @@ Vue.component('lista-bosquejos', {
|
|
|
155
155
|
</template>
|
|
156
156
|
<template v-else>
|
|
157
157
|
<li class="row is-not-topic is-not-lastpost" v-for="draft in drafts.msgDrafts">
|
|
158
|
-
<temas-foro
|
|
158
|
+
<temas-foro type="draft" mode="" :url="draft.topic.url" :replies="draft.info.location" :views="draft.info.date" :quick="draft.modify">
|
|
159
159
|
<template slot="title">{{ draft.topic.name }}</template>
|
|
160
160
|
</temas-foro>
|
|
161
161
|
</li>
|
|
@@ -164,7 +164,7 @@ Vue.component('lista-bosquejos', {
|
|
|
164
164
|
<div class="is-content mt-5 mb-4">
|
|
165
165
|
<h4>Temas</h4>
|
|
166
166
|
</div>
|
|
167
|
-
<lista-temas-cabecera
|
|
167
|
+
<lista-temas-cabecera elements="['Tema', 'Información']"></lista-temas-cabecera>
|
|
168
168
|
<ul :class="'topiclist-topics no-style' + (!drafts.topicDrafts.length ? ' no-results': '')">
|
|
169
169
|
<template v-if="!drafts.topicDrafts.length">
|
|
170
170
|
<li class="is-not-topic is-not-lastpost">
|
|
@@ -173,7 +173,7 @@ Vue.component('lista-bosquejos', {
|
|
|
173
173
|
</template>
|
|
174
174
|
<template v-else>
|
|
175
175
|
<li class="row is-not-topic is-not-lastpost" v-for="draft in drafts.topicDrafts">
|
|
176
|
-
<temas-foro
|
|
176
|
+
<temas-foro type="draft" mode="" :url="draft.topic.url" :replies="draft.info.location" :views="draft.info.date" :quick="draft.modify">
|
|
177
177
|
<template slot="title">{{ draft.topic.name }}</template>
|
|
178
178
|
</temas-foro>
|
|
179
179
|
</li>
|
|
@@ -310,10 +310,10 @@ Vue.component('lista-seguidos', {
|
|
|
310
310
|
</div>
|
|
311
311
|
<separador-foro />
|
|
312
312
|
<template v-if="state.page === 0">
|
|
313
|
-
<cargando-foro
|
|
313
|
+
<cargando-foro text="Cargando utilidad…"></cargando-foro>
|
|
314
314
|
</template>
|
|
315
315
|
<template v-else-if="state.page === 1">
|
|
316
|
-
<mando-foro
|
|
316
|
+
<mando-foro id="upper-controls" app="true">
|
|
317
317
|
<template slot="pagination" v-if="followed.pages.length > 1">
|
|
318
318
|
<a class="page-action" title="Ir a la página anterior" v-if="followed.page > 0" @click="setPage(followed.page -= 1)">
|
|
319
319
|
<i class="fas fa-chevron-left"></i>
|
|
@@ -328,12 +328,12 @@ Vue.component('lista-seguidos', {
|
|
|
328
328
|
</template>
|
|
329
329
|
<template slot="controls">
|
|
330
330
|
<li @click="delTopics()">
|
|
331
|
-
<boton-foro
|
|
331
|
+
<boton-foro url="javascript:{}" name="Retirar" icon="fas fa-minus"></boton-foro>
|
|
332
332
|
</li>
|
|
333
333
|
</template>
|
|
334
334
|
</mando-foro>
|
|
335
335
|
<section id="forum-followed" class="forum-topiclist">
|
|
336
|
-
<lista-temas-cabecera
|
|
336
|
+
<lista-temas-cabecera elements="['Tema', 'Información']"></lista-temas-cabecera>
|
|
337
337
|
<ul :class="'topiclist-topics no-style' + (!followed.content.length || followed.loading === 0 ? ' no-results': '')">
|
|
338
338
|
<template v-if="!followed.content.length">
|
|
339
339
|
<li class="is-not-topic is-not-lastpost">
|
|
@@ -342,12 +342,12 @@ Vue.component('lista-seguidos', {
|
|
|
342
342
|
</template>
|
|
343
343
|
<template v-else-if="followed.loading === 0">
|
|
344
344
|
<li class="is-not-topic is-not-lastpost">
|
|
345
|
-
<cargando-foro
|
|
345
|
+
<cargando-foro text="Cargando temas…"></cargando-foro>
|
|
346
346
|
</li>
|
|
347
347
|
</template>
|
|
348
348
|
<template v-else>
|
|
349
349
|
<li class="row is-not-topic is-not-lastpost" v-for="topic in followed.content" :key="topic.id">
|
|
350
|
-
<temas-foro
|
|
350
|
+
<temas-foro type="followed" mode="" :url="topic.url" :replies="topic.replies + ' respuestas'" :views="topic.views + ' visitas'">
|
|
351
351
|
<template slot="title">{{ topic.name }}</template>
|
|
352
352
|
<template slot="radio">
|
|
353
353
|
<div :class="'forum-checkbox' + (state.selected.indexOf(topic.id) === -1 ? '' : ' is-active')">
|
|
@@ -363,7 +363,7 @@ Vue.component('lista-seguidos', {
|
|
|
363
363
|
</template>
|
|
364
364
|
</ul>
|
|
365
365
|
</section>
|
|
366
|
-
<mando-foro
|
|
366
|
+
<mando-foro id="lower-controls" app="true">
|
|
367
367
|
<template slot="pagination" v-if="followed.pages.length > 1">
|
|
368
368
|
<a class="page-action" title="Ir a la página anterior" v-if="followed.page > 0" @click="setPage(followed.page -= 1)">
|
|
369
369
|
<i class="fas fa-chevron-left"></i>
|
|
@@ -378,7 +378,7 @@ Vue.component('lista-seguidos', {
|
|
|
378
378
|
</template>
|
|
379
379
|
<template slot="controls">
|
|
380
380
|
<li @click="delTopics()">
|
|
381
|
-
<boton-foro
|
|
381
|
+
<boton-foro url="javascript:{}" name="Retirar" icon="fas fa-minus"></boton-foro>
|
|
382
382
|
</li>
|
|
383
383
|
</template>
|
|
384
384
|
</mando-foro>
|
|
@@ -1064,7 +1064,7 @@ Vue.component('editor-foro', {
|
|
|
1064
1064
|
template: `
|
|
1065
1065
|
<div id="forum-usereply">
|
|
1066
1066
|
<template v-if="state.page === 0">
|
|
1067
|
-
<cargando-foro
|
|
1067
|
+
<cargando-foro text="Cargando utilidad…"></cargando-foro>
|
|
1068
1068
|
</template>
|
|
1069
1069
|
<template v-else-if="state.page === 1">
|
|
1070
1070
|
<aviso-foro v-show="msgCheck.length">
|
|
@@ -1073,14 +1073,14 @@ Vue.component('editor-foro', {
|
|
|
1073
1073
|
<ul id="usereply-extra" class="forum-fieldlist no-style" v-if="state.editor !== 'reply'">
|
|
1074
1074
|
<template v-if="state.guest">
|
|
1075
1075
|
<li>
|
|
1076
|
-
<campo-foro
|
|
1076
|
+
<campo-foro name="Nombre de usuario">
|
|
1077
1077
|
<input type="text" v-model="content.username" placeholder="Escribe tu nombre de usuario." />
|
|
1078
1078
|
</campo-foro>
|
|
1079
1079
|
</li>
|
|
1080
1080
|
</template>
|
|
1081
1081
|
<template v-if="state.editor === 'post'">
|
|
1082
1082
|
<li>
|
|
1083
|
-
<campo-foro
|
|
1083
|
+
<campo-foro name="Usuarios">
|
|
1084
1084
|
<div class="character-selector">
|
|
1085
1085
|
<input type="text" v-model="users.current" placeholder="Escribe el nombre de un usuario." :disabled="groups.type !== -1" />
|
|
1086
1086
|
<ul class="no-style selector-list" v-if="users.selector && sortedCharacters.length > 0">
|
|
@@ -1096,7 +1096,7 @@ Vue.component('editor-foro', {
|
|
|
1096
1096
|
<template v-if="state.admin">
|
|
1097
1097
|
<template v-if="state.editor === 'post'">
|
|
1098
1098
|
<li>
|
|
1099
|
-
<campo-foro
|
|
1099
|
+
<campo-foro name="Grupo">
|
|
1100
1100
|
<div class="select-container">
|
|
1101
1101
|
<select v-model="groups.type" @change="changeGroup()" :disabled="users.selected.length !== 0">
|
|
1102
1102
|
<option value="-1" hidden>Selecciona un grupo.</option>
|
|
@@ -1108,7 +1108,7 @@ Vue.component('editor-foro', {
|
|
|
1108
1108
|
</template>
|
|
1109
1109
|
<template v-else-if="content.type !== -1 && (state.editor === 'newtopic' || state.editor === 'edittopicdraft')">
|
|
1110
1110
|
<li>
|
|
1111
|
-
<campo-foro
|
|
1111
|
+
<campo-foro name="Tipo de tema">
|
|
1112
1112
|
<div class="select-container">
|
|
1113
1113
|
<select v-model="content.type">
|
|
1114
1114
|
<option value="-1" hidden>Selecciona una opción.</option>
|
|
@@ -1121,7 +1121,7 @@ Vue.component('editor-foro', {
|
|
|
1121
1121
|
</template>
|
|
1122
1122
|
<template v-if="state.editor === 'newtopic' || state.editor === 'post' || state.editor === 'edittopicdraft'">
|
|
1123
1123
|
<li>
|
|
1124
|
-
<campo-foro
|
|
1124
|
+
<campo-foro name="Título">
|
|
1125
1125
|
<input type="text" v-model="content.subject" placeholder="Escribe el título." />
|
|
1126
1126
|
</campo-foro>
|
|
1127
1127
|
</li>
|