Skip to content

Commit

Permalink
Merge pull request #190 from watchout-tw/feature/upload-project-banner
Browse files Browse the repository at this point in the history
Remove channel design for good
  • Loading branch information
wesley100002001 authored Nov 4, 2024
2 parents 8597fca + 7c429f8 commit 4e7dcfc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion components/FooterStandard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const linkGroups = [
links: [
{
title: 'English',
url: getBaseURL('watchout') + '?lang=en',
url: getBaseURL() + '?lang=en',
relative: false
},
{
Expand Down
28 changes: 6 additions & 22 deletions interfaces/knowsWatchout.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,21 @@ export default {
getBaseURL,
getCompDocURL,
getCompVideoURL,
getLabRepURL(repID) {
return this.getBaseURL('lab') + `reps/${repID}`
},
getAskGameURL(gameSlug) {
return this.getBaseURL('ask') + `games/${gameSlug}`
},
getAskQuestionURL(gameSlug, questionID) {
return this.getBaseURL('ask') + `games/${gameSlug}/questions/${questionID}`
},
getAskAnswerURL(gameSlug, answerID) {
return this.getBaseURL('ask') + `games/${gameSlug}/answers/${answerID}`
},
getPersonaProfileURL(personaID) {
return this.getBaseURL('watchout') + `authors/${personaID}`
},
getParkSettingsURL() {
return this.getBaseURL('park') + 'settings'
return this.getBaseURL() + `authors/${personaID}`
},
getWatchoutDocListURL() {
return this.getBaseURL('watchout') + 'docs'
return this.getBaseURL() + 'docs'
},
getWatchoutProjectURL,
getWatchoutNewsletterURL(id) {
return this.getBaseURL('watchout') + 'news/' + id
return this.getBaseURL() + 'news/' + id
},
getWatchoutMemberInfoURL() {
return this.getBaseURL('watchout') + 'member'
return this.getBaseURL() + 'member'
},
// TODO: Remove channelID
generateMeta(channelID, pageTitle, pageDescription, image) {
let baseURL = this.getBaseURL(channelID)
generateMeta(pageTitle, pageDescription, image) {
let baseURL = this.getBaseURL()
if(!image) {
image = defaultImage
}
Expand Down
10 changes: 4 additions & 6 deletions lib/watchout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import config from '../config/config'
// }
// const compDocURLDefaultPrefix = 'docs'

export function getBaseURL(channelID, forceProductionURL = false) {
export function getBaseURL(forceProductionURL = false) {
let url = 'https://watchout.tw/'
if(!forceProductionURL) {
if(config.env === 'dev') {
Expand All @@ -30,12 +30,12 @@ export function getCompDocURL(publishedTo, id) {
}

// TODO: video url is not complete
export function getCompVideoURL(publishedTo, id) {
return getBaseURL(publishedTo)
export function getCompVideoURL(id) {
return getBaseURL()
}

export function getWatchoutProjectURL(projectID, translation = null) {
return getBaseURL('watchout') + (translation ? `${translation}/` : '') + `projects/${projectID}`
return getBaseURL() + (translation ? `${translation}/` : '') + `projects/${projectID}`
}

const SEPARATOR = '://'
Expand Down Expand Up @@ -77,8 +77,6 @@ export function parseReference(content, options = {}) {
permalink = getCompVideoURL(options.publishedTo, id)
} else if(type === 'project') {
permalink = getWatchoutProjectURL(id)
} else if(type === 'channel') {
permalink = getBaseURL(id)
}

if(permalink && params) {
Expand Down

0 comments on commit 4e7dcfc

Please sign in to comment.