Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate teerdays lp, small ui fixen mouse over on select network box #73

Merged
merged 10 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions components/ui/NetworkSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
<div
class="flex flex-row justify-between w-full text-center gap-4 container mb-10"
>
<!-- USE THIS LATER TO LINK TO app.incognitee.io <a
href=""
target="_blank"
class="currency-box p-3 gap-2 basis-1/4 hover:border-2 hover:border-incognitee-green"
>
<TEER class="w-[30px] h-[30px]" />
<p class="text-xs">TEER<br />Integritee</p>
</a>
-->
<!-- TEER Box -->
<div
class="currency-box gap-2 p-3 basis-1/3 relative"
:class="{
'border-2 border-incognitee-green':
selectedNetwork === ChainId.IntegriteeKusama,
'border-incognitee-green':
teerHover ||
(isProd && selectedNetwork === ChainId.IntegriteeKusama) ||
(!isProd && selectedNetwork !== ChainId.PaseoRelay),
}"
@mouseover="teerHover = true"
@mouseleave="teerHover = false"
@click="handleTeerClick"
>
<TEER class="w-[30px] h-[30px]" />
Expand All @@ -27,18 +23,26 @@
>
<div class="ribbon red"><span>beta</span></div>
</div>

<!-- PAS PASEO Box -->
<div
class="currency-box gap-2 p-3 basis-1/3 relative"
:class="{
'border-2 border-incognitee-green':
selectedNetwork === ChainId.PaseoRelay,
'border-incognitee-green':
pasHover ||
(!isProd && selectedNetwork === ChainId.PaseoRelay) ||
(isProd && teerHover),
}"
@mouseover="pasHover = true"
@mouseleave="pasHover = false"
@click="handlePasClick"
>
<Paseo class="w-[30px] h-[30px]" />
<p class="text-xs">PAS<br />PASEO</p>
<div class="ribbon blue"><span>test</span></div>
</div>

<!-- USDC Box -->
<div
class="currency-box gap-2 p-3 basis-1/3 relative"
@click="openAssetsInfo"
Expand All @@ -54,12 +58,14 @@
</template>

<script setup lang="ts">
import { ref } from "vue";
import Paseo from "assets/img/paseo-logo.svg";
import USDC from "assets/img/usdc-logo.svg";
import TEER from "@/assets/img/logo-icon.svg";
import { ChainId } from "@/configs/chains.ts";
import { defineProps } from "vue";

// Props werden übergeben
const props = defineProps({
openAssetsInfo: {
type: Function,
Expand All @@ -71,12 +77,19 @@ const props = defineProps({
},
});

// Umgebungsvariable für Prod/Dev erkennen
const isProd = ref(process.env.LIVE === "false");
brenzi marked this conversation as resolved.
Show resolved Hide resolved

// Hover-Zustände
const teerHover = ref(false);
const pasHover = ref(false);

// Funktionen für das Klicken auf die Boxen
const handleTeerClick = () => {
try {
if (props.selectedNetwork === ChainId.IntegriteeKusama) {
console.log("do nothing");
} else {
console.log("open link");
window.open("https://app.incognitee.io", "_blank");
}
} catch (e) {
Expand All @@ -89,7 +102,6 @@ const handlePasClick = () => {
if (props.selectedNetwork === ChainId.PaseoRelay) {
console.log("do nothing");
} else {
console.log("open link");
window.open("https://try.incognitee.io", "_blank");
}
} catch (e) {
Expand All @@ -99,6 +111,16 @@ const handlePasClick = () => {
</script>

<style scoped>
.currency-box {
position: relative;
border: 2px solid transparent; /* Transparenter Rahmen als Platzhalter */
transition: border-color 0.3s ease; /* Sanfter Übergang der Rahmenfarbe */
}

.currency-box.border-incognitee-green {
border-color: #24ad7c; /* Grüne Rahmenfarbe */
}

.ribbon {
position: absolute;
top: 0;
Expand Down
9 changes: 7 additions & 2 deletions components/ui/ObtainTokenOverlay.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<template>
<OverlayDialog :show="show" :close="close" title="Obtain Tokens!">
<OverlayDialog :show="show" :close="close" title="Obtain TEER Tokens!">
<div class="mt-2">
<p class="text-sm text-gray-400">
You can get {{ tokenSymbol }} at gate.io and kraken
You can get {{ tokenSymbol }} at
<a href="https://www.gate.io/de/trade/TEER_USDT">gate.io</a> and
<a
href="https://www.kraken.com/prices/integritee?quote=usd&interval=24h"
>Kraken</a
>
</p>
<p class="text-sm text-gray-400">
after buying {{ tokenSymbol }}, withdraw them to this address:
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default defineNuxtConfig({
"/": { ssr: false },
"/teerdays": { ssr: false },
"/gtn": { ssr: false },
"/teerdays-lp": { ssr: false },
},
imports: {
autoImport: false,
Expand Down
Loading
Loading