| <template> |
| <PluginComponent |
| v-model="open" |
| :infoPayload="infoPayload" |
| cancelBtnTxt="Done" |
| actionBtnTxt="" |
| @onPopupDone="onPopupDone" |
| @onUserArgChanged="onUserArgChanged" |
| @onMolCountsChanged="onMolCountsChanged" |
| > |
| <img :src="lazyLoadedImg" class="img-thumbnail mb-2 mx-auto" style="display:block; width:192px; height: 192px;" /> |
| <p> |
| The following organizations and individuals have contributed, directly or |
| indirectly, to the {{ appName }} project: |
| </p> |
| |
| <ul> |
| <li |
| v-for="credit of contributorCreditsToShowInOrder" |
| v-bind:key="credit.name" |
| > |
| <a v-if="credit.url" :href="credit.url" target="_blank">{{ |
| credit.name |
| }}</a> |
| <span v-else>{{ credit.name }}</span> |
| </li> |
| </ul> |
| |
| <p> |
| We also thank the following open-source projects that make {{ appName }} |
| possible: |
| </p> |
| |
| <ul> |
| <li |
| v-for="credit of softwareCreditsToShowInOrder" |
| v-bind:key="credit.name" |
| > |
| <a :href="credit.url" target="_blank">{{ credit.name }}</a> (<a |
| :href="getLicenseUrl(credit)" |
| target="_blank" |
| >{{ credit.license.name }} </a |
| >) |
| </li> |
| </ul> |
| <p>This version of {{ appName }} was compiled on {{ appCompileTime }}.</p> |
| </PluginComponent> |
| </template> |
| |
| <script lang="ts"> |
| import { Options } from "vue-class-component"; |
| import { IContributorCredit, ISoftwareCredit } from "../PluginInterfaces"; |
| import { Prop } from "vue-property-decorator"; |
| import { appName, appCompileTime, appIntro, appDetails, logoPath } from "@/Core/GlobalVars"; |
| import PluginComponent from "../Parents/PluginComponent/PluginComponent.vue"; |
| import { PluginParentClass } from "../Parents/PluginParentClass/PluginParentClass"; |
| import { UserArg } from "@/UI/Forms/FormFull/FormFullInterfaces"; |
| import { ITest } from "@/Testing/TestInterfaces"; |
| import { TestCmdList } from "@/Testing/TestCmdList"; |
| import { Tag } from "./ActivityFocus/ActivityFocusUtils"; |
| import { detectPlatform, HostOs } from "@/Core/HostOs"; |
| |
| |
| @Options({ |
| components: { |
| PluginComponent, |
| }, |
| }) |
| export default class AboutPlugin extends PluginParentClass { |
| @Prop({ required: true }) softwareCreditsToShow!: ISoftwareCredit[]; |
| @Prop({ required: true }) contributorCreditsToShow!: IContributorCredit[]; |
| |
| menuPath = detectPlatform() === HostOs.Mac ? [`[1] ${appName}`, "[1] About..."] : ["Help", "[9] About..."]; |
| |
| title = "About"; |
| softwareCredits: ISoftwareCredit[] = []; |
| contributorCredits: IContributorCredit[] = [ |
| { |
| name: "Jacob D. Durrant", |
| url: "http://durrantlab.com/", |
| }, |
| ]; |
| pluginId = "about"; |
| intro = appIntro; |
| details = appDetails; |
| userArgDefaults: UserArg[] = []; |
| |
| logJob = false; |
| tags = [Tag.All]; |
| |
| lazyLoadedImg = ""; |
| |
| |
| |
| |
| |
| |
| get softwareCreditsToShowInOrder(): ISoftwareCredit[] { |
| |
| return this.softwareCreditsToShow.sort((a, b) => { |
| const an = a.name.toLowerCase(); |
| const bn = b.name.toLowerCase(); |
| if (an < bn) return -1; |
| if (an > bn) return 1; |
| return 0; |
| }); |
| } |
| |
| |
| |
| |
| |
| |
| get contributorCreditsToShowInOrder(): IContributorCredit[] { |
| |
| return this.contributorCreditsToShow.sort((a, b) => { |
| const an = (a.name.split(" ").pop() as string).toLowerCase(); |
| const bn = (b.name.split(" ").pop() as string).toLowerCase(); |
| if (an < bn) return -1; |
| if (an > bn) return 1; |
| return 0; |
| }); |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| getLicenseUrl(credit: ISoftwareCredit): string { |
| return credit.licenseUrl || credit.license.url; |
| } |
| |
| |
| |
| |
| |
| |
| get appName(): string { |
| return appName; |
| } |
| |
| |
| |
| |
| |
| |
| get appCompileTime(): string { |
| return appCompileTime; |
| } |
| |
| |
| |
| |
| async onBeforePopupOpen() { |
| this.lazyLoadedImg = logoPath; |
| } |
| |
| |
| |
| |
| onPopupDone() { |
| return; |
| } |
| |
| |
| |
| |
| |
| |
| |
| runJobInBrowser(): Promise<void> { |
| return Promise.resolve(); |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| async getTests(): Promise<ITest> { |
| return { |
| closePlugin: () => new TestCmdList().pressPopupButton(".cancel-btn", this.pluginId), |
| }; |
| } |
| } |
| </script> |
| |
| <style scoped lang="scss"> |
| .inverse-indent { |
| text-indent: -1em; |
| padding-left: 1em; |
| } |
| </style> |
| |