Skip to content

Commit

Permalink
Added app update notification in DevToys GUI (#1143)
Browse files Browse the repository at this point in the history
* Added app update notification in DevToys GUI

* disable update on first start

* Uncheck auto update option
  • Loading branch information
veler authored May 5, 2024
1 parent 1c797c5 commit 898b053
Show file tree
Hide file tree
Showing 31 changed files with 602 additions and 178 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

135 changes: 49 additions & 86 deletions src/app/dev/DevToys.Blazor/BuiltInTools/Settings/Settings.resx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -26,79 +26,79 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
Expand All @@ -119,182 +119,145 @@
</resheader>
<data name="About" xml:space="preserve">
<value>About</value>
<comment/>
</data>
<data name="AccessibleName" xml:space="preserve">
<value>Settings</value>
<comment/>
</data>
<data name="Appearance" xml:space="preserve">
<value>Appearance</value>
<comment/>
</data>
<data name="AppTheme" xml:space="preserve">
<value>App theme</value>
<comment/>
</data>
<data name="AppThemeDescription" xml:space="preserve">
<value>Select which app theme to display</value>
<comment/>
</data>
<data name="Behaviors" xml:space="preserve">
<value>Behaviors</value>
<comment/>
</data>
<data name="CheckForUpdate" xml:space="preserve">
<value>Check for update</value>
</data>
<data name="CheckForUpdateDescription" xml:space="preserve">
<value>Automatically check for updates when DevToys starts</value>
</data>
<data name="CompactMode" xml:space="preserve">
<value>Compact spacing</value>
<comment/>
</data>
<data name="CompactModeDescription" xml:space="preserve">
<value>Decrease space between UI elements</value>
<comment/>
</data>
<data name="Dark" xml:space="preserve">
<value>Dark</value>
<comment/>
</data>
<data name="DefaultLanguage" xml:space="preserve">
<value>Same as the system</value>
<comment/>
</data>
<data name="Description" xml:space="preserve">
<value>Customize DevToys look &amp; feel</value>
<comment/>
</data>
<data name="DevToysMac" xml:space="preserve">
<value>{0} for starting DevToysMac development</value>
<comment>{0} will be replaced by a name</comment>
</data>
<data name="Editing" xml:space="preserve">
<value>Editing</value>
<comment/>
</data>
<data name="EndOfLinePreference" xml:space="preserve">
<value>End Of Line character</value>
<comment/>
</data>
<data name="EndOfLinePreferenceAutomatic" xml:space="preserve">
<value>Same end of line as input (automatic)</value>
<comment/>
</data>
<data name="EndOfLinePreferenceCRLF" xml:space="preserve">
<value>Carriage Return and Line Feed (\r\n) (Windows)</value>
<comment/>
</data>
<data name="EndOfLinePreferenceLF" xml:space="preserve">
<value>Line Feed (\n) (Unix)</value>
<comment/>
</data>
<data name="Font" xml:space="preserve">
<value>Font</value>
<comment/>
</data>
<data name="HelpTranslating" xml:space="preserve">
<value>Help us translating DevToys!</value>
<comment/>
</data>
<data name="HighlightCurrentLine" xml:space="preserve">
<value>Highlight current line</value>
<comment/>
</data>
<data name="HighlightCurrentLineDescription" xml:space="preserve">
<value>Change the background color of the current line so it's more visible</value>
<comment/>
</data>
<data name="HighlightCurrentLineStateDescriptionWhenOn" xml:space="preserve">
<value>Highlight the current line</value>
<comment/>
</data>
<data name="IconDesigner" xml:space="preserve">
<value>{0} for designing the app icon</value>
<comment>{0} will be replaced by a name</comment>
</data>
<data name="Language" xml:space="preserve">
<value>Language</value>
<comment/>
</data>
<data name="LanguageDescription" xml:space="preserve">
<value>The app needs to be restarted when selecting another language</value>
<comment/>
</data>
<data name="Light" xml:space="preserve">
<value>Light</value>
<comment/>
</data>
<data name="LineNumbers" xml:space="preserve">
<value>Line numbers</value>
<comment/>
</data>
<data name="LineNumbersDescription" xml:space="preserve">
<value>Display line numbers in the text editor</value>
<comment/>
</data>
<data name="LineNumbersStateDescriptionWhenOn" xml:space="preserve">
<value>Show line numbers</value>
<comment/>
</data>
<data name="PasteClearsText" xml:space="preserve">
<value>Replace text when pasting</value>
<comment/>
</data>
<data name="PasteClearsTextDescription" xml:space="preserve">
<value>When clicking the Paste button, clear the text before pasting instead of appending to the existing text editor content.</value>
<comment/>
</data>
<data name="PasteClearsTextStateDescriptionWhenOn" xml:space="preserve">
<value>Replace text when pasting</value>
<comment/>
</data>
<data name="RenderWhitespace" xml:space="preserve">
<value>Render white space</value>
<comment/>
</data>
<data name="RenderWhitespaceStateDescriptionWhenOn" xml:space="preserve">
<value>Show whitespace</value>
<comment/>
</data>
<data name="ShortDisplayTitle" xml:space="preserve">
<value>Settings</value>
<comment/>
</data>
<data name="SmartDetection" xml:space="preserve">
<value>Smart detection</value>
<comment/>
</data>
<data name="SmartDetectionDescription" xml:space="preserve">
<value>Automatically detect the best tool based on the clipboard content</value>
<comment/>
</data>
<data name="SmartDetectionPaste" xml:space="preserve">
<value>Automatically paste the clipboard content when selecting a recommended tool</value>
<comment/>
</data>
<data name="SpecialThanks" xml:space="preserve">
<value>Special thanks to</value>
<comment/>
</data>
<data name="TextEditor" xml:space="preserve">
<value>Text editor</value>
<comment/>
</data>
<data name="TextEditorPreview" xml:space="preserve">
<value>Preview</value>
<comment/>
</data>
<data name="UseSystemSettings" xml:space="preserve">
<value>Use system settings</value>
<comment/>
</data>
<data name="Version" xml:space="preserve">
<value>Version {0}</value>
<comment/>
</data>
<data name="WordWrap" xml:space="preserve">
<value>Wrap word</value>
<comment/>
</data>
<data name="WordWrapStateDescriptionWhenOn" xml:space="preserve">
<value>Word wrap</value>
<comment/>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ public UIToolView View
.WithChildren(

Label().Text(Settings.Behaviors),
Setting("update-setting")
.Icon("FluentSystemIcons", '\uF150')
.Title(Settings.CheckForUpdate)
.Description(Settings.CheckForUpdateDescription)
.Handle(
_settingsProvider,
PredefinedSettings.CheckForUpdate),

SettingGroup("smart-detection-settings")
.Icon("FluentSystemIcons", '\uF4D5')
.Title(Settings.SmartDetection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
}
}
</ul>
<div class="custom-footer">
@Footer
</div>
</div>
</nav>

Expand Down
Loading

0 comments on commit 898b053

Please sign in to comment.