hyperboria/nexus/views/js/scitech.js
the-superpirate 8e8a92f1b1 - feat(nexus): Refactoring Cognitron
2 internal commit(s)

GitOrigin-RevId: bdefcb9130693f1bc6c56d23d44fc4e41ff4672d
2021-04-30 16:16:13 +03:00

22 lines
506 B
JavaScript

import { BaseView } from './base'
export class ScitechView extends BaseView {
schema = 'scitech'
icon = '📚'
getFormattedLocator () {
const parts = []
if (this.authorsList) {
parts.push(this.getFirstAuthors(true, 3))
}
if (this.issuedAt) {
const date = new Date(this.issuedAt * 1000)
parts.push(`(${date.getUTCFullYear()})`)
}
if (this.pages) {
parts.push(`pp. ${self.pages}`)
}
return parts.join(' ')
}
}