Fix isActive on app list page
Also added some TypeScript shorthand properties
This commit is contained in:
parent
91a7808e6a
commit
7dc609cf94
|
@ -3,9 +3,9 @@
|
|||
span.app-name(v-html='app.name')
|
||||
| ~
|
||||
router-link(:to="{ name: 'Application', params: { app: app.id } }") About
|
||||
span(v-if='app.active') ~
|
||||
span(v-if='app.isActive') ~
|
||||
a(:href='app.url') Visit
|
||||
span(v-if='!app.active && app.archiveUrl') ~
|
||||
span(v-if='!app.isActive && app.archiveUrl') ~
|
||||
a(:href='app.archiveUrl') Visit
|
||||
em (archive)
|
||||
br
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
strong {{ app.name }}
|
||||
br
|
||||
span(v-if='!app.noAboutLink').
|
||||
#[router-link(:to="{ name: 'Application', params: { app: app.id } }") About] •
|
||||
#[router-link(:to="{ name: 'Application', params: { app: app.id } }" :title='aboutTitle') About] •
|
||||
a(:title='app.name' :href='app.url') Visit
|
||||
p.app-sidebar-description(v-html='app.frontPageText')
|
||||
</template>
|
||||
|
@ -21,5 +21,10 @@ import { App } from '@/data'
|
|||
export default class SidebarApp extends Vue {
|
||||
@Prop()
|
||||
app!: App
|
||||
|
||||
/** The title attribute for the About link */
|
||||
get aboutTitle () {
|
||||
return `About ${this.app.name} | Bit Badger Solutions`
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -3,38 +3,23 @@
|
|||
/** An activity performed for a customer */
|
||||
export class Activity {
|
||||
|
||||
/** The heading of the activity */
|
||||
heading: string
|
||||
|
||||
/** A description of the activity */
|
||||
narrative: string
|
||||
|
||||
/**
|
||||
* Construct a new instance
|
||||
* @param heading The heading of the activity
|
||||
* @param narrative The description of the activity
|
||||
*/
|
||||
constructor(heading: string, narrative: string) {
|
||||
this.heading = heading
|
||||
this.narrative = narrative
|
||||
}
|
||||
constructor(public heading: string, public narrative: string) { }
|
||||
}
|
||||
|
||||
/** A category of application */
|
||||
export class Category {
|
||||
|
||||
/** The ID of the category */
|
||||
id: number
|
||||
|
||||
/** The name of the category */
|
||||
name: string
|
||||
|
||||
/**
|
||||
* Construct a new instance
|
||||
* @param id The ID of the category
|
||||
* @param name The name of the category
|
||||
*/
|
||||
constructor(id: number, name: string) {
|
||||
constructor(public id: number, public name: string) {
|
||||
this.id = id
|
||||
this.name = name
|
||||
}
|
||||
|
@ -55,12 +40,6 @@ export class Category {
|
|||
/** A quote from an app */
|
||||
export class Quote {
|
||||
|
||||
/** The name of the person who provided the quote */
|
||||
name: string
|
||||
|
||||
/** What organization the person who provided the quote represents */
|
||||
from: string
|
||||
|
||||
/** The full text of the quote */
|
||||
full: string = ''
|
||||
|
||||
|
@ -72,44 +51,23 @@ export class Quote {
|
|||
* @param name The name of the person who provided the quote
|
||||
* @param from What organization the person who provided the quote represents
|
||||
*/
|
||||
constructor(name: string, from: string) {
|
||||
this.name = name
|
||||
this.from = from
|
||||
}
|
||||
constructor(public name: string, public from: string) { }
|
||||
}
|
||||
|
||||
/** A description of a part of the technology stack used */
|
||||
export class Technology {
|
||||
|
||||
/** The name of the technology */
|
||||
name: string
|
||||
|
||||
/** What aspect was addressed by this technology */
|
||||
usedFor: string
|
||||
|
||||
|
||||
/**
|
||||
* Construct a new instace
|
||||
* @param name The name of the technology
|
||||
* @param usedFor What aspect was addressed by this technology
|
||||
*/
|
||||
constructor(name: string, usedFor: string) {
|
||||
this.name = name
|
||||
this.usedFor = usedFor
|
||||
}
|
||||
constructor(public name: string, public usedFor: string) { }
|
||||
}
|
||||
|
||||
/** An application or web site */
|
||||
export class App {
|
||||
|
||||
/** The ID of the app */
|
||||
id: string
|
||||
|
||||
/** The name of the app */
|
||||
name: string
|
||||
|
||||
/** The URL of the app */
|
||||
url: string
|
||||
|
||||
/** Whether this app is active (default true) */
|
||||
isActive: boolean = true
|
||||
|
||||
|
@ -155,9 +113,5 @@ export class App {
|
|||
* @param name The name of the app
|
||||
* @param url The URL of the app
|
||||
*/
|
||||
constructor(id: string, name: string, url: string) {
|
||||
this.id = id
|
||||
this.name = name
|
||||
this.url = url
|
||||
}
|
||||
constructor(public id: string, public name: string, public url: string) { }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user