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