2024-04-16 20:20:30 +02:00
|
|
|
<template>
|
2024-06-01 22:14:17 +02:00
|
|
|
<div class="fixed w-full flex flex-row px-2 bg-[#111111] h-14 z-10 gap-1" style="-webkit-app-region: drag">
|
2024-05-01 01:45:45 +02:00
|
|
|
<div class="w-full flex gap-10 flex-row items-center justify-center px-5">
|
|
|
|
<button
|
|
|
|
@click="openAddAnime"
|
|
|
|
class="flex items-center justify-center px-2 py-2 gap-1 transition-all bg-[#ffffff16] hover:bg-[#ffffff25] rounded-lg select-none"
|
|
|
|
style="-webkit-app-region: no-drag"
|
|
|
|
>
|
|
|
|
<Icon name="ph:plus-bold" class="h-3.5 w-3.5 text-white" />
|
|
|
|
<div class="text-[11px] text-white font-dm"> ADD DOWNLOAD </div>
|
|
|
|
</button>
|
2024-04-26 15:40:08 +02:00
|
|
|
</div>
|
2024-05-02 01:15:52 +02:00
|
|
|
<div class="relative w-full flex flex-row items-center justify-center">
|
2024-05-01 01:45:45 +02:00
|
|
|
<img src="/logo.png" class="h-8" />
|
|
|
|
<div class="text-[10px] leading-[10px] text-opacity-90 text-white select-none"
|
2024-06-24 22:08:11 +02:00
|
|
|
>CrunchyDL <br />
|
|
|
|
v{{ packageJson.version }}</div
|
2024-05-01 01:45:45 +02:00
|
|
|
>
|
|
|
|
</div>
|
|
|
|
<div class="w-full flex gap-2 flex-row items-center justify-center">
|
2024-05-08 03:18:15 +02:00
|
|
|
<button
|
2024-05-01 01:45:45 +02:00
|
|
|
@click="openSettings"
|
|
|
|
class="flex items-center justify-center px-2 py-2 gap-1 transition-all bg-[#ffffff16] hover:bg-[#ffffff25] rounded-lg select-none"
|
|
|
|
style="-webkit-app-region: no-drag"
|
|
|
|
>
|
|
|
|
<Icon name="ic:round-settings" class="h-3.5 w-3.5 text-white" />
|
|
|
|
<div class="text-[11px] text-white font-dm"> SETTINGS </div>
|
2024-05-08 03:18:15 +02:00
|
|
|
</button>
|
2024-04-26 15:40:08 +02:00
|
|
|
</div>
|
2024-04-16 20:20:30 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2024-06-28 05:07:41 +02:00
|
|
|
import packageJson from '../package.json'
|
2024-06-24 22:08:11 +02:00
|
|
|
|
2024-04-16 20:20:30 +02:00
|
|
|
const isProduction = process.env.NODE_ENV !== 'development'
|
|
|
|
|
|
|
|
async function openSettings() {
|
2024-05-01 01:45:45 +02:00
|
|
|
;(window as any).myAPI.openWindow({
|
|
|
|
title: 'Settings',
|
|
|
|
url: isProduction ? 'http://localhost:8079/settings' : 'http://localhost:3000/settings',
|
|
|
|
width: 600,
|
|
|
|
height: 700,
|
|
|
|
backgroundColor: '#111111'
|
|
|
|
})
|
2024-04-16 20:20:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
async function openAddAnime() {
|
2024-05-01 01:45:45 +02:00
|
|
|
;(window as any).myAPI.openWindow({
|
|
|
|
title: 'Add Anime',
|
|
|
|
url: isProduction ? 'http://localhost:8079/addanime' : 'http://localhost:3000/addanime',
|
|
|
|
width: 700,
|
2024-06-24 22:47:10 +02:00
|
|
|
height: 550,
|
2024-05-01 01:45:45 +02:00
|
|
|
backgroundColor: '#111111'
|
|
|
|
})
|
2024-04-16 20:20:30 +02:00
|
|
|
}
|
|
|
|
</script>
|
2024-05-08 03:18:15 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.font-dm {
|
|
|
|
font-family: 'DM Sans', sans-serif;
|
|
|
|
}
|
|
|
|
|
|
|
|
.font-protest {
|
|
|
|
font-family: 'Protest Riot', sans-serif;
|
|
|
|
font-weight: 400;
|
|
|
|
font-style: normal;
|
|
|
|
}
|
|
|
|
|
|
|
|
.font-dm-big {
|
|
|
|
font-family: 'DM Sans', sans-serif;
|
|
|
|
font-weight: 1000;
|
|
|
|
font-style: normal;
|
|
|
|
}
|
|
|
|
</style>
|