From b28182d11016a217dccfe30383a04cf33042c145 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 14 Oct 2019 11:41:57 +0200 Subject: [PATCH] Prevent picture resend on event update, handle duplicate pictures properly in backend and add a proper default picture Signed-off-by: Thomas Citharel --- js/public/img/mobilizon_default_card.png | Bin 0 -> 9034 bytes js/src/components/Event/EventCard.vue | 11 +++++++---- js/src/components/PictureUpload.vue | 1 + js/src/types/picture.model.ts | 1 + js/src/views/Event/Edit.vue | 23 ++++++++++++++++++----- js/src/views/Event/Event.vue | 19 ++++++++----------- lib/mobilizon_web/schema/picture.ex | 2 +- lib/service/activity_pub/utils.ex | 7 +++++++ schema.graphql | 4 ++-- 9 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 js/public/img/mobilizon_default_card.png diff --git a/js/public/img/mobilizon_default_card.png b/js/public/img/mobilizon_default_card.png new file mode 100644 index 0000000000000000000000000000000000000000..8f9ccdf7cb2c6e7b2b4872d5e5465bc3c9f94c39 GIT binary patch literal 9034 zcmch7cT|&E*KZt0Q7ou51px;IlqifMpj1atM9?S-p@rn7N(li1p#~HLq>D&zf(Sw& z^p;RWNg{m^LP7~GN)5pfN~GS0x!>G1-`scIcka4t-9Pr)$yv{H&OUAL-~R0<;=z5r zBm83gAQ0$?{vBN-5a=fi2(-uQz_KH*#k<;I0-cJdFtQ0#mD47dQd`gbCApinj{<_n|kV?kVrdMPv9>Iq~l@tFHbw$ zGv1D#PtNG+-+N%IV8;gnodN0V{`S~sXo2DTI@19w^?fW8%VxbrULCORh&m^Jka@(# zCItDD?78PM2leN|sy^ronE9R8zYpoldv`tW-lH?fFF)UWqCYov?&`ku2g8>UHl5b# zJ_%*jW)*fZdL2(vx4N~qY%cy{mgb-B?~tsOjrO#49<5)?T+>32EpBOA*nb_pl&}Z% z;T3f11Tb%43H~a<5+KlD3^N=zw6>3T7uBWxgC5{#-~;D=@!WJCVR7U>d?}(N%{Y7Q@67{ zN#VqWN(E8BupXmpdZ4jq6-?A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UslK{Nz!FxGvg>mIrbK2@P=mpjSnI-y3EG}Ii#9)ak-CuXKe?FYa_QQtdw%mU zKv=&ofvcRR@X6=mO09otI1){>Ej$(kSQ_EWHBnxiLF*%}9^Y@*KB;r)zqvE?s zfQ5+f8-HZoMmdhatQ<2J9#)&PM)<79W*-5E?Xoj9c!`u+?(nY^VIq*i|4&*HQXK-m zTl|UvaC{uD>gg!df>SgwHQADSpDzI71kw>ygPjfPA`af*-=fkVO=%8va0r-C2QzjDxhQxyp)z?HmNieyaLoZlN(Q_q#bn#jCB2fP?vP$L#Ro zWXiak+2Mxu1|Ye32vwE@l)Ih30-HV}C_d$Wq>X z;&e&e>jiKdz(UUeH6$CL05)KF$=LIg%$7SKm81E3@Bf3^ z{QsjRPp>DQs`u{5>i~humj6#>`u{4||NYC2-T#06a%1=RpB4T;^`DjgU0pe~vln_? WO{)?X4IBUvNdMM-UHnZ%@c#g86;;Uq literal 0 HcmV?d00001 diff --git a/js/src/components/Event/EventCard.vue b/js/src/components/Event/EventCard.vue index faee46b0c..a79314186 100644 --- a/js/src/components/Event/EventCard.vue +++ b/js/src/components/Event/EventCard.vue @@ -28,13 +28,11 @@ A simple card for an event