Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscant committed Mar 23, 2020
2 parents 97e5f50 + 2ea7077 commit e62f0b0
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 615 deletions.
57 changes: 19 additions & 38 deletions components/CovidWarning.vue
Original file line number Diff line number Diff line change
@@ -1,55 +1,36 @@
<template>
<NoticeMessage v-if="show" variant="danger">
<b-btn variant="link" class="float-right" @click="hideit">
Hide this
</b-btn>
<NoticeMessage variant="danger">
<p>
<b>COVID-19 is serious - don't freegle unless it's essential. Please offer essential things others
might need.</b>
<b>Very sadly, Freegle has suspended OFFER/WANTED posts due to COVID-19.</b>
</p>
<p />
<p>
The virus lasts on surfaces - probably a few hours on cardboard, longer on metal.
Keep safe distances. Wear gloves. Wipe down items (degreasing kitchen cleaner is good). Wash your hands.
If possible, please hold on to your stuff and post it when we re-open. There will be
a lot of people who are struggling and will need things when that happens. We’ll email you
when we’re back.
</p>
<p>
We're doing our bit to provide practical help. You can too. <nuxt-link to="/covid">
Find out more
</nuxt-link>
Freegle also needs your help. We are funded mostly from donations given by freeglers - no freegling means we
won’t be getting donations. Lots of charities and businesses will be struggling, but if you want us to
be here for you in six months’ time then please set up a regular donation:

<DonationButton link="paypal1" show="£1/month" monthly class="mt-2" />
</p>
<p>
Like many people, charities and businesses, Freegle will struggle. We don't
get government help. If you can, please help make sure we're here for you in six months:
Our <nuxt-link to="/chitchat">
ChitChat section
</nuxt-link> is staying open. Join us here to swap hints,
tips and tell others how you’re filling your day. Share your knowledge and questions on upcycling, reuse,
crafts, gardening, cooking, hobbies etc.
</p>
<p>
See you on the other side!
</p>
<DonationButton link="paypal1" show="£1/month" monthly />
</NoticeMessage>
<div v-else class="text-danger text-right clickme" @click="showit">
Show COVID-19 warning.
</div>
</template>
<script>
import NoticeMessage from './NoticeMessage'
import DonationButton from './DonationButton'
export default {
components: { DonationButton, NoticeMessage },
computed: {
show() {
return !this.$store.getters['misc/get']('hidecovidwarning')
}
},
methods: {
hideit() {
this.$store.dispatch('misc/set', {
key: 'hidecovidwarning',
value: true
})
},
showit() {
this.$store.dispatch('misc/set', {
key: 'hidecovidwarning',
value: false
})
}
}
components: { DonationButton, NoticeMessage }
}
</script>
3 changes: 0 additions & 3 deletions components/SidebarLeft.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<template>
<div v-if="!simple" class="d-flex flex-column sidebar__wrapper">
<CommunityEventSidebar v-if="showCommunityEvents" class="flex-grow-1 sidebar__community-event" />
<BotLeftBox v-if="showBotLeft" class="social-media__wrapper flex-shrink-2" />
</div>
</template>

<script>
const CommunityEventSidebar = () => import('~/components/CommunityEventSidebar')
const BotLeftBox = () => import('~/components/BotLeftBox')
export default {
components: {
CommunityEventSidebar,
BotLeftBox
},
props: {
Expand Down
6 changes: 1 addition & 5 deletions components/SidebarRight.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<template>
<div v-if="!simple" class="d-flex flex-column sidebar__wrapper">
<VolunteerOpportunitySidebar v-if="showVolunteerOpportunities" :class="itemclass" />
<JobsSidebar v-if="showJobOpportunities" :class="itemclass" />
</div>
</template>

<script>
import JobsSidebar from './JobsSidebar'
const VolunteerOpportunitySidebar = () =>
import('~/components/VolunteerOpportunitySidebar')
export default {
components: {
JobsSidebar,
VolunteerOpportunitySidebar
JobsSidebar
},
props: {
showVolunteerOpportunities: {
Expand Down
65 changes: 1 addition & 64 deletions pages/communities/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,6 @@
</b-col>
<b-col cols="12" lg="6" class="p-0">
<CovidWarning />
<ExpectedRepliesWarning v-if="me && me.expectedreplies" :count="me.expectedreplies" :chats="me.expectedchats" />
<Viewed v-if="!simple" class="mb-1" />
<JobsTopBar />
<div>
<NoticeMessage v-if="!anyGroups" variant="success" class="mt-2 text-center font-weight-bold">
<p>You're not a member of any communities yet. Why not explore to find one?</p>
<div class="d-flex justify-content-around mb-2">
<b-btn size="lg" variant="success" to="/explore" class="mb-2">
<v-icon name="map-marker-alt" /> Explore communities
</b-btn>
</div>
<p>Or get freegling:</p>
<b-row class="mt-2">
<b-col class="half-pad-col-right" cols="6" md="5">
<b-btn block variant="success" class="float-left" size="lg" to="/give">
<v-icon name="gift" />&nbsp;Give Stuff
</b-btn>
</b-col>
<b-col class="half-pad-col-left" offset="0" offset-md="2" cols="6" md="5">
<b-btn block variant="primary" class="float-right" size="lg" to="/find">
<v-icon name="search" />&nbsp;Find Stuff
</b-btn>
</b-col>
</b-row>
</NoticeMessage>
<div v-else>
<div class="d-flex mt-2 mb-3 selection__wrapper justify-content-between">
<GroupSelect v-model="groupid" class="m-3" all />
<b-form-select v-model="selectedType" class="m-3 typeSelect" value="All" :options="typeOptions" @change="typeChange" />
</div>
<groupHeader v-if="group" :key="'groupheader-' + groupid" :group="group" :show-join="true" />
<div v-for="message in filteredMessages" :key="'messagelist-' + message.id" class="p-0">
<message v-if="(selectedType === 'All' || message.type == selectedType) && (!message.outcomes || message.outcomes.length === 0)" v-bind="message" />
</div>

<client-only>
<infinite-loading :key="'infinite-' + groupid" :identifier="infiniteId" force-use-infinite-wrapper="body" :distance="distance" @infinite="loadMore">
<span slot="no-results" />
<span slot="no-more" />
<span slot="spinner">
<b-img-lazy src="~/static/loader.gif" alt="Loading" />
</span>
</infinite-loading>
</client-only>
</div>
</div>
</b-col>
<b-col cols="0" lg="3" class="d-none d-lg-block p-0 pl-1">
<sidebar-right show-volunteer-opportunities />
Expand All @@ -61,35 +15,18 @@
</template>

<script>
import InfiniteLoading from 'vue-infinite-loading'
import GroupSelect from '../../components/GroupSelect'
import Viewed from '../../components/Viewed'
import CovidWarning from '../../components/CovidWarning'
import loginRequired from '@/mixins/loginRequired.js'
import buildHead from '@/mixins/buildHead.js'
import createGroupRoute from '@/mixins/createGroupRoute'
const JobsTopBar = () => import('~/components/JobsTopBar')
const GroupHeader = () => import('~/components/GroupHeader.vue')
const Message = () => import('~/components/Message.vue')
const SidebarLeft = () => import('~/components/SidebarLeft')
const SidebarRight = () => import('~/components/SidebarRight')
const ExpectedRepliesWarning = () =>
import('~/components/ExpectedRepliesWarning')
const NoticeMessage = () => import('~/components/NoticeMessage')
export default {
components: {
CovidWarning,
NoticeMessage,
Viewed,
GroupSelect,
InfiniteLoading,
JobsTopBar,
GroupHeader,
Message,
SidebarLeft,
SidebarRight,
ExpectedRepliesWarning
SidebarRight
},
mixins: [loginRequired, buildHead, createGroupRoute('communities')],
data: function() {
Expand Down
23 changes: 7 additions & 16 deletions pages/covid/followupneed.vue
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
<template>
<div class="d-flex justify-content-center">
<div class="disclaimer__container px-3 bg-white">
<h1>
COVID-19 - Next Step
</h1>
<CovidSuggestions v-if="id" :id="id" />
<b-img v-else-if="busy" src="~/static/loader.gif" alt="Loading" />
<NoticeMessage v-else-if="!myid" variant="info">
Please log in to view the people who may be able to help.
<NoticeMessage variant="danger">
<p>
We are sorry to say that in the light of the Government's announcement on 23rd March, we are suspending
our COVID-19 assistance service. If you are vulnerable, please register using the Government scheme
<a href="https://www.gov.uk/coronavirus-extremely-vulnerable">here</a>.
</p>
</NoticeMessage>
<b-btn v-if="!busy" variant="primary" size="lg" class="mt-1 mb-2" @click="nolonger">
<v-icon v-if="savingnolonger" name="sync" class="fa-spin" />
<v-icon v-else-if="savednolonger" name="check" />
<v-icon v-else name="thumbs-up" />
I no longer need help
</b-btn>
<p>If you have problems with this page please mail us at <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
</template>

<script>
import CovidSuggestions from '../../components/CovidSuggestions'
import NoticeMessage from '../../components/NoticeMessage'
import loginRequired from '@/mixins/loginRequired.js'
import buildHead from '@/mixins/buildHead.js'
import waitForRef from '@/mixins/waitForRef'
export default {
components: { NoticeMessage, CovidSuggestions },
components: { NoticeMessage },
mixins: [buildHead, loginRequired, waitForRef],
data: function() {
return {
Expand Down
47 changes: 6 additions & 41 deletions pages/covid/followupoffer.vue
Original file line number Diff line number Diff line change
@@ -1,48 +1,13 @@
<template>
<div class="d-flex justify-content-center">
<div class="disclaimer__container px-3 bg-white">
<h1 class="text-center">
COVID-19 - Next Step
</h1>
<p>
Thanks so much for offering to help. We want to make sure we do this safely, especially since people
will be more vulnerable just now.
</p>
<p>
We would like a contact phone number and a little introduction about yourself. We will pass this on to
people near you who we think need help.
</p>
<label for="phone">
<b>Contact phone number</b>
</label>
<b-input id="phone" v-model="phone" type="tel" placeholder="Please enter a contact phone number" class="mb-1" />
<label for="intro">
<b class="mt-1">Introduce yourself</b>
</label>
<b-textarea id="intro" v-model="intro" placeholder="Say a bit about yourself for the person who needs help." class="mt-1 mb-1" rows="3" />
<div v-if="!busy" class="d-flex justify-content-between">
<b-btn variant="success" size="lg" class="mt-1 mb-2" @click="save">
<v-icon v-if="saving" name="sync" class="fa-spin" />
<v-icon v-else-if="saved" name="check" />
<v-icon v-else name="save" />
Save
</b-btn>
<b-btn variant="primary" size="lg" class="mt-1 mb-2" @click="nolonger">
<v-icon v-if="savingnolonger" name="sync" class="fa-spin" />
<v-icon v-else-if="savednolonger" name="check" />
<v-icon v-else name="save" />
No longer available
</b-btn>
</div>
<NoticeMessage v-if="saved" variant="info">
Thanks, we'll be in touch. Please be patient - we'll all be dealing with this for a while, and we're
trying to build a list of people who can help over the next few weeks, not just
this afternoon.
<NoticeMessage variant="danger">
<p>
We are sorry to say that in the light of the Government's announcement on 23rd March, we are suspending
our COVID-19 assistance service. If you are vulnerable, please register using the Government scheme
<a href="https://www.gov.uk/coronavirus-extremely-vulnerable">here</a>.
</p>
</NoticeMessage>
<hr>
<p>
Freegle won't use this for anything else and we'll delete it all once this is all over.
</p>
</div>
</div>
</template>
Expand Down
68 changes: 11 additions & 57 deletions pages/covid/index.vue
Original file line number Diff line number Diff line change
@@ -1,77 +1,31 @@
<template>
<div class="d-flex justify-content-center">
<div class="disclaimer__container px-3 bg-white">
<h1 class="text-center">
COVID-19 - Can you help?
</h1>
<p>
Over the next couple of months, quite a lot of people may be ill or self-isolating. They may need help with
practical things like shopping and medicines, or with online support. Maybe not yet, but maybe soon.
</p>
<p>
Perhaps you can help. Perhaps you
(or someone you know) will need help. Let's see if we can connect people so that we're ready.
</p>
<b-row>
<b-col class="text-center">
<h4>What's your postcode?</h4>
</b-col>
</b-row>
<b-row>
<b-col class="text-center mb-2 mt-2">
<postcode class="justify-content-center" :find="false" @selected="postcodeSelect" @cleared="postcodeClear" />
</b-col>
</b-row>
<b-row>
<b-col cols="12" md="8" offset-md="2">
<div class="d-flex justify-content-between w-100 mb-2">
<b-btn variant="success" size="lg" class="mr-3" @click="offer">
<client-only>
<v-icon name="hand-holding-heart" />
</client-only>
I can help
</b-btn>
<b-btn variant="primary" size="lg" @click="need">
<client-only>
<v-icon name="cart-plus" />
</client-only>
I need help
</b-btn>
</div>
</b-col>
</b-row>
<p>
There may already be a great, well-organised scheme where you live. If so, then get in touch with them
if you haven't already - we're not trying to tread on anyone's toes. But Freegle covers a lot of the UK,
and it's full of lovely people.
</p>
<p>
We don't know how many responses we get. Maybe we'll just get a few - if so then we'll leave it in the
(washed) hands of other people. Maybe we'll get loads, and we'll need to work out how to put people
in touch safely - that would be a good problem to have. We won't pass on your details before
getting back in touch with you.
</p>
<p>
<b>Always freegle responsibly</b> - avoid contact, wash your hands, self-isolate if you're unwell or vulnerable.
<b>If you need urgent help</b>, look at the
<a href="https://www.nhs.uk/conditions/coronavirus-covid-19/" target="_blank" rel="noopener noreferrer">NHS website</a>.
</p>
<NoticeMessage variant="danger">
<p>
We are sorry to say that in the light of the Government's announcement on 23rd March, we are suspending
our COVID-19 assistance service. If you are vulnerable, please register using the Government scheme
<a href="https://www.gov.uk/coronavirus-extremely-vulnerable">here</a>.
</p>
</NoticeMessage>
<CovidWarning />
</div>
<CovidThanksModal ref="thanks" />
<CovidInfoModal v-if="type" ref="info" :type="type" @hide="thank" />
</div>
</template>

<script>
import CovidWarning from '../../components/CovidWarning'
import NoticeMessage from '../../components/NoticeMessage'
import CovidThanksModal from '@/components/CovidThanksModal'
import CovidInfoModal from '@/components/CovidInfoModal'
import Postcode from '@/components/Postcode'
import loginOptional from '@/mixins/loginOptional.js'
import buildHead from '@/mixins/buildHead.js'
import waitForRef from '@/mixins/waitForRef'
export default {
components: { Postcode, CovidInfoModal, CovidThanksModal },
components: { NoticeMessage, CovidWarning, CovidInfoModal, CovidThanksModal },
mixins: [buildHead, loginOptional, waitForRef],
data: function() {
return {
Expand Down
Loading

0 comments on commit e62f0b0

Please sign in to comment.