| <template> |
| <PluginComponent :infoPayload="infoPayload" v-model="open" @onPopupDone="onPopupDone" @onPopupCancel="onPopupCancel" |
| @onUserArgChanged="onUserArgChanged" actionBtnTxt="Enable & Support" cancelBtnTxt="No, Thanks" |
| cancelBtnClass="btn-link text-decoration-none text-secondary" :cancelXBtn="false" |
| @onMolCountsChanged="onMolCountsChanged"> |
| <div> |
| |
| {{ appName }} |
| |
| <p> |
| {{ appName }} depends on grant funding. To secure these grants, |
| we need to show funding agencies that the software is actively used. |
| </p> |
| |
| <div class="card bg-light mb-3"> |
| <div class="card-body p-2"> |
| <h6 class="card-title mb-2">Our Privacy Guarantee:</h6> |
| <div class="d-flex align-items-center mb-1"> |
| <span class="text-success me-2">✔</span> |
| <small>We <strong>DO</strong> collect basic usage statistics.</small> |
| </div> |
| <div class="d-flex align-items-center mb-1"> |
| <span class="text-success me-2">✔</span> |
| <small>We <strong>DO</strong> save your layout and preferences locally via cookies.</small> |
| </div> |
| <div class="d-flex align-items-center"> |
| <span class="text-danger me-2 fw-bold">✕</span> |
| <small>We <strong>NEVER</strong> collect your molecules, sequences, or results.</small> |
| </div> |
| </div> |
| </div> |
| |
| <p class="mt-3 mb-0" style="font-size: 0.75rem; line-height: 1.3; color: #999;"> |
| If you click "Enable & Support", basic usage data will be sent to Google in the United States, |
| subject to U.S. |
| law. |
| {{ appName }} works without cookies. You can revoke consent anytime via |
| <PluginPathLink plugin="settings" linkClass="text-reset text-decoration-underline"></PluginPathLink>. |
| </p> |
| </div> |
| </PluginComponent> |
| </template> |
| |
| <script lang="ts"> |
| import PluginComponent from "../../Parents/PluginComponent/PluginComponent.vue"; |
| import { PluginParentClass } from "../../Parents/PluginParentClass/PluginParentClass"; |
| import { Options } from "vue-class-component"; |
| import { isStatStatusSet, disableStats, enableStats } from "./StatUtils"; |
| import { |
| ISoftwareCredit, |
| IContributorCredit, |
| } from "@/Plugins/PluginInterfaces"; |
| import { UserArg } from "@/UI/Forms/FormFull/FormFullInterfaces"; |
| import { ITest } from "@/Testing/TestInterfaces"; |
| import { isTest } from "@/Core/GlobalVars"; |
| import { appName } from "@/Core/GlobalVars"; |
| import * as api from "@/Api"; |
| import PluginPathLink from "@/UI/Navigation/PluginPathLink.vue"; |
| import { Tag } from "@/Plugins/Core/ActivityFocus/ActivityFocusUtils"; |
| |
| |
| |
| |
| @Options({ |
| components: { |
| PluginComponent, |
| PluginPathLink |
| }, |
| }) |
| export default class StatCollectionPlugin extends PluginParentClass { |
| |
| menuPath = null; |
| softwareCredits: ISoftwareCredit[] = []; |
| contributorCredits: IContributorCredit[] = []; |
| |
| |
| |
| |
| |
| pluginId = "statcollection"; |
| intro = null; |
| details = null; |
| title = `Support ${appName}?`; |
| open = false; |
| tags = [Tag.All]; |
| userArgDefaults: UserArg[] = []; |
| |
| |
| |
| |
| |
| |
| get appName(): string { |
| return appName; |
| } |
| |
| |
| |
| |
| onPopupCancel() { |
| |
| disableStats(); |
| } |
| |
| |
| |
| |
| |
| onPopupDone() { |
| enableStats(); |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| runJobInBrowser(args: any): Promise<void> { |
| return Promise.resolve(); |
| } |
| |
| |
| |
| |
| |
| |
| async getTests(): Promise<ITest[]> { |
| |
| |
| |
| api.plugins.runPlugin(this.pluginId, {}); |
| |
| return []; |
| } |
| |
| |
| |
| |
| async onMounted() { |
| |
| |
| setTimeout(async () => { |
| const statStatusSet = await isStatStatusSet(); |
| this.open = !isTest && !statStatusSet; |
| }, 1000); |
| |
| } |
| } |
| </script> |