-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
126 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<ModularDialog title={"Feedback"} description={"Feedback is always welcome! Report issues or request features."}> | ||
<slot slot="openButton"> | ||
<Dialog.Trigger class="button"> | ||
<Megaphone /> | ||
Feedback | ||
</Dialog.Trigger> | ||
</slot> | ||
<div class="w-full"> | ||
<Tabs.Root value="file" class=""> | ||
<Tabs.List class="grid w-full grid-cols-2 gap-1 rounded-xl border-2 p-1 text-sm font-semibold leading-[0.01em]"> | ||
<Tabs.Trigger | ||
value="file" | ||
class="h-10 rounded-xl bg-transparent py-2 text-base data-[state=active]:bg-white data-[state=active]:text-black" | ||
> | ||
GitHub | ||
</Tabs.Trigger> | ||
<Tabs.Trigger | ||
value="image" | ||
class="h-10 rounded-xl bg-transparent py-2 text-base data-[state=active]:bg-white data-[state=active]:text-black" | ||
> | ||
</Tabs.Trigger> | ||
</Tabs.List> | ||
<Tabs.Content value="file" class="pt-10"> | ||
<div> | ||
<h5 class="mb-3">Report Issues or Request Features</h5> | ||
<button | ||
on:click={() => { | ||
open("https://github.com/levminer/cores/issues") | ||
}} | ||
class="button w-full">Open GitHub</button | ||
> | ||
</div> | ||
</Tabs.Content> | ||
<Tabs.Content value="image" class="pt-10"> | ||
<div> | ||
<h5 class="mb-3">Send an email to [email protected]</h5> | ||
<button | ||
on:click={() => { | ||
open("mailto:[email protected]") | ||
}} | ||
class="button w-full">Send Email</button | ||
> | ||
</div> | ||
</Tabs.Content> | ||
</Tabs.Root> | ||
</div> | ||
</ModularDialog> | ||
|
||
<script lang="ts"> | ||
import { Dialog, Tabs } from "bits-ui" | ||
import ModularDialog from "./modularDialog.svelte" | ||
import { settings } from "../stores/settings.ts" | ||
import { Megaphone, Github } from "lucide-svelte" | ||
import { open } from "@tauri-apps/plugin-shell" | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,21 +258,6 @@ | |
} | ||
}) | ||
/* | ||
onMount(() => { | ||
// Check if trial is over | ||
if ($settings.licenseActivated) { | ||
let dateActivated = new Date($settings.licenseActivated) | ||
let dateNow = new Date() | ||
let diff = dateNow.getTime() - dateActivated.getTime() | ||
let days = Math.ceil(diff / (1000 * 3600 * 24)) | ||
if (days > 7) { | ||
stepPricing() | ||
} | ||
} | ||
}) */ | ||
const stepLogin = () => { | ||
step = "login" | ||
} | ||
|
@@ -299,6 +284,7 @@ | |
// Start server | ||
const port = await start({ | ||
response: `<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;font-family:Arial,sans-serif;background:#1a1a1a;margin:0;position:fixed;top:0;left:0;right:0;bottom:0"><h2 style="color:white;margin:0">Authentication Completed</h2><p style="color:#999">You can now close this page and return to the app.</p></div><style>body{margin:0;padding:0;background:#1a1a1a}</style>`, | ||
ports: [5380, 5385], | ||
}) | ||
// Listen for OAuth result | ||
|
@@ -316,14 +302,15 @@ | |
if (error || userError) { | ||
alert( | ||
`Failed to login, please try again or send an email to [email protected] if you need help.\nError: ${ | ||
`Failed to login, please restart the app and try again or send an email to [email protected] if you need help.\nError: ${ | ||
error || userError | ||
}`, | ||
) | ||
} | ||
if (userData.plan === "personal" || userData.plan === "business") { | ||
// User is on a paid plan | ||
$state.plan = userData.plan | ||
$state.showMenu = true | ||
router.goto("/home") | ||
} | ||
|
@@ -342,15 +329,19 @@ | |
}) | ||
if (error) { | ||
alert(`Failed to login, please try again or send an email to [email protected] if you need help.\nError: ${error}`) | ||
alert( | ||
`Failed to login, please restart the app and try again or send an email to [email protected] if you need help.\nError: ${error}`, | ||
) | ||
} | ||
if (data) { | ||
console.log(data) | ||
open(data.url) | ||
} | ||
} catch (error) { | ||
alert(`Failed to login, please try again or send an email to [email protected] if you need help.\nError: ${error}`) | ||
alert( | ||
`Failed to login, please restart the app and try again or send an email to [email protected] if you need help.\nError: ${error}`, | ||
) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters