Skip to content

Commit

Permalink
Add support section to settings
Browse files Browse the repository at this point in the history
This setting contains links to submitting a bug report/feature request in github.
Additionally a button which links to the main github page.
  • Loading branch information
LiamMorrow committed Nov 27, 2024
1 parent a9a326b commit 404061f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions LiftLog.Ui/Pages/Settings/SettingsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,42 @@
</md-list-item>
</md-list>
<ProFeatures/>
<md-list class="text-left">
<ListTitle Title="Support" />
<md-list-item type="link" multi-line-supporting-text href="https://github.com/LiamMorrow/LiftLog/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md">
<md-icon slot="start">star</md-icon>
<span slot="headline" >Feature request</span>
<span slot="supporting-text">Suggest a new feature that you think LiftLog should have!</span>
</md-list-item>
<md-list-item type="link" multi-line-supporting-text href="https://github.com/LiamMorrow/LiftLog/issues/new?assignees=&labels=bug&projects=&template=bug_report.md">
<md-icon slot="start">bug_report</md-icon>
<span slot="headline" >Bug report</span>
<span slot="supporting-text">Let us know when you encounter a bug</span>
</md-list-item>

<md-list-item type="button" multi-line-supporting-text @onclick="ShowAppInfo">
<md-icon slot="start">info</md-icon>
<span slot="headline" >App Info</span>
<span slot="supporting-text">Display app information</span>
</md-list-item>

</md-list>


<Dialog @ref="appInfoDialog" type="alert">
<span slot="headline">App Info</span>
<span slot="content" class="block text-left">
LiftLog is an entirely open source app, licensed under the AGPL-3.0 license. You can find the source code on <a class="underline text-primary font-bold" href="https://github.com/LiamMorrow/LiftLog">GitHub</a>.
</span>
<div slot="actions">
<AppButton Type="AppButtonType.Text" OnClick="() => { appInfoDialog?.Close(); }">Close</AppButton>
</div>
</Dialog>

@code {

private Dialog? appInfoDialog;

protected override void OnInitialized()
{
Dispatcher.Dispatch(new SetPageTitleAction("Settings"));
Expand All @@ -64,4 +97,9 @@
{
Dispatcher.Dispatch(new NavigateAction("/settings/notifications"));
}

private void ShowAppInfo()
{
appInfoDialog?.Open();
}
}

0 comments on commit 404061f

Please sign in to comment.