Skip to content

Commit

Permalink
Merge pull request #158 from watchout-tw/feature/enable-author-avatar…
Browse files Browse the repository at this point in the history
…-link

Feature/enable author avatar link
  • Loading branch information
wesley100002001 authored Jun 1, 2023
2 parents d0ad168 + 054141d commit bf27bfd
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/Avatar.vue
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ export default {
return this.hasLink ? 'a' : 'div'
},
internalLink() {
return typeof this.link === 'string' ? this.link : (this.link && this.personaIsValid ? this.getParkPersonaProfileURL(this.persona.id) : null)
return typeof this.link === 'string' ? this.link : (this.link && this.personaIsValid ? this.getPersonaProfileURL(this.persona.id) : null)
},
hasLink() {
return !!(this.internalLink)
2 changes: 1 addition & 1 deletion components/comp/DocHeader.vue
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
<div v-for="aType of filteredAuthorType" :key="aType.valuePlural" class="authors-container" :class="[aType.valuePlural]">
<div class="author-type section-title with-underline small"><span>{{ getAuthorTypeLabel(aType) }}</span></div>
<div class="authors">
<avatar v-for="(author, index) of doc[aType.valuePlural]" :persona="cachedAuthorByPersona(author)" :show="['avatar', 'name']" :classes="['horizontal']" size="small" :link="false" :key="index" />
<avatar v-for="(author, index) of doc[aType.valuePlural]" :persona="cachedAuthorByPersona(author)" :show="['avatar', 'name']" :classes="['horizontal']" size="small" :link="true" :key="index"></avatar>
</div>
</div>
<div class="dates secondary-text font-size-small margin-top-bottom-8">
4 changes: 2 additions & 2 deletions interfaces/knowsWatchout.js
Original file line number Diff line number Diff line change
@@ -40,8 +40,8 @@ export default {
getAskAnswerURL(gameSlug, answerID) {
return this.getBaseURL('ask') + `games/${gameSlug}/answers/${answerID}`
},
getParkPersonaProfileURL(personaID) {
return this.getBaseURL('park') + `personas/${personaID}`
getPersonaProfileURL(personaID) {
return this.getBaseURL('watchout') + `authors/${personaID}`
},
getParkSettingsURL() {
return this.getBaseURL('park') + 'settings'
2 changes: 1 addition & 1 deletion lib/watchout.js
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ export function getBaseURL(channelID, forceProductionURL = false) {
let url = 'https://watchout.tw/'
if(!forceProductionURL) {
if(config.env === 'dev') {
url = 'http://dev.localhost:9000/'
url = 'https://localhost:9000/'
} else if(config.env === 'beta') {
url = 'https://beta.watchout.tw/'
}

0 comments on commit bf27bfd

Please sign in to comment.