-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fadfdbd
commit a49ad31
Showing
195 changed files
with
3,279 additions
and
1,641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
src/CrossWikiEditor.Core/ListProviders/AllCategoriesListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllCategoriesListProvider(ICategoryService categoryService, | ||
public sealed class AllCategoriesListProvider( | ||
ICategoryService categoryService, | ||
IDialogService dialogService, | ||
ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
{ | ||
public override string Title => "All Categories"; | ||
public override string ParamTitle => "Start from"; | ||
public override bool CanMake => true; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await categoryService.GetAllCategories(settingsService.CurrentApiUrl, Param, limit); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await categoryService.GetAllCategories(settingsService.CurrentApiUrl, Param, limit); | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
src/CrossWikiEditor.Core/ListProviders/AllFilesListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllFilesListProvider(IDialogService dialogService, | ||
public sealed class AllFilesListProvider( | ||
IDialogService dialogService, | ||
IPageService pageService, | ||
ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
{ | ||
public override string Title => "All Files"; | ||
public override string ParamTitle => "Start from"; | ||
public override bool CanMake => true; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await pageService.GetAllFiles(settingsService.CurrentApiUrl, Param, limit); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await pageService.GetAllFiles(settingsService.CurrentApiUrl, Param, limit); | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
src/CrossWikiEditor.Core/ListProviders/AllPagesListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllPagesListProvider(IDialogService dialogService, | ||
public sealed class AllPagesListProvider( | ||
IDialogService dialogService, | ||
IPageService pageService, | ||
ISettingsService settingsService, | ||
IViewModelFactory viewModelFactory) : AllPagesListProviderBase(dialogService, pageService, viewModelFactory, settingsService) | ||
{ | ||
public override string Title => "All Pages"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await MakeListBase(limit, PropertyFilterOption.Disable, PropertyFilterOption.Disable); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await MakeListBase(limit, PropertyFilterOption.Disable, PropertyFilterOption.Disable); | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
src/CrossWikiEditor.Core/ListProviders/AllPagesNoRedirectsListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllPagesNoRedirectsListProvider(IDialogService dialogService, | ||
public sealed class AllPagesNoRedirectsListProvider( | ||
IDialogService dialogService, | ||
IPageService pageService, | ||
ISettingsService settingsService, | ||
IViewModelFactory viewModelFactory) : AllPagesListProviderBase(dialogService, pageService, viewModelFactory, settingsService) | ||
{ | ||
public override string Title => "All Pages (no redirects)"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await MakeListBase(limit, PropertyFilterOption.WithoutProperty, PropertyFilterOption.Disable); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await MakeListBase(limit, PropertyFilterOption.WithoutProperty, PropertyFilterOption.Disable); | ||
} | ||
} |
16 changes: 11 additions & 5 deletions
16
src/CrossWikiEditor.Core/ListProviders/AllPagesWithPrefixListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllPagesWithPrefixListProvider(IDialogService dialogService, | ||
public sealed class AllPagesWithPrefixListProvider( | ||
IDialogService dialogService, | ||
IPageService pageService, | ||
ISettingsService settingsService, | ||
IViewModelFactory viewModelFactory) : LimitedListProviderBase(dialogService), INeedNamespacesListProvider | ||
{ | ||
private int[]? _namespaces; | ||
public override string Title => "All Pages with prefix (Prefixindex)"; | ||
public override string ParamTitle => "Prefix"; | ||
public override bool CanMake => _namespaces is { Length: 1 }; | ||
public override bool CanMake => _namespaces is {Length: 1}; | ||
|
||
public async Task GetAdditionalParams() => _namespaces = await this.GetNamespaces(isMultiselect: false, DialogService, viewModelFactory); | ||
public async Task GetAdditionalParams() | ||
{ | ||
_namespaces = await this.GetNamespaces(false, DialogService, viewModelFactory); | ||
} | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await pageService.GetAllPagesWithPrefix(settingsService.CurrentApiUrl, Param, _namespaces![0], limit); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await pageService.GetAllPagesWithPrefix(settingsService.CurrentApiUrl, Param, _namespaces![0], limit); | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
src/CrossWikiEditor.Core/ListProviders/AllRedirectsListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllRedirectsListProvider(IDialogService dialogService, | ||
public sealed class AllRedirectsListProvider( | ||
IDialogService dialogService, | ||
IPageService pageService, | ||
ISettingsService settingsService, | ||
IViewModelFactory viewModelFactory) : AllPagesListProviderBase(dialogService, pageService, viewModelFactory, settingsService) | ||
{ | ||
public override string Title => "All Redirects"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await MakeListBase(limit, PropertyFilterOption.WithProperty, PropertyFilterOption.Disable); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await MakeListBase(limit, PropertyFilterOption.WithProperty, PropertyFilterOption.Disable); | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
src/CrossWikiEditor.Core/ListProviders/AllUsersListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class AllUsersListProvider(IDialogService dialogService, | ||
public sealed class AllUsersListProvider( | ||
IDialogService dialogService, | ||
ISettingsService settingsService, | ||
IUserService userService) : LimitedListProviderBase(dialogService) | ||
{ | ||
public override string Title => "All Users"; | ||
public override string ParamTitle => "Start from"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await userService.GetAllUsers(settingsService.CurrentApiUrl, Param, limit); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await userService.GetAllUsers(settingsService.CurrentApiUrl, Param, limit); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
src/CrossWikiEditor.Core/ListProviders/CategoryListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class CategoryListProvider(ICategoryService categoryService, | ||
IDialogService dialogService, ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
public sealed class CategoryListProvider( | ||
ICategoryService categoryService, | ||
IDialogService dialogService, | ||
ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
{ | ||
public override string Title => "Category"; | ||
public override string ParamTitle => "Category"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await categoryService.GetPagesOfCategory(settingsService.CurrentApiUrl, Param, limit); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await categoryService.GetPagesOfCategory(settingsService.CurrentApiUrl, Param, limit); | ||
} | ||
} |
12 changes: 8 additions & 4 deletions
12
src/CrossWikiEditor.Core/ListProviders/CategoryRecursive1LevelListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class CategoryRecursive1LevelListProvider(ICategoryService categoryService, | ||
IDialogService dialogService, ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
public sealed class CategoryRecursive1LevelListProvider( | ||
ICategoryService categoryService, | ||
IDialogService dialogService, | ||
ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
{ | ||
public override string Title => "Category (recursive 1 level)"; | ||
public override string ParamTitle => "Category"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await categoryService.GetPagesOfCategory(settingsService.CurrentApiUrl, Param, limit, 1); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await categoryService.GetPagesOfCategory(settingsService.CurrentApiUrl, Param, limit, 1); | ||
} | ||
} |
12 changes: 8 additions & 4 deletions
12
src/CrossWikiEditor.Core/ListProviders/CategoryRecursiveListProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
namespace CrossWikiEditor.Core.ListProviders; | ||
|
||
public sealed class CategoryRecursiveListProvider(ICategoryService categoryService, | ||
IDialogService dialogService, ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
public sealed class CategoryRecursiveListProvider( | ||
ICategoryService categoryService, | ||
IDialogService dialogService, | ||
ISettingsService settingsService) : LimitedListProviderBase(dialogService) | ||
{ | ||
public override string Title => "Category (recursive)"; | ||
public override string ParamTitle => "Category"; | ||
|
||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) => | ||
await categoryService.GetPagesOfCategory(settingsService.CurrentApiUrl, Param, limit, Int32.MaxValue); | ||
public override async Task<Result<List<WikiPageModel>>> MakeList(int limit) | ||
{ | ||
return await categoryService.GetPagesOfCategory(settingsService.CurrentApiUrl, Param, limit, int.MaxValue); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.