Skip to content

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Jan 4, 2023

Description

This PR adds an "Apply" button to the web UI on systems where Sunshine is running as a service. When clicked, it saves the settings and sends a SIGINT to itself to gracefully terminate. SunshineSvc will then restart it, which will load the new settings.

The "Apply" button only appears on Windows systems where Sunshine is running as a service, but the scaffolding is there to support this on Linux and Mac too (probably by just execing ourselves again).

@TheElixZammuto should probably review the config.html changes for correctness. I'm definitely no web development expert.

Screenshot

image

Save button success text (when Apply button is available):
image

Apply button success text:
image

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@@ -765,11 +765,18 @@ <h1 class="my-4">Configuration</h1>
</div>
</div>
</div>
<div class="alert alert-success my-4" v-if="success">
<b>Success!</b> Restart Sunshine to apply changes
<div class="alert alert-success my-4" v-if="saved && restart_supported">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Probably a bit reduntant to make 3 duplicated divs for the alert. You can use the tag to wrap the text and then use v-if on the span themselves.

@ReenigneArcher ReenigneArcher merged commit 65574a0 into LizardByte:nightly Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants