Skip to content

Commit 7384617

Browse files
committed
lMerge branch 'app' into app-publish
2 parents ad5c2df + c4ebf91 commit 7384617

File tree

13 files changed

+110
-44
lines changed

13 files changed

+110
-44
lines changed

components/ChatMessageInterested.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<div class="chatMessage forcebreak chatMessage__owner">
44
<div v-if="chatmessage.userid != myid">
55
<ChatMessageSummary v-if="refmsg" :message="refmsg" class="mt-1 mb-2" />
6+
<div v-if="modtools">
7+
<b-button variant="white" :to="modtoolsLink">
8+
View message on ModTools
9+
</b-button>
10+
</div>
611
<div>
712
<!-- eslint-disable-next-line -->
813
<span v-if="(chatmessage.secondsago < 60) || (chatmessage.id > chat.lastmsgseen)" class="prewrap font-weight-bold" v-html="emessage" />
@@ -113,6 +118,15 @@ export default {
113118
}
114119
115120
return ret
121+
},
122+
modtoolsLink() {
123+
if (!this.modtools || !this.refmsg || !this.refmsg.id) {
124+
return null
125+
}
126+
127+
const url = '/modtools/message/' + this.refmsg.id
128+
129+
return url
116130
}
117131
},
118132
methods: {

components/LoginModal.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
<p v-if="signUp" class="font-weight-bold">
4343
Using one of these buttons is the easiest way to create an account:
4444
</p>
45-
<b-btn class="social-button social-button--facebook" :disabled="facebookDisabled" @click="loginFacebook">
45+
<!--b-btn class="social-button social-button--facebook" :disabled="facebookDisabled" @click="loginFacebook">
4646
<b-img src="~/static/signinbuttons/facebook-logo.png" class="social-button__image" />
4747
<span class="p-2 text--medium font-weight-bold">Continue with Facebook</span>
48-
</b-btn>
48+
</b-btn-->
4949
<b-btn v-if="isiOSapp" class="social-button social-button--apple" :disabled="appleDisabled" @click="loginApple">
5050
<b-img src="~/static/signinbuttons/Apple_logo_white.svg" class="social-button__image" style="padding: 0px;" />
5151
<span class="p-2 social-button__text font-weight-bold">Sign in with Apple</span>
@@ -59,10 +59,10 @@
5959
<b-img src="~/static/signinbuttons/yahoo-logo.svg" class="social-button__image" />
6060
<span class="p-2 text--medium font-weight-bold">Continue with Yahoo</span>
6161
</b-btn>
62-
<p v-if="modtools" class="text-center">
62+
<!--p v-if="modtools" class="text-center">
6363
You can't log in to ModTools using Facebook, I'm afraid. If that's how you log in to Freegle, use email/password
6464
and trigger a lost password request.
65-
</p>
65+
</p--->
6666
<notice-message v-if="socialblocked" variant="warning">
6767
Social log in blocked - check your privacy settings, including any ad blockers such as
6868
Adblock Plus.
@@ -890,7 +890,7 @@ export default {
890890
}
891891
892892
Vue.use(VueFB, {
893-
appId: process.env.FACEBOOK_APPID,
893+
// appId: process.env.FACEBOOK_APPID,
894894
autoLogAppEvents: true,
895895
xfbml: true,
896896
version: 'v4.0'

components/MessageHistory.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
Approved by {{ group.approvedby.displayname }}
3535
</span>
3636
</div>
37-
<div v-if="modinfo && message.groups && message.groups.length && message.groups[0].arrival !== message.date" class="small">
37+
<div v-if="modinfo && message.postings && message.postings.length && message.postings[0].date !== message.date" class="small">
3838
<span v-if="!today">
39-
First posted on {{ message.groups[0].namedisplay }} on {{ datetime(message.date) }}
39+
First posted on {{ message.postings[0].namedisplay }} on {{ datetime(message.postings[0].date) }}
4040
</span>
4141
</div>
4242
</div>

components/ModGroupPostVisibility.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default {
130130
const CGA = this.CGA
131131
132132
if (CGA) {
133-
return turfbuffer(CGA, this.scale, { units: 'meters' })
133+
return turfbuffer(CGA, this.scale, 'meters')
134134
} else {
135135
return null
136136
}

components/ModMember.vue

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
<b-card bg-variant="white" no-body>
44
<b-card-header class="d-flex justify-content-between flex-wrap">
55
<div>
6-
<!-- eslint-disable-next-line -->
7-
<v-icon name="envelope" /> <ExternalLink :href="'mailto:' + email">{{ email }}</ExternalLink>
6+
<div v-if="isLJ">
7+
LoveJunk user #{{ user.ljuserid }}
8+
</div>
9+
<div v-else>
10+
<!-- eslint-disable-next-line -->
11+
<v-icon name="envelope" /> <ExternalLink :href="'mailto:' + email">{{ email }}</ExternalLink>
12+
</div>
813
</div>
914
<div>
1015
<ProfileImage :image="member.profile.turl" class="ml-1 mb-1 inline" is-thumbnail size="sm" />
@@ -112,7 +117,7 @@
112117
</div>
113118
</div>
114119
</div>
115-
<div v-if="user && user.id && !isTN">
120+
<div v-if="user && user.id && !isTN && !isLJ">
116121
<hr>
117122
<div class="d-flex justify-content-between flex-wrap">
118123
<OurToggle
@@ -165,6 +170,15 @@
165170
color="#61AE24"
166171
@change="changeNewsletter"
167172
/>
173+
<OurToggle
174+
v-model="autorepost"
175+
:height="30"
176+
:width="200"
177+
:font-size="14"
178+
:sync="true"
179+
:labels="{checked: 'Autorepost On', unchecked: 'Autorepost Off'}"
180+
color="#61AE24"
181+
/>
168182
</div>
169183
</div>
170184
</b-card-body>
@@ -315,7 +329,6 @@ export default {
315329
if (this.user) {
316330
if (this.user.emails) {
317331
this.user.emails.forEach(e => {
318-
console.log('Check email', e.email)
319332
if (e.email && e.email.indexOf('@user.trashnothing.com') !== -1) {
320333
ret = true
321334
}
@@ -325,6 +338,9 @@ export default {
325338
326339
return ret
327340
},
341+
isLJ() {
342+
return this.user && this.user.ljuserid
343+
},
328344
settings() {
329345
if (this.user && this.user.settings && this.user.settings) {
330346
return this.user.settings
@@ -364,6 +380,14 @@ export default {
364380
set(newval) {
365381
this.user.newslettersallowed = newval
366382
}
383+
},
384+
autorepost: {
385+
get() {
386+
return (
387+
this.member && !this.isTN && Boolean(!this.member.autorepostsdisable)
388+
)
389+
},
390+
setnewval() {}
367391
}
368392
},
369393
mounted() {

components/ModMessage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
</div>
208208
</div>
209209
<div class="d-flex justify-content-between flex-wrap">
210-
<b-btn variant="link" @click="toggleMail">
210+
<b-btn v-if="message.fromuser && !message.fromuser.ljuserid && !message.fromuser.tnuserid" variant="link" @click="toggleMail">
211211
<span v-if="showMailSettings">
212212
<v-icon name="cog" />
213213
<span class="d-inline d-sm-none">

components/ModSupportListGroups.vue

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,24 +246,41 @@ export default {
246246
)
247247
},
248248
autoApproves(hotInstance, td, row, column, prop, value, cellProperties) {
249-
let auto = parseInt(value)
249+
// We don't want to highlight the colour for unpublished groups, because they're not actually causing any
250+
// issues.
251+
const publish = cellProperties.instance.getDataAtRow(row)[7]
250252
251-
if (auto > 50) {
252-
td.style.backgroundColor = 'orange'
253-
}
253+
if (publish) {
254+
let auto = parseInt(value)
254255
255-
auto = Math.abs(auto)
256+
if (auto > 50) {
257+
td.style.backgroundColor = 'orange'
258+
}
256259
257-
Handsontable.renderers.NumericRenderer.call(
258-
this,
259-
hotInstance,
260-
td,
261-
row,
262-
column,
263-
prop,
264-
auto,
265-
cellProperties
266-
)
260+
auto = Math.abs(auto)
261+
262+
Handsontable.renderers.NumericRenderer.call(
263+
this,
264+
hotInstance,
265+
td,
266+
row,
267+
column,
268+
prop,
269+
auto,
270+
cellProperties
271+
)
272+
} else {
273+
Handsontable.renderers.TextRenderer.call(
274+
this,
275+
hotInstance,
276+
td,
277+
row,
278+
column,
279+
prop,
280+
'-',
281+
cellProperties
282+
)
283+
}
267284
},
268285
forceDate(hotInstance, td, row, column, prop, value, cellProperties) {
269286
let val = '-'

mobile/modtools/android/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget android-versionCode="409" id="org.ilovefreegle.modtools" version="0.3.98" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget android-versionCode="410" id="org.ilovefreegle.modtools" version="0.3.99" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>ModTools</name>
44
<description>Tool to help moderators of Freegle groups</description>
55
<author email="geeks@ilovefreegle.org" href="https://ilovefreegle.org">Chris Cant, Freegle Ltd</author>

mobile/modtools/ios/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="org.ilovefreegle.modtools" ios-CFBundleVersion="403" version="0.3.98" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="org.ilovefreegle.modtools" ios-CFBundleVersion="404" version="0.3.99" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>ModTools</name>
44
<description>Tool to help moderators of Freegle and similar groups</description>
55
<author email="geeks@ilovefreegle.org" href="https://ilovefreegle.org">

nuxt.config.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import Sentry from '@nuxtjs/sentry'
33
import { Dedupe as DedupeIntegration } from '@sentry/integrations'
44
import sitemap from './utils/sitemap.js'
55

6-
const FACEBOOK_APPID = '134980666550322'
6+
// const FACEBOOK_APPID = '134980666550322'
77
const SENTRY_DSN = 'https://b68903e730034a4ba3b8b2358331389e@o118493.ingest.sentry.io/4504362603184128' // Cordova
88
const YAHOO_CLIENTID =
99
'dj0yJmk9N245WTRqaDd2dnA4JmQ9WVdrOWIzTlZNMU01TjJjbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PWRh'
1010
const MOBILE_VERSION = '2.0.120'
11-
const MODTOOLS_VERSION = '0.3.98'
11+
const MODTOOLS_VERSION = '0.3.99'
1212

1313
require('dotenv').config()
1414

@@ -85,10 +85,10 @@ const config = {
8585
{ hid: 'author', name: 'author', content: 'Freegle' },
8686
{ name: 'supported-color-schemes', content: 'light' },
8787
{ name: 'color-scheme', content: 'light' },
88-
{
89-
name: 'facebook-domain-verification',
90-
content: 'zld0jt8mvf06rt1c3fnxvls3zntxj6'
91-
},
88+
// {
89+
// name: 'facebook-domain-verification',
90+
// content: 'zld0jt8mvf06rt1c3fnxvls3zntxj6'
91+
// },
9292
{ hid: 'og:type', property: 'og:type', content: 'website' },
9393
{
9494
hid: 'description',
@@ -120,14 +120,14 @@ const config = {
120120
property: 'og:url',
121121
content: 'https://www.ilovefreegle.org'
122122
},
123-
{ hid: 'fb:app_id', property: 'fb:app_id', content: FACEBOOK_APPID },
123+
// { hid: 'fb:app_id', property: 'fb:app_id', content: FACEBOOK_APPID },
124124
{
125125
hid: 'og:description',
126126
property: 'og:description',
127127
content:
128128
"Give and get stuff for free in your local community. Don't just recycle - reuse, freecycle and freegle!"
129129
},
130-
{ hid: 'fb:app_id', property: 'og:site_name', content: FACEBOOK_APPID },
130+
// { hid: 'fb:app_id', property: 'og:site_name', content: FACEBOOK_APPID },
131131

132132
{
133133
hid: 'twitter:title',
@@ -164,8 +164,8 @@ const config = {
164164
{ rel: 'preconnect', href: 'https://www.youtube.com' },
165165
{ rel: 'preconnect', href: 'https://fonts.gstatic.com' },
166166
{ rel: 'preconnect', href: 'https://storage.googleapis.com' },
167-
{ rel: 'preconnect', href: 'https://www.facebook.com' },
168-
{ rel: 'preconnect', href: 'https://connect.facebook.com' },
167+
// { rel: 'preconnect', href: 'https://www.facebook.com' },
168+
// { rel: 'preconnect', href: 'https://connect.facebook.com' },
169169
{ rel: 'preconnect', href: 'https://apis.google.com' }
170170
]
171171
},
@@ -220,7 +220,7 @@ const config = {
220220
{ src: '~/plugins/vue-lazy-youtube-video', ssr: false },
221221
{ src: '~/plugins/inspectlet', ssr: false },
222222
{ src: '~/plugins/app-init-push.js', mode: 'client' },
223-
{ src: '~/plugins/app-facebook.js', mode: 'client' },
223+
// { src: '~/plugins/app-facebook.js', mode: 'client' },
224224
{ src: '~/plugins/app-google.js', mode: 'client' },
225225
{ src: '~/plugins/app-yahoo.js', mode: 'client' },
226226
{ src: '~/plugins/app-apple.js', mode: 'client' },
@@ -658,7 +658,7 @@ const config = {
658658
CHAT_HOST: CHAT_HOST,
659659
OSM_TILE: OSM_TILE,
660660
GEOCODE: GEOCODE,
661-
FACEBOOK_APPID: FACEBOOK_APPID,
661+
// FACEBOOK_APPID: FACEBOOK_APPID,
662662
YAHOO_CLIENTID: YAHOO_CLIENTID,
663663
GOOGLE_MAPS_KEY: 'AIzaSyCdTSJKGWJUOx2pq1Y0f5in5g4kKAO5dgg',
664664
GOOGLE_API_KEY: 'AIzaSyArVxoX781qdcbmQZi1PKHX-qa0bPbboH4',

0 commit comments

Comments
 (0)