Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI rework - very WIP, don't merge yet! #2545

Draft
wants to merge 186 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
3cdbfe4
Replace the font with Atkinson Hyperlegible, make it consistent every…
tr4wzified Nov 18, 2023
1222280
Rework main menu UI
tr4wzified Nov 26, 2023
f7482b3
MainWindow icon fixes
tr4wzified Nov 26, 2023
61b2ce6
Adjust LinksView & hovering colors
tr4wzified Nov 28, 2023
8af7cda
Fix wiki link on LinksView
tr4wzified Nov 28, 2023
8dfc7a0
Change some icons, improve hover animation to fill icons
tr4wzified Nov 29, 2023
590a6e2
Re-organize MainWindow for upcoming sidemenu, WIP
tr4wzified Dec 4, 2023
85ed8cd
Complete home screen
tr4wzified Dec 16, 2023
c7364d6
First attempts at creating navigation bar, buttons not binding proper…
tr4wzified Dec 16, 2023
62edef8
Experimenting to try and get the commands to bind correctly
tr4wzified Dec 16, 2023
e423361
Fix up NavigationVM not binding to NavigationView, fill icons on hover
tr4wzified Dec 17, 2023
240e643
Finish NavigationView
tr4wzified Dec 17, 2023
e330140
Rename View_Models to ViewModels, busy restructuring NavigationItems
tr4wzified Dec 23, 2023
f77b29e
Add active navigation bar color
tr4wzified Dec 23, 2023
b5b3d9c
Remove unnecessary garbage comments
tr4wzified Dec 23, 2023
0baba1b
Fix pressed button color being a weird grey
tr4wzified Dec 26, 2023
e6b746a
Start modifying gallery, add icons to game filter listbox
tr4wzified Dec 27, 2023
153a07e
Update some icons with custom made ones
tr4wzified Dec 27, 2023
11fc459
Use rounded corners on game images
tr4wzified Dec 27, 2023
25a77ab
Adjust margin & icon sizes
tr4wzified Dec 27, 2023
43c01e1
Add watermark to UI search field
tr4wzified Dec 27, 2023
9c7d0d8
Fix being able to type through the search icon
tr4wzified Dec 27, 2023
d361753
Improve search responsiveness with a throttle
tr4wzified Dec 27, 2023
9636729
Change Skyrim VR icon, fix up checkmarks and more filter styling
tr4wzified Dec 27, 2023
d73f007
Update VR icon
tr4wzified Dec 27, 2023
0be1081
Implement improved sorting on list title
tr4wzified Dec 28, 2023
1c609a3
Fix WebP images not loading on Windows installations without WebP ext…
tr4wzified Dec 28, 2023
fb47b2a
Fix not including libwebp binaries into resources
tr4wzified Dec 28, 2023
8275c71
Get normal version of image instead of thumbnails for WebP
tr4wzified Dec 28, 2023
b965689
Show 3 tiles next to each other by default, styling tweakings
tr4wzified Dec 29, 2023
31dea8a
Tweak scroll bar colors
tr4wzified Dec 29, 2023
ddef1dc
Apply rounded borders to modlist gallery images
tr4wzified Dec 29, 2023
f919e14
Add basic game icon + title to modlist tile
tr4wzified Dec 29, 2023
645222e
Remove button from maintenance view, use hover instead
tr4wzified Dec 29, 2023
566b1bd
Only show game icon & title on hover (but respecting ImageContainsTitle)
tr4wzified Dec 29, 2023
d2158c0
Improve WebP handling to fix edge cases & Nexus links
tr4wzified Dec 30, 2023
601ee7e
Download small image from WJ cdn instead of getting it directly from …
tr4wzified Dec 30, 2023
a908c49
Fix potential modlists loading crash on slow connections
tr4wzified Dec 30, 2023
95ff0da
Implement basic total modlist size filter
tr4wzified Dec 30, 2023
58d0fdc
Fix size slider not working correctly with rounding
tr4wzified Dec 30, 2023
ea59cd2
Rename MinSizeFilter, MaxSizeFilter to MinModlistSize, MaxModlistSize
tr4wzified Dec 31, 2023
21678ff
Rename MinSizeModlist, MaxSizeModlist to SmallestSizedModlist, Larges…
tr4wzified Dec 31, 2023
c29bace
Fix left-over causing compilation issues
tr4wzified Dec 31, 2023
2221ad4
Refactor a little more of the modlist size slider
tr4wzified Dec 31, 2023
dd7e25f
Tweak coloring, position search icon on the same x as dropdown icon
tr4wzified Jan 9, 2024
3a88748
Fix binding on modlist size to work two-way so slider doesn't start a…
tr4wzified Feb 3, 2024
9537306
Clean up some watermark styling, start work on CompilerView
tr4wzified Feb 4, 2024
1dd4a64
Compiler screen order changes
tr4wzified Apr 27, 2024
ee08659
Add (WIP) CreateModListView, other miscellaneous changes
tr4wzified Apr 27, 2024
e2106a0
Save list of compiled modlists, show them in CreateModListView
tr4wzified Apr 28, 2024
1e61bca
Actually make the recently compiled modlists section work, overhaul c…
tr4wzified May 4, 2024
836f102
Rework how compiler settings are saved & loaded
tr4wzified May 4, 2024
ce72a6e
Miscellaneous fixes for not saving and loading modlists correctly
tr4wzified May 5, 2024
7d20631
Fix up the load modlist button
tr4wzified May 9, 2024
2c2ce89
Refactor some names to (hopefully) make more sense
tr4wzified May 19, 2024
9af6e8a
Add boilerplate for starting on compiler file manager
tr4wzified May 21, 2024
a4df166
Add loading of modlist folders & files, still very slow
tr4wzified May 25, 2024
a37fc2a
Load folder contents on expand instead of initially for much increase…
tr4wzified May 25, 2024
24fc979
Fix up styling, naming header and show icons
tr4wzified May 25, 2024
0479c3f
Add more file icons
tr4wzified May 26, 2024
59b1676
Specified more icons for file types
tr4wzified May 26, 2024
2937dce
Add slightly unoptimized way of determining compiler state per path
tr4wzified May 29, 2024
f5c9e07
Add interactive CompilerFileState setting combo box to compiler file …
tr4wzified Jun 8, 2024
741276a
First steps toward highlighting folders and files with special states
tr4wzified Jun 8, 2024
2556c54
Refactor FileTreeViewItem to actually be reactive
tr4wzified Jun 9, 2024
be0c4b7
Swap title & author textbox on CompilerDetails, work on CompilerFileM…
tr4wzified Jun 24, 2024
3cc9cf9
Merge main branch into UI
tr4wzified Jun 24, 2024
30ab06a
Save CompilerFileState changes in file manager to disk, create base c…
tr4wzified Jun 24, 2024
da08c86
Test if file browser works without these changes
tr4wzified Sep 11, 2024
8fbe1d0
Fix up modlist location path not being automatically set after going …
tr4wzified Sep 11, 2024
3d5b332
Add info screen, spice up the buttons with icons
tr4wzified Sep 12, 2024
7775f9d
Touch up the info view a bit
tr4wzified Sep 12, 2024
6c4beb4
Tweak checkboxes & margins
tr4wzified Sep 13, 2024
09bfdb8
Remove useless usings & adjust all namespaces to new C# format
tr4wzified Sep 14, 2024
61e546a
Fix up file tree items so that contains <state> is trackable
tr4wzified Sep 14, 2024
528c3da
Fix up styles for various folder contains <state> possibilities
tr4wzified Sep 14, 2024
7c6c055
Fix state styling not applying to the entire row, tweak colors for fo…
tr4wzified Sep 15, 2024
7ab1049
Touch up DetailImageView
tr4wzified Sep 16, 2024
96d1eda
Fix expander color not being in line with icons
tr4wzified Sep 16, 2024
5bd177a
Fix state contains booleans being set on files
tr4wzified Sep 16, 2024
fc7bb44
Add support for keeping active navigation button on multiple views
tr4wzified Sep 18, 2024
5db2763
Add final compiler screen template
tr4wzified Sep 19, 2024
1a378c4
Add log view to compiler main view
tr4wzified Sep 19, 2024
2097d12
Add long message back to ILogMessage
tr4wzified Sep 19, 2024
1aeec2b
Fix XAML errors
tr4wzified Sep 19, 2024
3a6a05b
Work on CompilerMainView further, add CpuView back, buttons and image…
tr4wzified Sep 20, 2024
c1884d3
Tweak button sizes & compiler screen layouts a bit, hook up compiler …
tr4wzified Sep 20, 2024
cb56f6c
Create custom WizardButton control for ease of use, improve button st…
tr4wzified Sep 21, 2024
6b876b4
Fix up new modlist button to actually create new compiler settings fr…
tr4wzified Sep 21, 2024
5180446
Further improvements to compiler screen
tr4wzified Sep 23, 2024
22acd7a
Implement cancel functionality when compiling
tr4wzified Sep 23, 2024
8c75157
Tweak sizes all around, in particular navigation and title bar
tr4wzified Sep 23, 2024
1976f82
Overhaul compiler screen
tr4wzified Sep 23, 2024
2410669
Fix FileTreeItems not being truncated
tr4wzified Sep 24, 2024
5d14cb6
Remove useless commented bit out of FileTreeViewItem style
tr4wzified Sep 24, 2024
da086d1
Change scroll bar to Crits design
tr4wzified Sep 24, 2024
623f486
Tweak file manager to be closer to mock-up
tr4wzified Sep 24, 2024
5cb0b9f
Tweak file picker button style
tr4wzified Sep 24, 2024
566fcb5
Add watermarks to the file pickers
tr4wzified Sep 24, 2024
266083a
Only show compiler file state listbox on non-default values and on hover
tr4wzified Sep 24, 2024
28f535a
Create CompilerMainView to merge all the compiler views into one
tr4wzified Sep 25, 2024
a8cefcd
Overhaul help button, tweak color names to make more sense
tr4wzified Sep 25, 2024
bfba489
Remove compiling view, merge into new CompilerMainView
tr4wzified Sep 26, 2024
46d2949
Make the compiling state screen work again
tr4wzified Sep 27, 2024
96281de
Undo debugging changes to WabbajackClientApi
tr4wzified Sep 27, 2024
81236f3
Fix up the compiler screen for completed state
tr4wzified Sep 27, 2024
1b0b949
Add special cancel danger button style
tr4wzified Sep 27, 2024
4541749
Add wizard progress bar at the top for compiler screen
tr4wzified Sep 28, 2024
30149ad
Dispose wizard progress bar bindings properly
tr4wzified Sep 28, 2024
7f7e287
Add progress percentage in text form to top wizard progress bar
tr4wzified Sep 29, 2024
1584529
Fix progress bars not resetting their width properly, hide progress p…
tr4wzified Sep 29, 2024
e004933
Add texture recompression setting to UI
tr4wzified Sep 29, 2024
b3b3dd3
Fix wrongly named texture recompression setting
tr4wzified Sep 29, 2024
6ba7a54
Add MO2 profile combobox
tr4wzified Sep 29, 2024
848923f
Fix settings not being synced up
tr4wzified Sep 29, 2024
f0f5044
Add control for additional profile selection
tr4wzified Sep 29, 2024
5670e4f
Remove useless commented bindings
tr4wzified Sep 29, 2024
d0c3995
WIP, work on home screen and various other styling
tr4wzified Sep 30, 2024
5f671eb
Finish up HomeView styling
tr4wzified Oct 13, 2024
b7f9739
Change Get Started height
tr4wzified Oct 13, 2024
551f962
Hide Navigation panel when compiling
tr4wzified Oct 15, 2024
4558e55
Remove useless binding I was experimenting with while adding the hide…
tr4wzified Oct 15, 2024
904558a
Add BigButton, fix up home view
tr4wzified Oct 19, 2024
d4cdad6
Fix commands breaking on the new big buttons, tweak compiler home vie…
tr4wzified Oct 19, 2024
e5945d2
Add the Wabbajack back into Wabbajack
tr4wzified Oct 19, 2024
5e8660e
Optimize some bits of the gallery, tweak skipping slide message
tr4wzified Oct 20, 2024
f348014
Tweak the gallery view a bit
tr4wzified Oct 20, 2024
045d834
Add gallery details view
tr4wzified Oct 20, 2024
3fb0ea9
Fix image scaling on ModlistDetailsView
tr4wzified Oct 21, 2024
a2e8cfc
Add basic in-app archive search
tr4wzified Oct 21, 2024
c4484f6
Make Nexus archive rows clickable
tr4wzified Oct 22, 2024
3d0ed7f
Add hand cursor when hovering over buttons
tr4wzified Oct 23, 2024
3007cc1
Only show featured checkmark on featured modlists, add tooltip explai…
tr4wzified Oct 23, 2024
248a698
Adjust wording on featured modlist tooltip
tr4wzified Oct 23, 2024
7947fe0
Add websiteURL support
tr4wzified Oct 23, 2024
c3fb40c
Disable link buttons when they're empty
tr4wzified Oct 24, 2024
3aafdfd
Various improvements to gallery speed & memory usage
tr4wzified Oct 26, 2024
3f93e89
Fix accidentally breaking featured lists
tr4wzified Oct 26, 2024
4f57c55
Reuse created BitmapImages with custom ImageCacheManager, fix gallery…
tr4wzified Oct 26, 2024
881cde6
Don't save searched string when returning to the gallery, make NSFW f…
tr4wzified Oct 26, 2024
bae9b45
Fix unofficial and NSFW toggle resetting incorrectly after re-enterin…
tr4wzified Oct 27, 2024
3bffb46
Fix reset filters command not working anymore, fix gallery being cut …
tr4wzified Oct 27, 2024
c1ca352
Add basic 'includes tag' filtering system
tr4wzified Oct 27, 2024
4b4d0bc
Tweak multi select listbox style
tr4wzified Nov 2, 2024
9399d99
Make the new tag filter work
tr4wzified Nov 2, 2024
2c39425
Fix tag filtering system so it works again
tr4wzified Nov 2, 2024
1106794
Fix tags filter still not working perfectly when using multiple tags
tr4wzified Nov 2, 2024
f8294f9
Prepare some stuff for gallery mod search
tr4wzified Nov 9, 2024
15c7ed7
Merge main into ui-gallerymodsearch
tr4wzified Nov 9, 2024
300d07f
Slightly alternative implementation of Luca's fix for getting accurat…
tr4wzified Nov 9, 2024
46cd28b
Use TryGetValue instead of ContainsKey
tr4wzified Nov 9, 2024
8313b17
Clean up the SearchIndex validation code I wrote last night a bit, ad…
tr4wzified Nov 9, 2024
70cb390
Merge branch 'main' into ui-gallerymodsearch
tr4wzified Nov 9, 2024
71529b9
Fix not renaming SearchIndex in Wabbajack Client
tr4wzified Nov 9, 2024
ecc7186
Add mod search to the gallery, clean up later
tr4wzified Nov 9, 2024
3234656
Remove extra ObservableCollection object for holding list of all mods
tr4wzified Nov 11, 2024
23c6cc1
Fix reset button, improve how tags/mods are bound to controls
tr4wzified Nov 11, 2024
b15bf85
Add readme tab to modlist details view
tr4wzified Nov 12, 2024
6bed7d5
Add floating window functionality, add it to modlist details view
tr4wzified Nov 16, 2024
fa4e907
Add open in browser button when in modlist details readme tab
tr4wzified Nov 16, 2024
8604bc6
Resize open in browser button to fit better
tr4wzified Nov 16, 2024
795f058
Allow for adjusting icon font size on wizard buttons
tr4wzified Nov 16, 2024
f3c0eb2
Add scroll viewer to modlist details for long descriptions, add text …
tr4wzified Nov 16, 2024
c84201b
Make only description scrollable, tweak toggle button styling
tr4wzified Nov 16, 2024
12b2f3f
Tweak scroll bar colors and size
tr4wzified Nov 17, 2024
626f01c
Add rounded corners to archives grid in modlist details
tr4wzified Nov 17, 2024
e635a1f
Add rounded corners to autocomplete listbox controls
tr4wzified Nov 17, 2024
cd67a51
Make ESC close floating windows, adjust button sizes
tr4wzified Nov 17, 2024
7921143
Fix load compiler settings button not working, fix compiled modlist t…
tr4wzified Nov 18, 2024
3af4462
Fix listbox color, add icons for BG3 and Starfield
tr4wzified Nov 18, 2024
a8be4f8
Merge main into ui
tr4wzified Nov 24, 2024
61722d4
Manual merge work
tr4wzified Nov 24, 2024
1efb4bf
Additional cleanup in CompilerMainVM
tr4wzified Nov 24, 2024
d94073e
Remove unused login lock
tr4wzified Nov 24, 2024
0085eb5
Rename WizardButton to WJButton since it's used everywhere now
tr4wzified Nov 24, 2024
a28991b
Refactor WizardButton into WJButton
tr4wzified Nov 24, 2024
591df81
Undo accidental removal of protected set, make download & install but…
tr4wzified Nov 24, 2024
90f148e
Add a progress bar when downloading modlist
tr4wzified Nov 26, 2024
670ad57
Add new progress bar when downloading modlist
tr4wzified Nov 26, 2024
deb695d
Start working on installation view, implement smart installation dire…
tr4wzified Nov 30, 2024
23888e6
Merge branches
tr4wzified Nov 30, 2024
7897371
Rename some viewmodels, don't use UI thread to determine installation…
tr4wzified Nov 30, 2024
8df2e9a
Don't automatically open readme on starting installation setup
tr4wzified Nov 30, 2024
fb65f7b
Adjust preferred drive to take modlist size into consideration
tr4wzified Nov 30, 2024
6b4c4a6
Fix abbreviations for longer list names not working anymore because t…
tr4wzified Nov 30, 2024
d01d899
Add download location picker, tweak install & download location descr…
tr4wzified Nov 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ obj
*.user
.\packages\*
/VERSION.txt
*.opencover.xml
*.opencover.xml
288 changes: 146 additions & 142 deletions Wabbajack.App.Wpf/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,176 +26,180 @@
using Wabbajack.Util;
using Ext = Wabbajack.Common.Ext;

namespace Wabbajack
namespace Wabbajack;

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
private IHost _host;
private IHost _host;

private void OnStartup(object sender, StartupEventArgs e)
private void OnStartup(object sender, StartupEventArgs e)
{
if (IsAdmin())
{
if (IsAdmin())
var messageBox = MessageBox.Show("Don't run Wabbajack as Admin!", "Error", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);
if (messageBox == MessageBoxResult.OK)
{
var messageBox = MessageBox.Show("Don't run Wabbajack as Admin!", "Error", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);
if (messageBox == MessageBoxResult.OK)
{
Environment.Exit(1);
}
else
{
Environment.Exit(1);
}
Environment.Exit(1);
}
else
{
Environment.Exit(1);
}
}

RxApp.MainThreadScheduler = new DispatcherScheduler(Dispatcher.CurrentDispatcher);
_host = Host.CreateDefaultBuilder(Array.Empty<string>())
.ConfigureLogging(AddLogging)
.ConfigureServices((host, services) =>
{
ConfigureServices(services);
})
.Build();
RxApp.MainThreadScheduler = new DispatcherScheduler(Dispatcher.CurrentDispatcher);
_host = Host.CreateDefaultBuilder(Array.Empty<string>())
.ConfigureLogging(AddLogging)
.ConfigureServices((host, services) =>
{
ConfigureServices(services);
})
.Build();

var args = e.Args;
var args = e.Args;

RxApp.MainThreadScheduler.Schedule(0, (_, _) =>
RxApp.MainThreadScheduler.Schedule(0, (_, _) =>
{
if (args.Length == 1)
{
if (args.Length == 1)
{
var arg = args[0].ToAbsolutePath();
if (arg.FileExists() && arg.Extension == Ext.Wabbajack)
{
var mainWindow = _host.Services.GetRequiredService<MainWindow>();
mainWindow!.Show();
return Disposable.Empty;
}
} else if (args.Length > 0)
{
var builder = _host.Services.GetRequiredService<CommandLineBuilder>();
builder.Run(e.Args).ContinueWith(async x =>
{
Environment.Exit(await x);
});
return Disposable.Empty;
}
else
var arg = args[0].ToAbsolutePath();
if (arg.FileExists() && arg.Extension == Ext.Wabbajack)
{
var mainWindow = _host.Services.GetRequiredService<MainWindow>();
mainWindow!.Show();
return Disposable.Empty;
}

} else if (args.Length > 0)
{
var builder = _host.Services.GetRequiredService<CommandLineBuilder>();
builder.Run(e.Args).ContinueWith(async x =>
{
Environment.Exit(await x);
});
return Disposable.Empty;
});
}
}
else
{
var mainWindow = _host.Services.GetRequiredService<MainWindow>();
mainWindow!.Show();
return Disposable.Empty;
}

private static bool IsAdmin()
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return false;
return Disposable.Empty;
});
}

try
{
var identity = WindowsIdentity.GetCurrent();
var owner = identity.Owner;
if (owner is not null) return owner.IsWellKnown(WellKnownSidType.BuiltinAdministratorsSid);
private static bool IsAdmin()
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return false;

try
{
var identity = WindowsIdentity.GetCurrent();
var owner = identity.Owner;
if (owner is not null) return owner.IsWellKnown(WellKnownSidType.BuiltinAdministratorsSid);

var principle = new WindowsPrincipal(identity);
return principle.IsInRole(WindowsBuiltInRole.Administrator);
var principle = new WindowsPrincipal(identity);
return principle.IsInRole(WindowsBuiltInRole.Administrator);

}
catch (Exception)
{
return false;
}
}

private void AddLogging(ILoggingBuilder loggingBuilder)
catch (Exception)
{
var config = new NLog.Config.LoggingConfiguration();
return false;
}
}

var logFolder = KnownFolders.LauncherAwarePath.Combine("logs");
if (!logFolder.DirectoryExists())
logFolder.CreateDirectory();
private void AddLogging(ILoggingBuilder loggingBuilder)
{
var config = new NLog.Config.LoggingConfiguration();

var fileTarget = new FileTarget("file")
{
FileName = logFolder.Combine("Wabbajack.current.log").ToString(),
ArchiveFileName = logFolder.Combine("Wabbajack.{##}.log").ToString(),
ArchiveOldFileOnStartup = true,
MaxArchiveFiles = 10,
Layout = "${processtime} [${level:uppercase=true}] (${logger}) ${message:withexception=true}",
Header = "############ Wabbajack log file - ${longdate} ############"
};
var logFolder = KnownFolders.LauncherAwarePath.Combine("logs");
if (!logFolder.DirectoryExists())
logFolder.CreateDirectory();

var consoleTarget = new ConsoleTarget("console");
var fileTarget = new FileTarget("file")
{
FileName = logFolder.Combine("Wabbajack.current.log").ToString(),
ArchiveFileName = logFolder.Combine("Wabbajack.{##}.log").ToString(),
ArchiveOldFileOnStartup = true,
MaxArchiveFiles = 10,
Layout = "${processtime} [${level:uppercase=true}] (${logger}) ${message:withexception=true}",
Header = "############ Wabbajack log file - ${longdate} ############"
};

var uiTarget = new LogStream
{
Name = "ui",
Layout = "${message:withexception=false}",
};
var consoleTarget = new ConsoleTarget("console");

var uiTarget = new LogStream
{
Name = "ui",
Layout = "${message:withexception=false}",
};

loggingBuilder.Services.AddSingleton(uiTarget);
loggingBuilder.Services.AddSingleton(uiTarget);

config.AddRuleForAllLevels(fileTarget);
config.AddRuleForAllLevels(consoleTarget);
config.AddRuleForAllLevels(uiTarget);
config.AddRuleForAllLevels(fileTarget);
config.AddRuleForAllLevels(consoleTarget);
config.AddRuleForAllLevels(uiTarget);

loggingBuilder.ClearProviders();
loggingBuilder.SetMinimumLevel(LogLevel.Information);
loggingBuilder.AddNLog(config);
}
loggingBuilder.ClearProviders();
loggingBuilder.SetMinimumLevel(LogLevel.Information);
loggingBuilder.AddNLog(config);
}

private static IServiceCollection ConfigureServices(IServiceCollection services)
{
services.AddOSIntegrated();

// Orc.FileAssociation
services.AddSingleton<IApplicationRegistrationService>(new ApplicationRegistrationService());

services.AddSingleton<CefService>();
services.AddSingleton<IUserInterventionHandler, UserIntreventionHandler>();

services.AddTransient<MainWindow>();
services.AddTransient<MainWindowVM>();
services.AddTransient<BrowserWindow>();
services.AddSingleton<SystemParametersConstructor>();
services.AddSingleton<LauncherUpdater>();
services.AddSingleton<ResourceMonitor>();
services.AddSingleton<WebView2>();

services.AddTransient<CompilerVM>();
services.AddTransient<InstallerVM>();
services.AddTransient<ModeSelectionVM>();
services.AddTransient<ModListGalleryVM>();
services.AddTransient<CompilerVM>();
services.AddTransient<InstallerVM>();
services.AddTransient<SettingsVM>();
services.AddTransient<WebBrowserVM>();

// Login Handlers
services.AddTransient<VectorPlexusLoginHandler>();
services.AddTransient<NexusLoginHandler>();
services.AddTransient<LoversLabLoginHandler>();

// Login Managers

//Disabled LL because it is currently not used and broken due to the way LL butchers their API
//services.AddAllSingleton<INeedsLogin, LoversLabLoginManager>();
services.AddAllSingleton<INeedsLogin, NexusLoginManager>();
//Disabled VP due to frequent login issues & because the only file that really got downloaded there has a mirror
//services.AddAllSingleton<INeedsLogin, VectorPlexusLoginManager>();
services.AddSingleton<ManualDownloadHandler>();
services.AddSingleton<ManualBlobDownloadHandler>();

// Verbs
services.AddSingleton<CommandLineBuilder>();
services.AddCLIVerbs();

return services;
}
private static IServiceCollection ConfigureServices(IServiceCollection services)
{
services.AddOSIntegrated();

// Orc.FileAssociation
services.AddSingleton<IApplicationRegistrationService>(new ApplicationRegistrationService());

services.AddSingleton<CefService>();
services.AddSingleton<IUserInterventionHandler, UserInterventionHandler>();
services.AddSingleton<ImageCacheManager>();

services.AddTransient<MainWindow>();
services.AddTransient<MainWindowVM>();
services.AddTransient<NavigationVM>();
services.AddTransient<BrowserWindow>();
services.AddSingleton<SystemParametersConstructor>();
services.AddSingleton<LauncherUpdater>();
services.AddSingleton<ResourceMonitor>();
services.AddSingleton<WebView2>();

services.AddTransient<HomeVM>();
services.AddTransient<ModListGalleryVM>();
services.AddTransient<CompilerHomeVM>();
services.AddTransient<CompilerDetailsVM>();
services.AddTransient<CompilerFileManagerVM>();
services.AddTransient<CompilerMainVM>();
services.AddTransient<InstallationVM>();
services.AddTransient<SettingsVM>();
services.AddTransient<WebBrowserVM>();
services.AddTransient<InfoVM>();
services.AddTransient<ModListDetailsVM>();

// Login Handlers
services.AddTransient<VectorPlexusLoginHandler>();
services.AddTransient<NexusLoginHandler>();
services.AddTransient<LoversLabLoginHandler>();

// Login Managers

//Disabled LL because it is currently not used and broken due to the way LL butchers their API
//services.AddAllSingleton<INeedsLogin, LoversLabLoginManager>();
services.AddAllSingleton<INeedsLogin, NexusLoginManager>();
//Disabled VP due to frequent login issues & because the only file that really got downloaded there has a mirror
//services.AddAllSingleton<INeedsLogin, VectorPlexusLoginManager>();
services.AddSingleton<ManualDownloadHandler>();
services.AddSingleton<ManualBlobDownloadHandler>();

// Verbs
services.AddSingleton<CommandLineBuilder>();
services.AddCLIVerbs();

return services;
}
}
15 changes: 15 additions & 0 deletions Wabbajack.App.Wpf/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ public static class Consts
public static RelativePath MO2IniName = "ModOrganizer.ini".ToRelativePath();
public static string AppName = "Wabbajack";
public static Uri WabbajackBuildServerUri => new("https://build.wabbajack.org");
public static Uri WabbajackModlistWizardUri => new("https://wizard.wabbajack.org");
public static Uri WabbajackGithubUri => new("https://github.com/wabbajack-tools/wabbajack");
public static Uri WabbajackDiscordUri => new("https://discord.gg/wabbajack");
public static Uri WabbajackPatreonUri => new("https://www.patreon.com/user?u=11907933");
public static Uri WabbajackWikiUri => new("https://wiki.wabbajack.org");
public static Version CurrentMinimumWabbajackVersion { get; set; } = Version.Parse("2.3.0.0");
public static bool UseNetworkWorkaroundMode { get; set; } = false;
public static AbsolutePath CefCacheLocation { get; } = KnownFolders.WabbajackAppLocal.Combine("Cef");
Expand All @@ -18,4 +23,14 @@ public static class Consts
public static byte SettingsVersion = 0;

public static RelativePath NativeSettingsJson = "native_settings.json".ToRelativePath();
public const string AllSavedCompilerSettingsPaths = "compiler_settings_paths";

// Info - TODO, make rich document?
public const string FileManagerInfo = @"
Your modlist will contain lots of files and Wabbajack needs to know where all those files came from to compile a modlist installer. Most of these should be mods that are sourced from the downloads folder. But you might have folders you do **not** want to ship with the modlist, or folders or config files that are generated and can be inlined into the .wabbajack installer. Here is where these files or folders are managed.

Find more information on the Wabbajack wiki!

https://wiki.wabbajack.org/modlist_author_documentation/Compilation.html
";
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Globalization;
using System.Windows.Data;
using ReactiveUI;
using Wabbajack.Common;
using Wabbajack.Paths;

namespace Wabbajack
Expand Down
4 changes: 0 additions & 4 deletions Wabbajack.App.Wpf/Converters/CommandConverter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using ReactiveUI;

Expand Down
7 changes: 1 addition & 6 deletions Wabbajack.App.Wpf/Converters/ConverterRegistration.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ReactiveUI;
using ReactiveUI;
using Splat;

namespace Wabbajack
Expand Down
4 changes: 0 additions & 4 deletions Wabbajack.App.Wpf/Converters/IntDownCastConverter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using ReactiveUI;

Expand Down
Loading
Loading