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

[development] Fix: fixed env var UI #910

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
47 changes: 40 additions & 7 deletions src/packages/@app/pages/Auth/entry-point/EntryPoint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import constants from "$lib/utils/constants";
import Header from "$lib/components/header/Header.svelte";
import star from "$lib/assets/star.svg";
import StarIcon from "../../../../@library/icons/Star.svelte";
import StarFilled from "@library/icons/StarFilled.svelte";
import copyToClipBoard from "$lib/utils/copyToClipboard";
import { open } from "@tauri-apps/plugin-shell";
import { version } from "../../../../../../src-tauri/tauri.conf.json";
Expand All @@ -14,6 +16,7 @@
import BgContainer from "./BgContainer.svelte";
let isEntry = false;

let isHover = false;
let redirectRules = {
title: "Opening Web Browser...",
description: "",
Expand Down Expand Up @@ -102,22 +105,48 @@
>
</div>
<div slot="outside">
<p
class="text-center sparrow-fs-16 d-flex cursor-pointer mt-5 d-flex justify-content-center align-items-center mb-5"
<div
class="mb button-text text-center sparrow-fs-16 gap-1 d-flex cursor-pointer mt-5 d-flex justify-content-center align-items-center mb-5 object-fit-cover"
on:click={async () => {
await open(externalSparrowGithub);
}}
>
<img src={star} class="me-2" alt="" />
<span>Star us on GitHub</span>
</p>
<div
class="d-flex"
on:mouseenter={() => {
isHover = true;
}}
on:mouseleave={() => {
isHover = false;
}}
>
<div class="me-1">
{#if isHover}
<StarFilled />
{:else}
<StarIcon />
{/if}
</div>

<p
class="{isHover ? 'star-text-hover' : ''} mb-0"
style="margin-top:3px; "
>
Star us on GitHub
</p>
</div>
</div>
<div class="divider-line my-4" />

<div>
<p class="text-center text-secondary-250 sparrow-fs-14 m-1">
<p
class=" cursor-pointer text-center text-secondary-250 sparrow-fs-14 m-1"
>
Version {version}
</p>
<p class="check-for-update text-center sparrow-fs-12 mb-5">
<p
class=" cursor-pointer check-for-update text-center sparrow-fs-12 mb-5"
>
Check for Update
</p>
</div>
Expand Down Expand Up @@ -175,4 +204,8 @@
background-clip: text;
color: transparent;
}
.star-text-hover {
color: var(--primary-btn-color);
text-decoration: underline;
}
</style>
18 changes: 14 additions & 4 deletions src/packages/@app/pages/Auth/redirect/Redirect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,16 @@
class="px-2 sparrow-fs-12 text-secondary-250">Report Issue</a
>
</div>
<p class="text-center text-secondary-250 sparrow-fs-12 mt-3">
Version {version}
</p>
<p class="check-for-update text-center sparrow-fs-12">Check for Update</p>
<div class="mt-5">
<p
class="cursor-pointer text-center text-secondary-250 sparrow-fs-12 mt-3 mb-1"
>
Version {version}
</p>
<p class="cursor-pointer check-for-update text-center sparrow-fs-12 0">
Check for Update
</p>
</div>
</div>
</div>

Expand Down Expand Up @@ -135,6 +141,10 @@
a {
text-decoration: none;
}
a:hover {
color: var(--primary-btn-color);
text-decoration: underline;
}
.cursor-pointer {
cursor: pointer;
}
Expand Down
18 changes: 18 additions & 0 deletions src/packages/@library/icons/Star.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script>
export let height = "24px";
export let width = "24px";
export let color = "white";
</script>

<svg
width="18"
height="17"
viewBox="0 0 18 17"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.91152 13.25L9.06152 11.35L12.2115 13.275L11.3865 9.675L14.1615 7.275L10.5115 6.95L9.06152 3.55L7.61152 6.925L3.96152 7.25L6.73652 9.675L5.91152 13.25ZM9.06152 13.7L4.91152 16.2C4.72819 16.3167 4.53652 16.3667 4.33652 16.35C4.13652 16.3333 3.96152 16.2667 3.81152 16.15C3.66152 16.0333 3.54486 15.8875 3.46152 15.7125C3.37819 15.5375 3.36152 15.3417 3.41152 15.125L4.51152 10.4L0.836523 7.225C0.669857 7.075 0.56569 6.90417 0.524023 6.7125C0.482357 6.52083 0.494857 6.33333 0.561523 6.15C0.62819 5.96667 0.72819 5.81667 0.861523 5.7C0.994857 5.58333 1.17819 5.50833 1.41152 5.475L6.26152 5.05L8.13652 0.6C8.21986 0.4 8.34902 0.25 8.52402 0.15C8.69902 0.05 8.87819 0 9.06152 0C9.24486 0 9.42402 0.05 9.59902 0.15C9.77402 0.25 9.90319 0.4 9.98652 0.6L11.8615 5.05L16.7115 5.475C16.9449 5.50833 17.1282 5.58333 17.2615 5.7C17.3949 5.81667 17.4949 5.96667 17.5615 6.15C17.6282 6.33333 17.6407 6.52083 17.599 6.7125C17.5574 6.90417 17.4532 7.075 17.2865 7.225L13.6115 10.4L14.7115 15.125C14.7615 15.3417 14.7449 15.5375 14.6615 15.7125C14.5782 15.8875 14.4615 16.0333 14.3115 16.15C14.1615 16.2667 13.9865 16.3333 13.7865 16.35C13.5865 16.3667 13.3949 16.3167 13.2115 16.2L9.06152 13.7Z"
fill={color}
/>
</svg>
3 changes: 3 additions & 0 deletions src/packages/@library/icons/StarFilled.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svg width="18" height="17" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.56154 13.7L4.41154 16.2C4.22821 16.3167 4.03654 16.3667 3.83654 16.35C3.63654 16.3333 3.46154 16.2667 3.31154 16.15C3.16154 16.0333 3.04487 15.8875 2.96154 15.7125C2.87821 15.5375 2.86154 15.3417 2.91154 15.125L4.01154 10.4L0.336538 7.225C0.169872 7.075 0.0657051 6.90417 0.0240385 6.7125C-0.0176282 6.52083 -0.0051282 6.33333 0.0615385 6.15C0.128205 5.96667 0.228205 5.81667 0.361538 5.7C0.494872 5.58333 0.678205 5.50833 0.911539 5.475L5.76154 5.05L7.63654 0.6C7.71987 0.4 7.84904 0.25 8.02404 0.15C8.19904 0.05 8.37821 0 8.56154 0C8.74487 0 8.92404 0.05 9.09904 0.15C9.27404 0.25 9.40321 0.4 9.48654 0.6L11.3615 5.05L16.2115 5.475C16.4449 5.50833 16.6282 5.58333 16.7615 5.7C16.8949 5.81667 16.9949 5.96667 17.0615 6.15C17.1282 6.33333 17.1407 6.52083 17.099 6.7125C17.0574 6.90417 16.9532 7.075 16.7865 7.225L13.1115 10.4L14.2115 15.125C14.2615 15.3417 14.2449 15.5375 14.1615 15.7125C14.0782 15.8875 13.9615 16.0333 13.8115 16.15C13.6615 16.2667 13.4865 16.3333 13.2865 16.35C13.0865 16.3667 12.8949 16.3167 12.7115 16.2L8.56154 13.7Z" fill="#85C2FF"/>
</svg>
4 changes: 3 additions & 1 deletion src/packages/@library/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ export { default as UploadIcon } from "./Upload.svelte";
export { default as InfoIcon } from "./Info.svelte";
export { default as FolderPlusIcon } from "./FolderPlus.svelte";
export { default as RequestIcon } from "./Request.svelte";
export { default as ArrowUnfilledIcon} from "./ArrowUnfilled.svelte";
export { default as ArrowUnfilledIcon } from "./ArrowUnfilled.svelte";
export { default as StarIcon } from "./Star.svelte";
export { default as StarFilledIcon } from "./StarFilled.svelte";
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</script>

<div
class="select-environment-popup bg-tertiary-700 d-flex p-3 rounded"
class="select-environment-popup bg-tertiary-700 d-flex p-3 rounded"
style="
top:{environmentAxisY}px;
left:{environmentAxisX}px;
Expand Down Expand Up @@ -115,19 +115,20 @@
class="p-0 d-flex flex-column justify-content-center w-100 ps-2"
>
<p
class="text-fs-11 text-secondary-100 m-0 p-0 env-value"
style="margin-bottom:2px;"
class="text-fs-11 text-secondary-100 m-0 p-0 env-value word-break"
style="margin-bottom:2px; "
>
{mock.key}
</p>
{#if mock.value}
<p class="text-fs-9 text-secondary-300 m-0 p-0 env-value">
<p
class="text-fs-9 text-secondary-300 m-0 p-0 env-value word-break"
>
{mock.value}
</p>
{/if}
</div>
</div>

</div>
{/if}
{/each}
Expand Down Expand Up @@ -167,11 +168,15 @@
style="height: 33px;"
class="p-0 d-flex flex-column justify-content-center w-100 ps-2"
>
<p class="text-fs-11 text-secondary-100 m-0 p-0 env-value">
<p
class="text-fs-11 text-secondary-100 m-0 p-0 env-value word-break"
>
{mock.key}
</p>
{#if mock.value}
<p class="text-fs-9 text-secondary-300 m-0 p-0 env-value">
<p
class="text-fs-9 text-secondary-300 m-0 p-0 env-value word-break"
>
{mock.value}
</p>
{/if}
Expand Down Expand Up @@ -212,4 +217,7 @@
.env-item:hover {
background-color: var(--bg-tertiary-400);
}
.word-break {
word-break: break-all;
}
</style>
Loading