Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.
C# audio-converteravaloniabatch-conversionconvertercsharpdocument-converterdocx-to-pdfdotnetdrag-and-dropfile-conversionfile-converterheic-converterhwphwpximage-converterlinuxmacospdf-convertervideo-converterwindows
Point users to GitHub for a star or feedback
KnifeLemon8c9ca5ff77f1
diff --git a/Directory.Build.props b/Directory.Build.propsindex 69950bf3..c49ec17b 100644--- a/Directory.Build.props+++ b/Directory.Build.props@@ -14,7 +14,7 @@parameters of a member is fine (CS1573). --><NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>- <Version>1.2.0</Version>+ <Version>1.2.1</Version><Product>Filee</Product><Authors>Filee contributors</Authors><Copyright>Copyright (c) Filee contributors</Copyright>diff --git a/src/Filee.App/App.axaml.cs b/src/Filee.App/App.axaml.csindex 45824762..121806a9 100644--- a/src/Filee.App/App.axaml.cs+++ b/src/Filee.App/App.axaml.cs@@ -61,6 +61,7 @@ public partial class App : ApplicationAppHost.Get<TrayService>().Create(this);AppHost.Get<WindowService>().EnsureToast();+ AppHost.Get<ConversionService>().FeedbackDue += (_, _) => AppHost.Get<WindowService>().ShowFeedbackNotice();// Once LibreOffice is installed: prepare its profiles while the user isn't converting yet.AppHost.Get<EngineDownloadService>().WarmUpInBackground(TimeSpan.FromSeconds(10));diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.jsonindex c0f38854..1533acc1 100644--- a/src/Filee.App/Assets/i18n/en.json+++ b/src/Filee.App/Assets/i18n/en.json@@ -355,6 +355,12 @@"about.license": "Filee is free software under the MIT license.","about.notices": "Third-party notices","about.github": "GitHub repository",+ "about.support_title": "Help Filee grow",+ "about.support_text": "Filee is free and open source. A star on GitHub, a bug report or a feature idea all help it get better and reach more people.",+ "feedback.notice_title": "Is Filee helping you?",+ "feedback.notice_text": "A star on GitHub helps other people find Filee. Problems and ideas are welcome too.",+ "feedback.star": "Star on GitHub",+ "feedback.issue": "Report a problem or idea","common.ok": "OK","common.cancel": "Cancel",diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.jsonindex 1498403e..1e2c7d12 100644--- a/src/Filee.App/Assets/i18n/ko.json+++ b/src/Filee.App/Assets/i18n/ko.json@@ -355,6 +355,12 @@"about.license": "Filee는 MIT 라이선스의 무료 소프트웨어입니다.","about.notices": "서드파티 고지","about.github": "GitHub 저장소",+ "about.support_title": "Filee 응원하기",+ "about.support_text": "Filee는 무료 오픈소스예요. GitHub 별, 버그 신고, 기능 제안 모두 Filee가 나아지고 더 많은 분께 알려지는 데 큰 힘이 돼요.",+ "feedback.notice_title": "Filee가 도움이 되고 있나요?",+ "feedback.notice_text": "GitHub에 별(⭐)을 남겨 주시면 다른 분들이 Filee를 찾는 데 큰 도움이 돼요. 불편한 점이나 원하는 기능도 알려 주세요.",+ "feedback.star": "GitHub에서 별 주기",+ "feedback.issue": "문제 신고 · 기능 제안","common.ok": "확인","common.cancel": "취소",diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.jsonindex 7f98ba8b..b2f3ec2d 100644--- a/src/Filee.App/Assets/i18n/zh-CN.json+++ b/src/Filee.App/Assets/i18n/zh-CN.json@@ -355,6 +355,12 @@"about.license": "Filee 是基于 MIT 许可证的免费软件。","about.notices": "第三方声明","about.github": "GitHub 仓库",+ "about.support_title": "支持 Filee",+ "about.support_text": "Filee 免费开源。在 GitHub 上点星、报告错误或提出功能建议,都能帮助它变得更好、让更多人知道。",+ "feedback.notice_title": "Filee 对你有帮助吗?",+ "feedback.notice_text": "在 GitHub 上点个星(⭐)能帮助更多人发现 Filee。也欢迎反馈问题或提出想法。",+ "feedback.star": "在 GitHub 上点星",+ "feedback.issue": "报告问题 · 提出建议","common.ok": "确定","common.cancel": "取消",diff --git a/src/Filee.App/Services/ConversionService.cs b/src/Filee.App/Services/ConversionService.csindex 30d89207..40bb504d 100644--- a/src/Filee.App/Services/ConversionService.cs+++ b/src/Filee.App/Services/ConversionService.cs@@ -19,6 +19,9 @@ public sealed class ConversionServiceprivate static readonly TimeSpan KeepSuccess = TimeSpan.FromSeconds(5);private static readonly TimeSpan KeepErrors = TimeSpan.FromSeconds(15);+ /// <summary>After this many fully successful conversions Filee asks once for a star or feedback.</summary>+ public const int FeedbackAfterConversions = 3;+private readonly JobQueue _queue;private readonly UserDataStore _store;private readonly ILocalizer _loc;@@ -41,6 +44,12 @@ public sealed class ConversionService/// <summary>The subset shown in the toast window. UI thread only.</summary>public ObservableCollection<JobViewModel> ToastJobs { get; } = [];+ /// <summary>+ /// Raised once (UI thread) when the user has had a few successful conversions and the toast has gone: time to+ /// ask for a GitHub star or feedback.+ /// </summary>+ public event EventHandler? FeedbackDue;+/// <summary>Starts converting files with a preset.</summary>/// <param name="files">Source files.</param>/// <param name="preset">Preset to apply.</param>@@ -83,9 +92,23 @@ public sealed class ConversionServicevm.Refresh();var keep = vm.HasErrors ? KeepErrors : KeepSuccess;DispatcherTimer.RunOnce(() => Remove(vm), keep);+ if (!vm.HasErrors && CountSuccess(job))+ DispatcherTimer.RunOnce(() => FeedbackDue?.Invoke(this, EventArgs.Empty), keep + TimeSpan.FromSeconds(1));});}+ /// <summary>Counts a fully successful conversion; true when the feedback card is due now (only once).</summary>+ private bool CountSuccess(ConversionJob job)+ {+ var settings = _store.Settings;+ if (settings.FeedbackPromptShown || job.Files.Count == 0 || job.Files.Any(f => f.State != FileState.Done))+ return false;+ settings.SuccessfulConversions++;+ settings.FeedbackPromptShown = settings.SuccessfulConversions >= FeedbackAfterConversions;+ _store.SaveSettings();+ return settings.FeedbackPromptShown;+ }+private void Remove(JobViewModel vm){Jobs.Remove(vm);diff --git a/src/Filee.App/Services/UpdateService.cs b/src/Filee.App/Services/UpdateService.csindex bf930b79..02844285 100644--- a/src/Filee.App/Services/UpdateService.cs+++ b/src/Filee.App/Services/UpdateService.cs@@ -38,6 +38,9 @@ public sealed partial class UpdateService : ObservableObjecttypeof(UpdateService).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion.Split('+')[0]?? typeof(UpdateService).Assembly.GetName().Version?.ToString(3) ?? "0.0.0";+ /// <summary>GitHub's "new issue" page (bug report or feature request template).</summary>+ public static string NewIssueUrl => RepositoryUrl.TrimEnd('/') + "/issues/new/choose";+/// <summary>Page with the newest installer.</summary>public static string LatestReleaseUrl => RepositoryUrl.TrimEnd('/') + "/releases/latest";diff --git a/src/Filee.App/Services/WindowService.cs b/src/Filee.App/Services/WindowService.csindex eb7efc67..8fd5734d 100644--- a/src/Filee.App/Services/WindowService.cs+++ b/src/Filee.App/Services/WindowService.cs@@ -19,6 +19,7 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services)private ToastWindow? _toast;private EngineSetupWindow? _engineSetup;private UpdateNoticeWindow? _updateNotice;+ private FeedbackNoticeWindow? _feedbackNotice;public MainWindow? Main => _main;@@ -87,6 +88,16 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services)notice.Show();}+ /// <summary>Shows the one-time "Is Filee helping you?" card in the bottom-right corner.</summary>+ public void ShowFeedbackNotice()+ {+ if (_feedbackNotice is not null)+ return;+ _feedbackNotice = new FeedbackNoticeWindow();+ _feedbackNotice.Closed += (_, _) => _feedbackNotice = null;+ _feedbackNotice.Show();+ }+/// <summary>Opens the preset popup. Returns true when the user saved (the preset object was updated).</summary>public async Task<bool> EditPresetAsync(Preset preset, Window? owner){diff --git a/src/Filee.App/Views/FeedbackNoticeWindow.axaml b/src/Filee.App/Views/FeedbackNoticeWindow.axamlnew file mode 100644index 00000000..d85fab38--- /dev/null+++ b/src/Filee.App/Views/FeedbackNoticeWindow.axaml@@ -0,0 +1,36 @@+<!-- "Is Filee helping you?" card in the bottom-right corner, shown once after a few successful conversions+ (ConversionService.FeedbackDue): a star or an issue on GitHub. -->+<Window xmlns="https://github.com/avaloniaui"+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"+ x:Class="Filee.App.Views.FeedbackNoticeWindow"+ Title="Filee"+ Width="360"+ SizeToContent="Height"+ WindowDecorations="None"+ Background="Transparent"+ TransparencyLevelHint="Transparent"+ Topmost="True"+ ShowInTaskbar="False"+ ShowActivated="False"+ CanResize="False">+ <Border Classes="card" Margin="12" Padding="16,14">+ <DockPanel>+ <Image DockPanel.Dock="Left" Source="avares://Filee/Assets/Icons/filee.png" Width="36" Height="36"+ VerticalAlignment="Top" Margin="0,2,12,0" />+ <StackPanel Spacing="8">+ <DockPanel>+ <Button DockPanel.Dock="Right" Classes="icon" Padding="4" VerticalAlignment="Top" Click="OnClose">+ <PathIcon Width="12" Height="12" Data="{StaticResource Icon.Close}" />+ </Button>+ <TextBlock FontWeight="SemiBold" TextWrapping="Wrap" VerticalAlignment="Center"+ Text="{DynamicResource feedback.notice_title}" />+ </DockPanel>+ <TextBlock Classes="caption" Text="{DynamicResource feedback.notice_text}" TextWrapping="Wrap" />+ <WrapPanel Margin="0,2,0,0">+ <Button Classes="accent" Click="OnStar" Padding="12,5" Margin="0,0,8,6" Content="{DynamicResource feedback.star}" />+ <Button Click="OnIssue" Padding="12,5" Margin="0,0,8,6" Content="{DynamicResource feedback.issue}" />+ </WrapPanel>+ </StackPanel>+ </DockPanel>+ </Border>+</Window>diff --git a/src/Filee.App/Views/FeedbackNoticeWindow.axaml.cs b/src/Filee.App/Views/FeedbackNoticeWindow.axaml.csnew file mode 100644index 00000000..dfe1a072--- /dev/null+++ b/src/Filee.App/Views/FeedbackNoticeWindow.axaml.cs@@ -0,0 +1,44 @@+using Avalonia;+using Avalonia.Controls;+using Avalonia.Interactivity;+using Filee.App.Services;++namespace Filee.App.Views;++/// <summary>Bottom-right card asking once for a GitHub star or feedback. Both buttons open the browser.</summary>+public partial class FeedbackNoticeWindow : Window+{+ private const int ScreenMargin = 12;++ public FeedbackNoticeWindow()+ {+ InitializeComponent();+ Motion.Track(this);+ SizeChanged += (_, _) => PlaceBottomRight();+ }++ private async void OnStar(object? sender, RoutedEventArgs e)+ {+ await Launcher.LaunchUriAsync(new Uri(UpdateService.RepositoryUrl));+ Close();+ }++ private async void OnIssue(object? sender, RoutedEventArgs e)+ {+ await Launcher.LaunchUriAsync(new Uri(UpdateService.NewIssueUrl));+ Close();+ }++ private void OnClose(object? sender, RoutedEventArgs e) => Close();++ private void PlaceBottomRight()+ {+ var screen = Screens.Primary;+ if (screen is null)+ return;+ var area = screen.WorkingArea;+ var width = (int)Math.Ceiling(Bounds.Width * screen.Scaling);+ var height = (int)Math.Ceiling(Bounds.Height * screen.Scaling);+ Position = new PixelPoint(area.Right - width - ScreenMargin, area.Bottom - height - ScreenMargin);+ }+}diff --git a/src/Filee.App/Views/Pages/AboutPage.axaml b/src/Filee.App/Views/Pages/AboutPage.axamlindex 32bc2168..e8a36418 100644--- a/src/Filee.App/Views/Pages/AboutPage.axaml+++ b/src/Filee.App/Views/Pages/AboutPage.axaml@@ -22,6 +22,16 @@</StackPanel></StackPanel></Border>+ <Border Classes="card">+ <StackPanel Spacing="10">+ <TextBlock Classes="h2" Text="{DynamicResource about.support_title}" />+ <TextBlock Classes="muted" TextWrapping="Wrap" Text="{DynamicResource about.support_text}" />+ <WrapPanel>+ <Button Classes="accent" Click="OnStar" Margin="0,0,8,0" Content="{DynamicResource feedback.star}" />+ <Button Click="OnIssue" Content="{DynamicResource feedback.issue}" />+ </WrapPanel>+ </StackPanel>+ </Border><Border Classes="card"><StackPanel Spacing="8"><TextBlock Classes="h2" Text="{DynamicResource about.notices}" />diff --git a/src/Filee.App/Views/Pages/AboutPage.axaml.cs b/src/Filee.App/Views/Pages/AboutPage.axaml.csindex 4413b5d7..37603044 100644--- a/src/Filee.App/Views/Pages/AboutPage.axaml.cs+++ b/src/Filee.App/Views/Pages/AboutPage.axaml.cs@@ -13,4 +13,13 @@ public partial class AboutPage : UserControlif (DataContext is AboutPageViewModel vm && TopLevel.GetTopLevel(this) is { } top)await top.Launcher.LaunchUriAsync(new Uri(vm.RepositoryUrl));}++ // A star is given on the repository page itself.+ private void OnStar(object? sender, RoutedEventArgs e) => OnOpenRepository(sender, e);++ private async void OnIssue(object? sender, RoutedEventArgs e)+ {+ if (TopLevel.GetTopLevel(this) is { } top)+ await top.Launcher.LaunchUriAsync(new Uri(Services.UpdateService.NewIssueUrl));+ }}diff --git a/src/Filee.Core/Settings/AppSettings.cs b/src/Filee.Core/Settings/AppSettings.csindex b794b560..0f21840f 100644--- a/src/Filee.Core/Settings/AppSettings.cs+++ b/src/Filee.Core/Settings/AppSettings.cs@@ -87,4 +87,10 @@ public sealed class AppSettings/// <summary>Set once the first-run welcome has been shown.</summary>public bool FirstRunCompleted { get; set; }++ /// <summary>Conversions that succeeded completely, counted until the feedback card has been shown.</summary>+ public int SuccessfulConversions { get; set; }++ /// <summary>Set once the "Is Filee helping you?" card (GitHub star / feedback) has been shown.</summary>+ public bool FeedbackPromptShown { get; set; }}diff --git a/tests/Filee.App.Tests/RenderTests.cs b/tests/Filee.App.Tests/RenderTests.csindex 7e3d8d30..149f0422 100644--- a/tests/Filee.App.Tests/RenderTests.cs+++ b/tests/Filee.App.Tests/RenderTests.cs@@ -192,6 +192,12 @@ public class RenderTestsPump();Save(notice, $"update-notice-{language}.png");notice.Close();++ var feedback = new FeedbackNoticeWindow();+ feedback.Show();+ Pump();+ Save(feedback, $"feedback-notice-{language}.png");+ feedback.Close();}finally{