-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat] Add feedback and about to viewer (#1115)
* Show Feedback button in viewer * Import and inject global styles using vite's style.css?inline feature * Add about dialog to viewer * change feedback path to specify application name * version stamp all fw lite dlls. use the version from the assembly as the feedback version * Make viewer about text translatable --------- Co-authored-by: Kevin Hahn <[email protected]>
- Loading branch information
Showing
19 changed files
with
150 additions
and
26 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
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
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using LexBoxApi.Services; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace LexBoxApi.Controllers; | ||
|
||
[ApiController] | ||
[Route("/api/feedback")] | ||
public class FeedbackController() : ControllerBase | ||
{ | ||
[HttpGet("fw-lite")] | ||
public IResult RedirectToFieldWorksLiteFeedbackForm() | ||
{ | ||
var version = AppVersionService.Version; | ||
var os = "Web"; | ||
var url = $"https://docs.google.com/forms/d/e/1FAIpQLSdUdNufT3sdoBscY7vixguYnvtgpaw-hjX-z54BKi9KlYv4vw/viewform?usp=pp_url&entry.2102942583={version}&entry.1772086822={os}"; | ||
return Results.Redirect(url, preserveMethod: true); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,36 @@ | ||
<script lang="ts"> | ||
import { mdiInformationVariantCircle } from '@mdi/js'; | ||
import { Button, Dialog, Toggle } from 'svelte-ux'; | ||
import type { Readable } from 'svelte/store'; | ||
import Markdown from 'svelte-exmarkdown'; | ||
import NewTabLinkRenderer from './NewTabLinkRenderer.svelte'; | ||
import { onMount } from 'svelte'; | ||
export let text: Readable<string>; | ||
let toggle: Toggle; | ||
onMount(() => { | ||
if (!localStorage.getItem('suppressAbout')) { | ||
toggle.on = true; | ||
localStorage.setItem('suppressAbout', 'true'); | ||
} | ||
}); | ||
</script> | ||
|
||
<Toggle bind:this={toggle} let:on={open} let:toggleOn let:toggleOff> | ||
<Button on:click={toggleOn} size="sm" variant="outline" icon={mdiInformationVariantCircle}> | ||
<div class="hidden sm:contents"> | ||
About | ||
</div> | ||
</Button> | ||
<Dialog {open} on:close={toggleOff} class="w-[700px]"> | ||
<div class="m-6 prose"> | ||
<Markdown md={$text} plugins={[{ renderer: { a: NewTabLinkRenderer } }]} /> | ||
</div> | ||
<div class="flex-grow"></div> | ||
<div slot="actions"> | ||
<Button>Close</Button> | ||
</div> | ||
</Dialog> | ||
</Toggle> |
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,16 @@ | ||
<script lang="ts"> | ||
export let href: string; | ||
export let title: string | undefined = undefined; | ||
</script> | ||
|
||
<a {href} {title} target="_blank" class="external-link link link-hover"> | ||
<!-- prevents the link from ever being at the very beginning of a new line --> | ||
<slot /> <span class="i-mdi-open-in-new external-link-icon" /> | ||
</a> | ||
|
||
<style> | ||
.external-link-icon { | ||
margin-bottom: -0.7%; | ||
font-size: 0.9em; | ||
} | ||
</style> |
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 was deleted.
Oops, something went wrong.
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