Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Causes Cash
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bitcoin Please
Causes Cash
Commits
b186ac71
Commit
b186ac71
authored
Aug 10, 2020
by
Bitcoin Please
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated news display.
parent
3aba7d16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
22 deletions
+39
-22
src/views/Campaign/Details/History/News.vue
src/views/Campaign/Details/History/News.vue
+9
-1
src/views/Campaign/Manage/Write.vue
src/views/Campaign/Manage/Write.vue
+30
-21
No files found.
src/views/Campaign/Details/History/News.vue
View file @
b186ac71
...
...
@@ -3,7 +3,12 @@
<!--
<h3
class=
"comments-title"
>
New
&
Noteworthy
</h3>
-->
<ol
v-if=
"articleList"
class=
"comments-list"
>
<li
v-for=
"article of articleList"
:key=
"article.id"
class=
"comment clearfix"
>
<li
v-for=
"article of articleList"
:key=
"article.id"
class=
"comment clearfix mb-3"
>
<div
class=
"comment-body"
>
<div
class=
"comment-avatar float-left mr-3 mb-3"
>
<img
class=
"avatar"
:src=
"article.avatar"
alt=
""
>
...
...
@@ -29,7 +34,10 @@
</div>
</div>
</div>
<hr
/>
</li>
</ol>
<div
v-else
class=
"campaigns"
>
...
...
src/views/Campaign/Manage/Write.vue
View file @
b186ac71
...
...
@@ -128,27 +128,36 @@ export default {
const
guide
=
this
.
quillGuide
.
getText
()
/* Set images. */
const
images
=
{
main
:
this
.
photo1Url
||
null
,
cover
:
this
.
photo1Url
||
null
,
gallery
:
[
this
.
photo2Url
||
null
,
this
.
photo3Url
||
null
,
]
}
// const images = {
// main: this.photo1Url || null,
// cover: this.photo1Url || null,
// gallery: [
// this.photo2Url || null,
// this.photo3Url || null,
// ]
// }
/* Build campaign. */
const
campaign
=
{
campaignId
,
summary
,
description
,
guide
,
images
,
//
images,
}
console
.
log
(
'
WRITE (campaign):
'
,
campaign
)
//
console.log('WRITE (campaign):', campaign)
/* Request update. */
const
result
=
await
this
.
updateCampaign
(
campaign
)
console
.
log
(
'
WRITE UPDATE (result):
'
)
.
catch
(
err
=>
{
/* Handle error message. */
if
(
err
&&
err
.
message
===
'
Unauthorized
'
)
{
this
.
toast
([
'
Oops!
'
,
'
You are NOT authorized to do that
'
,
'
error
'
])
}
else
{
console
.
error
(
err
)
}
})
// console.log('WRITE UPDATE (result):', result)
/* Handle result. */
if
(
result
.
ok
&&
!
result
.
error
)
{
...
...
@@ -205,15 +214,15 @@ export default {
}
/* Validate media. */
if
(
this
.
campaign
&&
this
.
campaign
.
media
)
{
this
.
photo1Url
=
this
.
campaign
.
media
.
main
/* Validate gallery. */
if
(
this
.
campaign
.
media
.
gallery
)
{
this
.
photo2Url
=
this
.
campaign
.
media
.
gallery
[
0
]
this
.
photo3Url
=
this
.
campaign
.
media
.
gallery
[
1
]
}
}
//
if (this.campaign && this.campaign.media) {
//
this.photo1Url = this.campaign.media.main
//
//
/* Validate gallery. */
//
if (this.campaign.media.gallery) {
//
this.photo2Url = this.campaign.media.gallery[0]
//
this.photo3Url = this.campaign.media.gallery[1]
//
}
//
}
}
},
mounted
:
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment