<template>
  <div>
    <div class="row">
      <span class="label">Ultrawidify version:</span><br/> {{addonVersion}}
    </div>
    <div class="row">
    <span class="label">Having an issue?</span><br/> Report <strike>undocumented features</strike> bugs using one of the following options:
      <ul>
        <li> <a target="_blank" href="https://github.com/xternal7/ultrawidify/issues"><b>Github (preferred)</b></a><br/></li>
        <li>Email: <a target="_blank" :href="mailtoLink">tamius.han@gmail.com</a></li>
        <li>PM me on <a target="_blank" :href="redditLink">reddit</a><br/></li>
      </ul>
      <br/>
      If reporting perfomrance/RAM usage issue, please include your CPU model and RAM.
      <br/>
      <br/>
      If reporting issues with autodetection, please also include a screenshot and a link to the video > with timestamp(s) if possible.
    </div>
  </div>
</template>
<script>
import BrowserDetect from '../../ext/conf/BrowserDetect';
export default {
  data() {
    return {
      addonVersion: browser.runtime.getManifest().version || chrome.runtime.getManifest().version,
      mailtoLink: 'mailto:tamius.han@gmail.com',
      redditLink: '',
    }
  },
  created() {
    const messageTemplate = encodeURIComponent(
`Describe your issue in more detail. In case of misaligned videos, please provide screenshots. When reporting\
 issues with autodetection not detecting aspect ratio correctly, please provide a link with timestamp to the\
 problematic video at the time where the problem happens. You may delete this paragraph, as it's only a template.


Extension info (do not change or remove):
* Extension version: ${this.addonVersion}
* Browser (env): ${BrowserDetect.processEnvBrowser}

Browser-related stuff (please ensure this section is correct):
* User Agent string: ${window.navigator.userAgent}
* vendor: ${window.navigator.vendor}
* Operating system: ${window.navigator.platform}
`
      );
    this.mailtoLink = `mailto:tamius.han@gmail.com?subject=%5BUltrawidify%5D%20ENTER%20SUMMARY%20OF%20YOUR%20ISSUE%20HERE&body=${messageTemplate}`;
    this.redditLink = `https://www.reddit.com/message/compose?to=xternal7&subject=[Ultrawidify]%20ENTER%20SUMMARY%20OF%20YOUR%20PROBLEM%20HERE&message=${messageTemplate}`;
  }
}
</script>

