mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-10-31 23:15:05 +01:00
Fix missing isAndroid var
This commit is contained in:
parent
9df6f4fdc2
commit
be3ebdc898
@ -1,6 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
/// <reference types="@types/gtag.js" />
|
/// <reference types="@types/gtag.js" />
|
||||||
|
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
|
|
||||||
function handleAnalytics() {
|
function handleAnalytics() {
|
||||||
window.gtag?.('event', 'Add', {
|
window.gtag?.('event', 'Add', {
|
||||||
event_category: 'Extension',
|
event_category: 'Extension',
|
||||||
@ -10,53 +12,61 @@ function handleAnalytics() {
|
|||||||
|
|
||||||
const url = new URL('tachiyomi://add-repo')
|
const url = new URL('tachiyomi://add-repo')
|
||||||
url.searchParams.append('url', 'https://raw.githubusercontent.com/tachiyomiorg/extensions/repo/index.min.json')
|
url.searchParams.append('url', 'https://raw.githubusercontent.com/tachiyomiorg/extensions/repo/index.min.json')
|
||||||
|
|
||||||
|
const isAndroid = ref(true)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
isAndroid.value = !!navigator.userAgent.match(/android/i)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="!isAndroid">
|
<div>
|
||||||
<div class="action-buttons">
|
<div v-if="!isAndroid">
|
||||||
<a
|
<div class="action-buttons">
|
||||||
class="action-button primary"
|
<a
|
||||||
href="/docs/guides/getting-started"
|
class="action-button primary"
|
||||||
>
|
href="/docs/guides/getting-started"
|
||||||
Get started
|
>
|
||||||
</a>
|
Get started
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="version-disclaimer">
|
||||||
|
Requires <strong>Android 6.0</strong> or higher.
|
||||||
|
</span>
|
||||||
|
<div class="custom-block warning">
|
||||||
|
<p class="custom-block-title">
|
||||||
|
Unsupported operating system
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>Tachiyomi</strong> is an <strong>Android app</strong> only.
|
||||||
|
Use an <strong>Android device</strong> to download and install the app.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="version-disclaimer">
|
<div v-if="isAndroid">
|
||||||
Requires <strong>Android 6.0</strong> or higher.
|
<div class="action-buttons">
|
||||||
</span>
|
<a
|
||||||
<div class="custom-block warning">
|
class="action-button primary"
|
||||||
<p class="custom-block-title">
|
:href="url"
|
||||||
Unsupported operating system
|
@click="handleAnalytics()"
|
||||||
</p>
|
>
|
||||||
<p>
|
<IconDownload />
|
||||||
<strong>Tachiyomi</strong> is an <strong>Android app</strong> only.
|
<span class="text">Add repository</span>
|
||||||
Use an <strong>Android device</strong> to download and install the app.
|
<span class="version">Official</span>
|
||||||
</p>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<span class="version-disclaimer">
|
||||||
<div v-if="isAndroid">
|
Requires <strong>Tachiyomi 0.15.2</strong> or higher.
|
||||||
<div class="action-buttons">
|
</span>
|
||||||
<a
|
<div class="custom-block danger">
|
||||||
class="action-button primary"
|
<p class="custom-block-title">
|
||||||
:href="url"
|
Caution
|
||||||
@click="handleAnalytics()"
|
</p>
|
||||||
>
|
<p>
|
||||||
<IconDownload />
|
Beware that any third-party repository or extension can contain malware.
|
||||||
<span class="text">Add repository</span>
|
</p>
|
||||||
<span class="version">Official</span>
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<span class="version-disclaimer">
|
|
||||||
Requires <strong>Tachiyomi 0.15.2</strong> or higher.
|
|
||||||
</span>
|
|
||||||
<div class="custom-block danger">
|
|
||||||
<p class="custom-block-title">
|
|
||||||
Caution
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Beware that any third-party repository or extension can contain malware.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user