You've already forked AstralRinth
forked from didirus/AstralRinth
Add feature flag for opening external links in a new tab (#749)
Closes https://github.com/modrinth/knossos/issues/438
This commit is contained in:
@@ -2,6 +2,7 @@ export default (ctx, inject) => {
|
||||
inject('user', ctx.store.state.user)
|
||||
inject('tag', ctx.store.state.tag)
|
||||
inject('auth', ctx.store.state.auth)
|
||||
inject('cosmetics', ctx.store.state.cosmetics)
|
||||
inject('defaultHeaders', () => {
|
||||
const obj = { headers: {} }
|
||||
|
||||
@@ -21,6 +22,9 @@ export default (ctx, inject) => {
|
||||
formatVersions(versionsArray, ctx.store)
|
||||
)
|
||||
inject('orElse', (first, otherwise) => first ?? otherwise)
|
||||
inject('external', () =>
|
||||
ctx.store.state.cosmetics.externalLinksNewTab ? '_blank' : ''
|
||||
)
|
||||
inject('formatBytes', formatBytes)
|
||||
inject('formatWallet', formatWallet)
|
||||
inject('formatProjectType', formatProjectType)
|
||||
|
||||
Reference in New Issue
Block a user