Skip to content

Commit

Permalink
Updated Settings page and Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
veler committed May 8, 2024
1 parent 5a327f5 commit 635d993
Show file tree
Hide file tree
Showing 62 changed files with 179 additions and 106 deletions.
94 changes: 2 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,12 @@
A Swiss Army knife for developers.
</p>
<p align="center">
<a style="text-decoration:none" href="https://etienne-baudoux.visualstudio.com/DevToys/_build?definitionId=19&branchName=main" target="_blank">
<img src="https://etienne-baudoux.visualstudio.com/DevToys/_apis/build/status/DevToys?branchName=main" alt="Build Status" />
</a>
<a title="Crowdin" target="_blank" href="https://crowdin.com/project/devtoys">
<img src="https://badges.crowdin.net/devtoys/localized.svg">
</a>
<a style="text-decoration:none" href="https://github.com/DevToys-app/DevToys/releases" target="_blank">
<img src="https://img.shields.io/github/release/DevToys-app/DevToys.svg?label=Latest%20version" alt="Latest version" />
</a>
<a style="text-decoration:none" href="https://community.chocolatey.org/packages/devtoys" target="_blank">
<img src="https://img.shields.io/chocolatey/v/devtoys?include_prereleases" alt="Chocolatey Version (including pre-releases)">
</a>
<a style="text-decoration:none" href="https://www.microsoft.com/store/apps/9PGCV4V3BK4W" target="_blank">
<img src="https://img.shields.io/badge/Microsoft%20Store-Download-brightgreen" alt="Store link" />
</a>
<a style="text-decoration:none" href="https://devtoys.app" target="_blank">
<img src="https://img.shields.io/badge/Website-devtoys.app-blue" alt="Website" />
</a>
Expand Down Expand Up @@ -69,93 +60,12 @@ Many tools are available.

... and more are coming!

![DevToys](/assets/screenshots/1.png)
![DevToys](/assets/hero-screenshot.png)

## Rate on Microsoft Store as of 5/23/2022
## Rate on Microsoft Store as of 5/7/2024

![Microsoft Store rate](/assets/ms-store-rate.png)

## How to install (as an end-user)

### Prerequisite

- You need Windows 10 build 1903+ or later.

### Microsoft Store

- Search for DevToys in the Microsoft Store App or click [here](https://www.microsoft.com/store/apps/9PGCV4V3BK4W)

### Manual

- Download and extract the latest [release](https://github.com/veler/DevToys/releases).
- Double click the *.msixbundle file.
- Install.

### WinGet

- Open a PowerShell command prompt.
- Type `winget search DevToys` to search and see details about DevToys.
- Type `winget install DevToys` to install the app.

__Note:__ a Microsoft Store account is required for WinGet. We're trying to workaround it. See here https://github.com/microsoft/winget-pkgs/pull/43996

### Chocolatey

- Make sure you already have [Chocolatey](https://chocolatey.org/) installed on your computer.
- Open a PowerShell command prompt.
- Type `choco install devtoys` or visit the [chocolatey community package](https://community.chocolatey.org/packages/devtoys/).

## App Permission

DevToys works entirely offline, meaning that none of the data used by the app goes on internet. However, the app requires some other permissions in order to work correctly.

1. `Uses all system resources` - This permission is required for some tools like `PNG / JPEG Compressor` or (upcoming) `On-screen color picker / measurer`, which use a 3rd party Open-Source Win32 process like [Efficient-Compression-Tool](https://github.com/fhanau/Efficient-Compression-Tool).
All the code requiring this permission can be found [here](https://github.com/veler/DevToys/tree/main/src/dev/impl/DevToys.OutOfProcService).

## How to run DevToys

### Using Start Menu

Open Windows start menu, type `DevToys` and press `[Enter]`.

### Using PowerShell

A cool thing about DevToys is that you can start it in command line! For this, simply open a PowerShell command prompt and type
`start devtoys:?tool={tool name}`

For example, `start devtoys:?tool=jsonyaml` will open DevToys and start on the `Json <> Yaml` tool.

Here is the list of tool name you can use:

- `base64` - Base64 Text Encoder/Decoder
- `base64img` - Base64 Image Encoder/Decoder
- `gzip` - GZip Encoder/Decoder
- `hash` - Hash Generator
- `uuid` - UUID Generator
- `loremipsum` - Lorem Ipsum Generator
- `checksum` - Checksum File
- `cronparser` - Cron Parser
- `jsonformat` Json Formatter
- `sqlformat` - SQL Formatter
- `xmlformat` - XML Formatter
- `jsonyaml` - Json <> Yaml
- `jwt` - JWT Decoder
- `colorblind` - Color Blindness Simulator
- `color` - Color Picker & Contrast
- `imgcomp` - PNG/JPEG compressor
- `imageconverter` - Image Converter
- `markdown` - Markdown Preview
- `regex` - Regular Expression Tester
- `time` - Unix Timestamp Converter
- `baseconverter` - Number Base Converter
- `string` - String Utilities
- `url` - URL Encoder/Decoder
- `html` - HTML Encoder/Decoder
- `diff` - Text Comparer
- `xmlvalidator` - XML Validator
- `escape` - Text Escape / Unescape
- `settings` - Settings

## Contribute

See [CONTRIBUTING](CONTRIBUTING.md)
Expand Down
Binary file added assets/hero-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ms-store-rate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/screenshots/1.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/All Tools.png
Binary file not shown.
Binary file not shown.
Binary file removed assets/screenshots/Dark/Base 64 Encoder Decoder.png
Binary file not shown.
Binary file not shown.
Binary file removed assets/screenshots/Dark/Checksum Generator.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed assets/screenshots/Dark/Cron Expression Parser.png
Binary file not shown.
Binary file not shown.
Binary file removed assets/screenshots/Dark/Guid Generator.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/HTML Encoder Decoder.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Hash Generator.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Image Converter.png
Binary file not shown.
Binary file not shown.
Binary file removed assets/screenshots/Dark/JSON Formatter.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/JWT Decoder.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Lorem Ipsun Generator.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Markdown Preview.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Number Base.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/PNG JPEG Compressor.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Regex Tester.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/SQL Formatter.png
Binary file not shown.
Binary file removed assets/screenshots/Dark/Settings.png
Diff not rendered.
Diff not rendered.
Binary file removed assets/screenshots/Dark/Template.png
Diff not rendered.
Binary file removed assets/screenshots/Dark/Text Diff.png
Diff not rendered.
Binary file removed assets/screenshots/Dark/Text Escape Unescape.png
Diff not rendered.
Binary file removed assets/screenshots/Dark/Timestamp Converter.png
Diff not rendered.
Binary file removed assets/screenshots/Dark/URL Encoder Decoder.png
Diff not rendered.
Binary file removed assets/screenshots/Dark/XML Formatter.png
Diff not rendered.
Binary file removed assets/screenshots/Dark/XML Validator.png
Diff not rendered.
Binary file not shown.
Binary file removed assets/screenshots/Light/All Tools.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed assets/screenshots/Light/Guid Generator.png
Diff not rendered.
Binary file removed assets/screenshots/Light/HTML Encoder Decoder.png
Diff not rendered.
Binary file removed assets/screenshots/Light/Hash Generator.png
Diff not rendered.
Diff not rendered.
Binary file removed assets/screenshots/Light/JSON Formatter.png
Diff not rendered.
Binary file removed assets/screenshots/Light/JWT Decoder.png
Diff not rendered.
Binary file removed assets/screenshots/Light/Markdown Preview.png
Diff not rendered.
Binary file removed assets/screenshots/Light/Number Case.png
Diff not rendered.
Binary file removed assets/screenshots/Light/PNG JPEG Compressor.png
Diff not rendered.
Binary file removed assets/screenshots/Light/Regex Tester.png
Diff not rendered.
Binary file removed assets/screenshots/Light/Settings.png
Diff not rendered.
Diff not rendered.
Binary file removed assets/screenshots/Light/Template.png
Diff not rendered.
Binary file removed assets/screenshots/Light/Text Diff.png
Diff not rendered.
Binary file removed assets/screenshots/Light/URL Encoder Decoder.png
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,12 @@ public void OnDataReceived(string dataTypeName, object? parsedData)

private void OnFindMoreExtensionsOnlineButtonClick()
{
// TODO: Open documentation online
OSHelper.OpenFileInShell("http://url");
OSHelper.OpenFileInShell("https://www.nuget.org/packages?q=Tags%3A%22devtoys-app%22");
}

private void OnLearnDevelopExtensionButtonClick()
{
// TODO: Open documentation online
OSHelper.OpenFileInShell("http://url");
OSHelper.OpenFileInShell("http://devtoys.app/doc");
}

private async ValueTask OnInstallExtensionButtonClickAsync()
Expand Down

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

21 changes: 21 additions & 0 deletions src/app/dev/DevToys.Blazor/BuiltInTools/Settings/Settings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@
<data name="LineNumbersStateDescriptionWhenOn" xml:space="preserve">
<value>Show line numbers</value>
</data>
<data name="OpenLogs" xml:space="preserve">
<value>Open logs</value>
</data>
<data name="PasteClearsText" xml:space="preserve">
<value>Replace text when pasting</value>
</data>
Expand Down Expand Up @@ -248,6 +251,24 @@
<data name="TextEditorPreview" xml:space="preserve">
<value>Preview</value>
</data>
<data name="UsefulLinks" xml:space="preserve">
<value>Useful links</value>
</data>
<data name="UsefulLinksLicense" xml:space="preserve">
<value>License</value>
</data>
<data name="UsefulLinksPrivacyPolicy" xml:space="preserve">
<value>Privacy policy</value>
</data>
<data name="UsefulLinksReportProblem" xml:space="preserve">
<value>Report a problem</value>
</data>
<data name="UsefulLinksSourceCode" xml:space="preserve">
<value>Source code</value>
</data>
<data name="UsefulLinksThirdPartyLicenses" xml:space="preserve">
<value>Third party licenses</value>
</data>
<data name="UseSystemSettings" xml:space="preserve">
<value>Use system settings</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Reflection;
using DevToys.Blazor.Core.Languages;
using DevToys.Core;
using DevToys.Core.Logging;
using DevToys.Core.Settings;

namespace DevToys.Blazor.BuiltInTools.Settings;
Expand All @@ -26,6 +27,7 @@ internal sealed class SettingsGuiTool : IGuiTool
private readonly ISettingsProvider _settingsProvider;
private readonly IClipboard _clipboard;
private readonly IFontProvider _fontProvider;
private readonly IFileStorage _fileStorage;
private readonly IUIDropDownListItem[] _availableLanguages;
private readonly IUIDropDownListItem _currentLanguage;
private readonly IUIDropDownListItem[] _availableFonts;
Expand All @@ -35,11 +37,16 @@ internal sealed class SettingsGuiTool : IGuiTool
private readonly string _previewJsonText;

[ImportingConstructor]
public SettingsGuiTool(ISettingsProvider settingsProvider, IFontProvider fontProvider, IClipboard clipboard)
public SettingsGuiTool(
ISettingsProvider settingsProvider,
IFontProvider fontProvider,
IClipboard clipboard,
IFileStorage fileStorage)
{
_settingsProvider = settingsProvider;
_fontProvider = fontProvider;
_clipboard = clipboard;
_fileStorage = fileStorage;

// Load available languages and current language.
(IUIDropDownListItem[] availableLanguagesItems, IUIDropDownListItem currentLanguageItem) = LoadLanguages();
Expand Down Expand Up @@ -245,7 +252,47 @@ public UIToolView View
.HyperlinkAppearance()
.AlignHorizontally(UIHorizontalAlignment.Left)
.Text(string.Format(Settings.DevToysMac, "ObuchiYuki"))
.OnClick(OnDevToysMacAuthorButtonClick))))));
.OnClick(OnDevToysMacAuthorButtonClick))),

SettingGroup("useful-links-settings")
.Icon("FluentSystemIcons", '\uF4E4')
.Title(Settings.UsefulLinks)
.WithChildren(

Wrap()
.WithChildren(
Button("link-source-code")
.HyperlinkAppearance()
.Text(Settings.UsefulLinksSourceCode)
.OnClick(OnSourceCodeButtonClick),

Button("link-privacy-policy")
.HyperlinkAppearance()
.Text(Settings.UsefulLinksPrivacyPolicy)
.OnClick(OnPrivacyPolicyButtonClick),

Button("link-license")
.HyperlinkAppearance()
.Text(Settings.UsefulLinksLicense)
.OnClick(OnLicenseButtonClick),

Button("link-third-party-license")
.HyperlinkAppearance()
.Text(Settings.UsefulLinksThirdPartyLicenses)
.OnClick(OnThirdPartyLicenseButtonClick),

Button("link-report-a-problem")
.HyperlinkAppearance()
.Text(Settings.UsefulLinksReportProblem)
.OnClick(OnReportProblemButtonClick))),

Setting("logs-settings")
.Icon("FluentSystemIcons", '\uE4F0')
.Title(Settings.OpenLogs)
.InteractiveElement(
Button("open-logs")
.Icon("FluentSystemIcons", '\uF418')
.OnClick(OnOpenLogsButtonClick)))));

public void OnDataReceived(string dataTypeName, object? parsedData)
{
Expand Down Expand Up @@ -371,4 +418,35 @@ private void OnDevToysMacAuthorButtonClick()
{
OSHelper.OpenFileInShell("https://twitter.com/obuchi_yuki");
}

private void OnSourceCodeButtonClick()
{
OSHelper.OpenFileInShell("https://github.com/DevToys-app/DevToys");
}

private void OnPrivacyPolicyButtonClick()
{
OSHelper.OpenFileInShell("https://github.com/DevToys-app/DevToys/blob/main/PRIVACY-POLICY.md");
}

private void OnLicenseButtonClick()
{
OSHelper.OpenFileInShell("https://github.com/DevToys-app/DevToys/blob/main/LICENSE.md");
}

private void OnThirdPartyLicenseButtonClick()
{
OSHelper.OpenFileInShell("https://github.com/DevToys-app/DevToys/blob/main/THIRD-PARTY-NOTICES.md");
}

private void OnReportProblemButtonClick()
{
OSHelper.OpenFileInShell("https://github.com/DevToys-app/DevToys/issues");
}

private void OnOpenLogsButtonClick()
{
string logsFolder = Path.Combine(_fileStorage.AppCacheDirectory, FileLoggerProvider.LogFolderName);
OSHelper.OpenFileInShell(logsFolder);
}
}
2 changes: 1 addition & 1 deletion src/app/dev/DevToys.Blazor/wwwroot/css/devtoys.g.css

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions src/app/dev/DevToys.Business/ViewModels/ToolPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ internal void Load(GuiToolViewItem guiToolViewItem)
{
Guard.IsNotNull(guiToolViewItem);

// Add the tool to most recent ones.
_guiToolProvider.SetMostRecentUsedTool(guiToolViewItem.ToolInstance);
if (_guiToolViewItem != guiToolViewItem)
{
// Add the tool to most recent ones.
_guiToolProvider.SetMostRecentUsedTool(guiToolViewItem.ToolInstance);

_guiToolViewItem = guiToolViewItem;
_guiToolViewItem = guiToolViewItem;

HeaderText = guiToolViewItem.ToolInstance.LongOrShortDisplayTitle;
HeaderText = guiToolViewItem.ToolInstance.LongOrShortDisplayTitle;
}
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/app/dev/DevToys.Core/Logging/FileLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
namespace DevToys.Core.Logging;

[ProviderAlias("File")]
internal sealed class FileLoggerProvider : ILoggerProvider
public sealed class FileLoggerProvider : ILoggerProvider
{
private const string LogFolderName = "Logs";
public const string LogFolderName = "Logs";

private readonly ConcurrentDictionary<string, FileLogger> _loggers = new();
private readonly BlockingCollection<string> _entryQueue = new(1024);
Expand Down
Loading

0 comments on commit 635d993

Please sign in to comment.