Commit 54c17489 authored by Bitcoin Please's avatar Bitcoin Please

Changed campaign `model` to `theme`.

parent 99ed8be8
......@@ -38,7 +38,7 @@
</div>
<div class="campaign-category">
{{formatCategory(campaign.category)}} | {{formatModel(campaign.model)}}
{{formatCategory(campaign.category)}} | {{formatModel(campaign.theme)}}
</div>
<div class="campaign-title">
......@@ -191,10 +191,10 @@ export default {
},
/**
* Format Model
* Format Theme
*/
formatModel(_model) {
switch(_model) {
formatModel(_theme) {
switch(_theme) {
case 'assurance':
return 'Community Pledge'
case 'direct':
......
......@@ -56,7 +56,7 @@
</div>
<div class="field">
<label for="model">
<label for="theme">
Primary Funding Model
</label>
......@@ -66,7 +66,7 @@
</span>
<div class="field-select">
<select id="model" v-model="model">
<select id="theme" v-model="theme">
<option value="">Select a Campaign Type</option>
<option value="direct">Direct Payment</option>
<option value="assurance">Community Pledge</option>
......@@ -447,7 +447,7 @@ export default {
title: null,
category: null,
model: null,
theme: null,
location: null,
}
},
......@@ -490,9 +490,9 @@ export default {
return this.toast(['Oops!', 'Please enter a title', 'error'])
}
// /* Validate model. */
if (!this.model) {
return this.toast(['Oops!', 'Please enter a model', 'error'])
// /* Validate theme. */
if (!this.theme) {
return this.toast(['Oops!', 'Please enter a theme', 'error'])
}
/* Validate category. */
......@@ -509,7 +509,7 @@ export default {
campaignId: 'NEW',
slug: this.slug,
title: this.title,
model: this.model,
theme: this.theme,
category: this.category,
owner: this.ownerSlug,
location: this.location,
......
......@@ -275,18 +275,18 @@ export default {
* Campaign Model
*/
campaignModel() {
/* Validate campaign model. */
if (!this.campaign || !this.campaign.model) {
/* Validate campaign theme. */
if (!this.campaign || !this.campaign.theme) {
return null
}
/* Set model. */
const model = this.campaign.model
/* Set theme. */
const theme = this.campaign.theme
/* Validate model. */
if (model) {
/* Validate theme. */
if (theme) {
/* Handle campaign type. */
switch(model) {
switch(theme) {
case 'direct':
return 'Direct Cash'
case 'assurance':
......@@ -424,14 +424,14 @@ export default {
* Details
*/
details() {
if (!this.campaign || !this.campaign.model) {
if (!this.campaign || !this.campaign.theme) {
return null
}
/* Set model. */
const model = this.campaign.model
/* Set theme. */
const theme = this.campaign.theme
if (model === 'assurance') {
if (theme === 'assurance') {
return JSON.stringify(this.campaign.assurances, null, 2)
}
......@@ -442,16 +442,16 @@ export default {
* Satoshis
*/
satoshis() {
if (!this.campaign || !this.campaign.model) {
if (!this.campaign || !this.campaign.theme) {
return 0
}
/* Set model. */
const model = this.campaign.model
/* Set theme. */
const theme = this.campaign.theme
const assuranceid = 0
if (model === 'assurance') {
if (theme === 'assurance') {
return this.campaign.assurances[assuranceid].recipient.satoshis
}
......@@ -462,16 +462,16 @@ export default {
* Address
*/
address() {
if (!this.campaign || !this.campaign.model) {
if (!this.campaign || !this.campaign.theme) {
return 0
}
/* Set model. */
const model = this.campaign.model
/* Set theme. */
const theme = this.campaign.theme
const assuranceid = 0
if (model === 'assurance') {
if (theme === 'assurance') {
return this.campaign.assurances[assuranceid].recipient.address
}
......
......@@ -7,6 +7,65 @@
<h1>Dashboard</h1>
<hr />
<h1>{{title}}</h1>
<h3 class="text-secondary">{{category}}</h3>
<div class="row">
<div class="col">
<v-card
class="mx-auto"
max-width="344"
>
<v-list-item three-line>
<v-list-item-content>
<div class="overline mb-4">PLEDGES</div>
<v-list-item-title class="headline mb-1">Headline 5</v-list-item-title>
<v-list-item-subtitle>Greyhound divisely hello coldly fonwderfully</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-avatar
tile
size="80"
color="grey"
></v-list-item-avatar>
</v-list-item>
<v-card-actions>
<v-btn text>Button</v-btn>
<v-btn text>Button</v-btn>
</v-card-actions>
</v-card>
</div>
<div class="col">
<v-card
class="mx-auto"
max-width="344"
>
<v-list-item three-line>
<v-list-item-content>
<div class="overline mb-4">EVENTS</div>
<v-list-item-title class="headline mb-1">Headline 5</v-list-item-title>
<v-list-item-subtitle>Greyhound divisely hello coldly fonwderfully</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-avatar
tile
size="80"
color="grey"
></v-list-item-avatar>
</v-list-item>
<v-card-actions>
<v-btn text>Button</v-btn>
<v-btn text>Button</v-btn>
</v-card-actions>
</v-card>
</div>
</div>
<hr />
<!-- Risks & Challenges -->
<!-- <div class="field">
<label for="risks">Risks and challenges</label>
......@@ -17,18 +76,7 @@
</div> -->
<div class="field">
<label for="projecttitle">Project Title</label>
<span class="label-desc">
Our search looks through words from your project title and blurb, so make them clear and descriptive of what you’re making.
Your profile name will be searchable, too.
</span>
<input type="text" id="projecttitle" :value="title" maxlength="60" disabled>
</div>
<div class="field">
<!-- <div class="field">
<label for="shortblurb">
Short Blurb
</label>
......@@ -39,39 +87,7 @@
</span>
<textarea id="shortblurb" cols="30" rows="4" maxlength="135"></textarea>
</div>
<div class="field">
<label for="field-cat">
Category <span>*</span>
</label>
<span class="label-desc">
To help backers find your campaign, select a category that best represents your project.
</span>
<div class="field-select field-cat">
<select id="field-cat">
<option selected="selected">Select a category</option>
<option value="book">Book</option>
<option value="crafts">Crafts</option>
<option value="design-art">Design &amp; Art</option>
<option value="perfomances">Perfomances</option>
<option value="technology">Technology</option>
</select>
</div>
<div class="field-select">
<select name="s">
<option selected="selected">Subcategory (optional)</option>
<option value="book">Book</option>
<option value="crafts">Crafts</option>
<option value="design-art">Design &amp; Art</option>
<option value="perfomances">Perfomances</option>
<option value="technology">Technology</option>
</select>
</div>
</div>
</div> -->
<div class="field">
<label for="projectlocation">
......@@ -117,7 +133,7 @@
</div>
</div>
<div class="spopup-content">
<!-- <div class="spopup-content">
<p>If your project is successfully funded, the following fees will be collected from your funding total: Ideapress 5% fee, and payment processing fees (between 3% and 5%). If funding isn’t successful, there are no fees.</p>
<ul>
......@@ -136,7 +152,7 @@
</div>
</li>
</ul>
</div>
</div> -->
</div>
<input type="text" value="" id="fundinggoal">
......@@ -152,10 +168,6 @@
/* Initialize vuex. */
import { mapActions, mapGetters } from 'vuex'
/* Import JQuery. */
// FIXME: Remove ALL jQuery dependencies.
const $ = window.jQuery
export default {
components: {
//
......@@ -173,11 +185,18 @@ export default {
}
},
computed: {
...mapGetters([
'getHelp',
]),
...mapGetters('campaigns', [
'getAsset',
'getCampaign',
]),
...mapGetters('utils', [
'getCategoryDisplay',
]),
title() {
if (this.campaign && this.campaign.title) {
return this.campaign.title
......@@ -186,6 +205,14 @@ export default {
}
},
category() {
if (this.campaign && this.campaign.title) {
return this.getCategoryDisplay(this.campaign.category)
} else {
return null
}
},
location() {
if (this.campaign && this.campaign.location) {
return this.campaign.location
......@@ -196,8 +223,8 @@ export default {
},
methods: {
...mapActions('campaigns', [
'updateAsset',
...mapActions('utils', [
'toast',
]),
},
......@@ -236,22 +263,7 @@ export default {
}
},
mounted: function () {
$('.view-fees').on('click', function (e) {
e.preventDefault()
$(this).parent().parent().find('.spopup-bg').fadeIn()
$(this).parent().parent().find('.fees-popup').fadeIn()
})
$('.spopup-bg').on('click', function (e) {
e.preventDefault()
$(this).fadeOut()
$(this).parent().find('.fees-popup').fadeOut()
$(this).parent().find('.item-popup').fadeOut()
})
$('.spopup-close').on('click', function (e) {
e.preventDefault()
$(this).parent().parent().fadeOut()
$(this).parent().parent().parent().find('.spopup-bg').fadeOut()
})
//
},
}
</script>
......
......@@ -6,13 +6,13 @@
<h1>Media Center</h1>
<hr />
<div class="field">
<!-- <div class="field">
<label for="contactemail">News Article #1</label>
<input type="email" id="contactemail" placeholder="Amazing Expose" v-model="news[0].title">
</div>
</div> -->
<div class="field">
<!-- <div class="field">
<span class="label-desc">
Enter the account you’d like to use to receive funds if your project is successfully funded.
The account should belong to the person or legal entity running this project.
......@@ -30,158 +30,93 @@
<label for="legal">Legal entity (company or organization)</label>
</div>
</div>
</div> -->
<div class="field">
<label for="uploadfile">
Project Image
Campaign Main Image
</label>
<span class="label-desc">
This is the first thing that people will see when they come across your project.
This is the first thing that people will see when they come across your campaign.
Choose an image that’s crisp and text-free.
570px by 400px recommended resolution.
<a href="javascript://">Here are some tips.</a>
</span>
<div class="list-upload">
<div class="file-upload">
<div class="upload-bg">
<div id="myfileupload">
<input type="file" id="uploadfile" name="ImageUpload" onchange="readURL(this);" accept="image/*" />
</div>
<div id="thumbbox">
<img src="images/assets/logo.png" height="695" width="460" alt="Thumb image" id="thumbimage" />
<a class="removeimg" href="javascript:"></a>
</div>
<img :src="photo1Url" />
<div id="boxchoice">
<a href="javascript:" class="choicefile"><i class="fa fa-cloud-upload" aria-hidden="true"></i> Upload Image</a>
<p></p>
</div>
<input
type="text"
id="capaignstory"
placeholder="Photo #1 caption"
v-model="photo1Caption"
disabled
>
<label class="filename"></label>
</div>
</div>
</div>
<input
type="text"
id="capaignstory"
placeholder="Photo #1 URL"
v-model="photo1Url"
>
</div>
<hr />
<!-- Campaign Images -->
<div class="field">
<label for="uploadfile">Campaign Images *</label>
<span class="label-desc">Upload a square image that represents your campaign. 570px by 400px recommended resolution.</span>
<div class="list-upload">
<div class="file-upload">
<div class="upload-bg">
<div id="myfileupload">
<input type="file" id="uploadfile" name="ImageUpload" onchange="readURL(this);" />
</div>
<div id="thumbbox">
<img src="images/assets/logo.png" height="100" width="100" alt="Thumb image" id="thumbimage" />
<a class="removeimg" href="javascript:"></a>
</div>
<label for="uploadfile">Media Gallery</label>
<div id="boxchoice">
<a href="javascript:" class="choicefile"><i class="fa fa-cloud-upload" aria-hidden="true"></i> Upload Image</a>
<p></p>
</div>
<label class="filename"></label>
<input
type="text"
id="capaignstory"
placeholder="Photo #1 caption"
v-model="photo1Caption"
>
<input
type="text"
id="capaignstory"
placeholder="Photo #1 URL"
v-model="photo1Url"
>
</div>
</div>
<div class="file-upload">
<div class="upload-bg">
<div id="myfileupload1">
<input type="file" id="uploadfile1" name="ImageUpload" onchange="readURL1(this);" />
</div>
<div id="thumbbox1">
<img src="images/assets/logo.png" height="100" width="100" alt="Thumb image" id="thumbimage1" />
<a class="removeimg1" href="javascript:"></a>
</div>
<div id="boxchoice1">
<a href="javascript:" class="choicefile1"><i class="fa fa-cloud-upload" aria-hidden="true"></i> Upload Image</a>
<p></p>
</div>
<span class="label-desc">
Upload a square image that represents your campaign.
570px by 400px recommended resolution.
</span>
<label class="filename1"></label>
<div class="row">
<div class="col">
<img :src="photo2Url" />
<input
type="text"
id="capaignstory"
placeholder="Photo #2 caption"
v-model="photo2Caption"
disabled
>
<input
type="text"
id="capaignstory"
placeholder="Photo #2 URL"
v-model="photo2Url"
>
<input
type="text"
id="capaignstory"
placeholder="Photo #2 caption"
v-model="photo2Caption"
>
<input
type="text"
id="capaignstory"
placeholder="Photo #2 URL"
v-model="photo2Url"
>
</div>
</div>
<div class="file-upload">
<div class="upload-bg">
<div id="myfileupload2">
<input type="file" id="uploadfile2" name="ImageUpload" onchange="readURL2(this);" />
</div>
<div id="thumbbox2">
<img src="images/assets/logo.png" height="100" width="100" alt="Thumb image" id="thumbimage2" />
<a class="removeimg2" href="javascript:"></a>
</div>
<div id="boxchoice2">
<a href="javascript:" class="choicefile2"><i class="fa fa-cloud-upload" aria-hidden="true"></i> Upload Image</a>
<p></p>
</div>
<label class="filename2"></label>
<input
type="text"
id="capaignstory"
placeholder="Photo #3 caption"
v-model="photo3Caption"
>
<input
type="text"
id="capaignstory"
placeholder="Photo #3 URL"
v-model="photo3Url"
>
</div>
<div class="col">
<img :src="photo3Url" />
<input
type="text"
id="capaignstory"
placeholder="Photo #3 caption"
v-model="photo3Caption"
disabled
>
<input
type="text"
id="capaignstory"
placeholder="Photo #3 URL"
v-model="photo3Url"
>
</div>
</div>
</div>