Skip to content

Commit

Permalink
v2.5.0 (#58)
Browse files Browse the repository at this point in the history
* Fix session restoring crash

* Fix syntax loading crash

* fix: need to double close skeditor with session restore

* update libs

* fix: code parser yml crash and wrong section end

* Add real-time code parsing experiment

* fix: syntax crash

* Added proper indentation pasting (#43)

* Added proper indentation pasting (#16)

* Added config option for paste indent + reworked bindings for settings

* Change auto-indent paste option order in the settings

* correct auto-indent option translation

* Bump version to v2.5.0

* First push

* supports for SkUnity as provider
added basic search form
added search validation for a provider
added timeout system when sending the request to the provider
first appearance of SkriptHub provider (will be next)

* Added supports for SkriptHub

* ✨ Added Connections page (and regrouped SkUnity key there)

* Custom provider keys system

* ✨ Added loading bar & warning when >= 100 results

* ✨ Added examples endpoints

* ✨ Added example and example fetching for some providers

* ✨ Added 'Classe' type and fixed doc type parsing

* ✨ Added a useful message for too many results/nothing found/etc...

* ✨ Added auto complete box for addons

* ✨ Added local docs provider (= download docs for offline use)

* ⚡ Enhanced usage of examples to give the whole object instead of just the ID

* ✨ (Theoretically) Added SkriptMC docs provider

* ✨ Moved publish's API keys to the new Connections settings page

* ✨ Added event-values & expression changers (+ pattern generator for changers)

* 🐛 Fixed error when no examples were available

* ⚡ Enhanced connections page using sub-controls

* 🐛 Fixed empty changers showing blank buttons

* 📝 Review changes

* Add connection providers svg icon support, cleanup

* ✨ Added local docs management window
✨ Added button to refresh providers
⚡ Added FluentIcons to SkEditor & enhanced element's icons

* ⚡ A Lot of cleanup (Notro will be happy now XD)

* ⚡ Replaced ivon of doc management entry by a text

* ⚡ Replaced icon from Avalonia to FluentIcons

* 🐛 Fixed wrong size of the delete button

* Fix experiments settings page title, change warning

* Remove code unparsed info from the code parser

* ✨ Added much better download buttons for doc elements

* ✨ Added bunch-download for elements

* ⚡ Fixed doc provider type in the local doc manager

* ✨ Added lang to the new documentation system

* change selection color in documentation editors

* ✨ Added colors to doc entry's icon + better addon badge color/link

* Make loading addons a little bit faster

* make loading addons a little bit faster

* Move doc pattern syntax logic to its own class

* cleanup

* Refactor GetTypeIcon method

* update libs

---------

Co-authored-by: Sky <[email protected]>
Co-authored-by: Sky <[email protected]>
  • Loading branch information
3 people authored May 25, 2024
1 parent 564cdfd commit 57afd43
Show file tree
Hide file tree
Showing 78 changed files with 3,033 additions and 164 deletions.
2 changes: 1 addition & 1 deletion Installer/Package.wxs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="SkEditor" Manufacturer="Notro" Version="2.4.1" UpgradeCode="14564974-da58-4917-8a0d-590043f589c2">
<Package Name="SkEditor" Manufacturer="Notro" Version="2.5.0" UpgradeCode="14564974-da58-4917-8a0d-590043f589c2">
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
<MediaTemplate EmbedCab="yes" />

Expand Down
34 changes: 25 additions & 9 deletions SkEditor/API/AddonLoader.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using Avalonia.Threading;
using Serilog;
using SkEditor.Utilities;
using SkEditor.Views;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

namespace SkEditor.API;
public class AddonLoader
Expand Down Expand Up @@ -87,19 +90,32 @@ private static void EnableAddons()
{
try
{
AppDomain.CurrentDomain.GetAssemblies()
var addonTypes = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(s => s.GetTypes())
.Where(p => typeof(IAddon).IsAssignableFrom(p) && p.IsClass && !p.IsAbstract)
.Select(addonType => (IAddon)Activator.CreateInstance(addonType))
.ToList()
.ForEach(addon =>
.ToList();

var addons = new ConcurrentBag<IAddon>();

Parallel.ForEach(addonTypes, addonType =>
{
try
{
Addons.Add(addon);
addon.OnEnable();
});
var addon = (IAddon)Activator.CreateInstance(addonType);
addons.Add(addon);
Dispatcher.UIThread.InvokeAsync(() => addon.OnEnable());
}
catch (Exception ex)
{
Log.Error(ex, $"Failed to initialize addon {addonType.Name}");
}
});

Addons.AddRange(addons);

ApiVault.Get().GetAppConfig().AddonsToDelete.Clear();
ApiVault.Get().GetAppConfig().AddonsToUpdate.Clear();
var apiVault = ApiVault.Get();
apiVault.GetAppConfig().AddonsToDelete.Clear();
apiVault.GetAppConfig().AddonsToUpdate.Clear();
}
catch (Exception ex)
{
Expand Down
1 change: 1 addition & 0 deletions SkEditor/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ResourceInclude Source="avares://SkEditor/Styles/CustomMenuItemStyle.axaml" />
<ResourceInclude Source="avares://SkEditor/Styles/ToggleSwitchStyle.axaml" />
<ResourceInclude Source="avares://SkEditor/Assets/Icons.axaml" />
<ResourceInclude Source="avares://SkEditor/Assets/ThemeColors.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

Expand Down
10 changes: 10 additions & 0 deletions SkEditor/Assets/Brands/Pastebin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions SkEditor/Assets/Brands/SkriptHub.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SkEditor/Assets/Brands/SkriptMC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions SkEditor/Assets/Brands/skUnity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions SkEditor/Assets/Brands/skriptpl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions SkEditor/Assets/Icons.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<ui:PathIconSource x:Key="LeftIcon" Data="M10.295 19.716a1 1 0 0 0 1.404-1.425l-5.37-5.29h13.67a1 1 0 1 0 0-2H6.336L11.7 5.714a1 1 0 0 0-1.404-1.424l-6.924 6.822a1.25 1.25 0 0 0 0 1.78l6.924 6.823Z"/>
<ui:PathIconSource x:Key="DocumentMultipleIcon" Data="M4 4.25A2.25 2.25 0 0 1 6.25 2h4.381a2.25 2.25 0 0 1 1.591.659l4.619 4.619c.422.422.659.994.659 1.59v8.382a2.25 2.25 0 0 1-2.25 2.25h-9A2.25 2.25 0 0 1 4 17.25v-13Zm2.25-.75a.75.75 0 0 0-.75.75v13c0 .414.336.75.75.75h9a.75.75 0 0 0 .75-.75V8.998h-3.246a2.25 2.25 0 0 1-2.25-2.25V3.5H6.25Zm5.754 1.062v2.186c0 .414.336.75.75.75h2.185l-2.935-2.936ZM6.629 20.5A2.25 2.25 0 0 0 8.75 22h6.5A4.75 4.75 0 0 0 20 17.25v-5.881a2.25 2.25 0 0 0-.66-1.591l-.84-.841v8.313a3.25 3.25 0 0 1-3.25 3.25H6.629Z"/>
<ui:PathIconSource x:Key="SessionRestoringIcon" Data="M12 4.5a7.5 7.5 0 1 1-7.419 6.392c.067-.454-.265-.892-.724-.892a.749.749 0 0 0-.752.623A9 9 0 1 0 6 5.292V4.25a.75.75 0 0 0-1.5 0v3c0 .414.336.75.75.75h3a.75.75 0 0 0 0-1.5H6.9a7.473 7.473 0 0 1 5.1-2Z"/>
<ui:PathIconSource x:Key="ConnectionsIcon" Data="M9.25 7a.75.75 0 0 1 .11 1.492l-.11.008H7a3.5 3.5 0 0 0-.206 6.994L7 15.5h2.25a.75.75 0 0 1 .11 1.492L9.25 17H7a5 5 0 0 1-.25-9.994L7 7h2.25ZM17 7a5 5 0 0 1 .25 9.994L17 17h-2.25a.75.75 0 0 1-.11-1.492l.11-.008H17a3.5 3.5 0 0 0 .206-6.994L17 8.5h-2.25a.75.75 0 0 1-.11-1.492L14.75 7H17ZM7 11.25h10a.75.75 0 0 1 .102 1.493L17 12.75H7a.75.75 0 0 1-.102-1.493L7 11.25h10H7Z"/>


<ui:SymbolIconSource x:Key="RefreshIcon" Symbol="Refresh"/>
Expand Down
Loading

0 comments on commit 57afd43

Please sign in to comment.