Compare commits
3 Commits
87745c1d61
...
5f6996ac53
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f6996ac53 | |||
| 08432a07c1 | |||
| a11aeeea8c |
@ -8,6 +8,13 @@
|
||||
"nswag"
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"refitter": {
|
||||
"version": "1.5.5",
|
||||
"commands": [
|
||||
"refitter"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -29,6 +29,7 @@
|
||||
<entry key="Flawless.Client/Views/ModalBox/PasswordChangeDialogView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
<entry key="Flawless.Client/Views/ModalBox/SimpleMessageDialogView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
<entry key="Flawless.Client/Views/ModalBox/UserCreateDialogView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
<entry key="Flawless.Client/Views/ModalBox/WebhookEditDialogView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
<entry key="Flawless.Client/Views/RegisterPageView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
<entry key="Flawless.Client/Views/RegisterView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
<entry key="Flawless.Client/Views/RepositoryPage/IssueEditDialogView.axaml" value="Flawless.Client/Flawless.Client.csproj" />
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="postgres@localhost" uuid="fcb3a985-405e-4a4d-9f94-39584f3e89bb">
|
||||
<data-source source="LOCAL" name="postgres@192.168.10.172" uuid="29452365-bc84-49b7-b6ba-0747cd083906">
|
||||
<driver-ref>postgresql</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<configured-by-url>true</configured-by-url>
|
||||
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:postgresql://localhost:5432/postgres</jdbc-url>
|
||||
<jdbc-url>jdbc:postgresql://192.168.10.172:5432/postgres</jdbc-url>
|
||||
<jdbc-additional-properties>
|
||||
<property name="com.intellij.clouds.kubernetes.db.host.port" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.container.port" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
|
||||
@ -54,18 +54,19 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUserManager_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd56cb0a089b14dab96ad3ee133819f966d938_003F9c_003F183f8355_003FUserManager_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AValueTuple_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa6b7f037ba7b44df80b8d3aa7e58eeb2e8e938_003Fa7_003F76eb4679_003FValueTuple_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AViewForMixins_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F404d064a80dc4960b93f90c9bd69770750810_003F65_003F2791a1c7_003FViewForMixins_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003A_005F_005FMicroComIAvnPlatformThreadingInterfaceProxy_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F89ef5ce97ada4a3e80613a86a8b6865a47200_003F5e_003F862bfb92_003F_005F_005FMicroComIAvnPlatformThreadingInterfaceProxy_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||
<Assembly Path="C:\Users\Cardi\.nuget\packages\irihi.ursa\1.10.0\lib\net8.0\Ursa.dll" />
|
||||
<Assembly Path="C:\Users\Cardi\.nuget\packages\irihi.ursa.themes.semi\1.10.0\lib\netstandard2.0\Ursa.Themes.Semi.dll" />
|
||||
<Assembly Path="C:\Users\Cardi\.nuget\packages\reactiveui\20.1.1\lib\net8.0\ReactiveUI.dll" />
|
||||
</AssemblyExplorer></s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=b5573ef9_002Db554_002D4a56_002D82c4_002D2531c8feef65/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" IsLocked="True" Name="PathValidationTest" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
<TestId>MSTest::5B1CB26D-99F5-491A-B368-7E3552FE67E9::net9.0::Flawless.Abstract.Test.WorkPathTestUnit</TestId>
|
||||
</TestAncestor>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=b5573ef9_002Db554_002D4a56_002D82c4_002D2531c8feef65/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" IsLocked="True" Name="PathValidationTest" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
<TestId>MSTest::5B1CB26D-99F5-491A-B368-7E3552FE67E9::net9.0::Flawless.Abstract.Test.WorkPathTestUnit</TestId>
|
||||
</TestAncestor>
|
||||
</SessionState></s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=f3f8a684_002Dc08e_002D489f_002D949c_002D6c38a1ed63b0/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="PathValidationTest #2" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
<TestId>MSTest::5B1CB26D-99F5-491A-B368-7E3552FE67E9::net9.0::Flawless.Abstract.Test.WorkPathTestUnit.PathValidationTest</TestId>
|
||||
</TestAncestor>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=f3f8a684_002Dc08e_002D489f_002D949c_002D6c38a1ed63b0/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="PathValidationTest #2" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
<TestId>MSTest::5B1CB26D-99F5-491A-B368-7E3552FE67E9::net9.0::Flawless.Abstract.Test.WorkPathTestUnit.PathValidationTest</TestId>
|
||||
</TestAncestor>
|
||||
</SessionState></s:String></wpf:ResourceDictionary>
|
||||
@ -264,7 +264,7 @@ namespace Flawless.Client.Remote
|
||||
/// <returns>OK</returns>
|
||||
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
||||
[Multipart]
|
||||
[Headers("Accept: text/plain, application/json, text/json", "Content-Type: multipart/form-data")]
|
||||
[Headers("Accept: text/plain, application/json, text/json")]
|
||||
[Post("/api/repo/{userName}/{repositoryName}/create_commit")]
|
||||
Task<CommitSuccessResponse> CreateCommit(string userName, string repositoryName, StreamPart depot, string message, IEnumerable<string> workspaceSnapshot, IEnumerable<string> requiredDepots, string mainDepotId, CancellationToken cancellationToken = default);
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ public class RepositoryService : BaseService<RepositoryService>
|
||||
return false;
|
||||
}
|
||||
|
||||
var issues = (await api.Gateway.List(repo.Name, repo.OwnerName))
|
||||
var issues = (await api.Gateway.List(repo.OwnerName, repo.Name))
|
||||
.Result.ToImmutableDictionary(x => (ulong) x.Id);
|
||||
|
||||
for (var i = 0; i < repo.Issues.Count; i++)
|
||||
@ -615,7 +615,7 @@ public class RepositoryService : BaseService<RepositoryService>
|
||||
return false;
|
||||
}
|
||||
|
||||
var members = await api.Gateway.GetUsers(repo.Name, repo.OwnerName);
|
||||
var members = await api.Gateway.GetUsers(repo.OwnerName, repo.Name);
|
||||
|
||||
// Update existed
|
||||
var dict = members.Result.ToDictionary(m => m.Username);
|
||||
@ -1247,7 +1247,7 @@ public class RepositoryService : BaseService<RepositoryService>
|
||||
}
|
||||
|
||||
var rsp = await api.Gateway.CreateCommit(repo.OwnerName, repo.Name,
|
||||
new StreamPart(str, Path.GetFileName(tempDepotPath)), message, snapshot, null!, null!);
|
||||
new StreamPart(str, Path.GetFileName(tempDepotPath)), message, snapshot, [], string.Empty);
|
||||
|
||||
// Move depot file to destination
|
||||
var depotsPath = PathUtility.GetWorkspaceDepotCachePath(Api.Current.Username.Value!, repo.OwnerName, repo.Name);
|
||||
@ -1274,7 +1274,7 @@ public class RepositoryService : BaseService<RepositoryService>
|
||||
}
|
||||
}
|
||||
|
||||
// Point to newest state.
|
||||
// Point to latest state.
|
||||
localDb.RepoAccessor = accessor;
|
||||
localDb.CurrentCommit = rsp.CommitId;
|
||||
localDb.LocalAccessor.SetBaseline(accessor);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
xmlns:vm="clr-namespace:Flawless.Client.ViewModels.ModalBox"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:DataType="vm:IssueEditDialogViewModel"
|
||||
MinWidth="400"
|
||||
x:Class="Flawless.Client.Views.ModalBox.IssueDetailEditView">
|
||||
|
||||
<u:Form>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
x:DataType="vm:MergeDialogViewModel"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
MinWidth="400"
|
||||
x:Class="Flawless.Client.Views.ModalBox.MergeDialogView">
|
||||
<ListBox ItemsSource="{Binding MergeFiles}">
|
||||
<ListBox.ItemTemplate>
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Flawless.Client.ViewModels.ModalBox"
|
||||
x:Class="Flawless.Client.Views.ModalBox.PasswordChangeDialogView"
|
||||
x:DataType="vm:PasswordChangeDialogViewModel">
|
||||
x:DataType="vm:PasswordChangeDialogViewModel"
|
||||
MinWidth="400">
|
||||
|
||||
<Grid Margin="10" RowDefinitions="Auto,Auto,Auto">
|
||||
<TextBox Watermark="Old Password"
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="using:Flawless.Client.ViewModels.ModalBox"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
MinWidth="400"
|
||||
x:Class="Flawless.Client.Views.ModalBox.WebhookEditDialogView"
|
||||
x:DataType="vm:WebhookEditDialogViewModel">
|
||||
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8" Margin="0 0 0 12">
|
||||
<u:IconButton Icon="{StaticResource SemiIconRefresh}" Content="刷新"
|
||||
<u:IconButton Icon="{StaticResource SemiIconRefresh}" Content="Refresh"
|
||||
Command="{Binding RefreshRepositoryIssuesAsyncCommand}"/>
|
||||
<u:IconButton Icon="{StaticResource SemiIconPlus}" Content="新建 Issue"
|
||||
<u:IconButton Icon="{StaticResource SemiIconPlus}" Content="Create"
|
||||
Command="{Binding CreateIssueCommand}"/>
|
||||
<!-- <ComboBox ItemsSource="{Binding IssueFilters}" SelectedIndex="0" -->
|
||||
<!-- Width="120" PlaceholderText="筛选状态"/> -->
|
||||
@ -39,7 +39,7 @@
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="{Binding Author}"
|
||||
Foreground="{DynamicResource SemiSecondaryTextColor}"/>
|
||||
<TextBlock Text="{Binding CreatedAt, StringFormat='创建于 {0:yyyy-MM-dd}'}"
|
||||
<TextBlock Text="{Binding CreatedAt, StringFormat='Create At {0:yyyy-MM-dd}'}"
|
||||
Foreground="{DynamicResource SemiSecondaryTextColor}"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@ public class AuthenticationController(
|
||||
Email = r.AdminEmail,
|
||||
EmailConfirmed = true,
|
||||
CreatedOn = DateTime.UtcNow,
|
||||
Admin = true
|
||||
};
|
||||
|
||||
user.RenewSecurityStamp();
|
||||
|
||||
@ -34,7 +34,7 @@ public class RepositoryInnieController(
|
||||
{
|
||||
var u = (await userManager.GetUserAsync(HttpContext.User))!;
|
||||
var grantIssue = await ValidateRepositoryAsync(userName, repositoryName, u, RepositoryRole.Guest);
|
||||
if (grantIssue is not Repository) return (ActionResult) grantIssue;
|
||||
if (grantIssue is not Repository rp) return (ActionResult) grantIssue;
|
||||
|
||||
await using (var t = await dbContext.Database.BeginTransactionAsync())
|
||||
{
|
||||
@ -43,10 +43,22 @@ public class RepositoryInnieController(
|
||||
.Include(x => x.Depots)
|
||||
.Include(x => x.Members)
|
||||
.Include(x => x.Locked)
|
||||
.FirstAsync(x => x.Name == repositoryName && x.Owner.UserName == userName);
|
||||
.FirstAsync(x => x == rp);
|
||||
|
||||
try
|
||||
{
|
||||
await dbContext.Webhooks
|
||||
.Where(x => x.Repository == rp)
|
||||
.ExecuteDeleteAsync();
|
||||
|
||||
await dbContext.RepositoryIssues
|
||||
.Where(x => x.Repository == rp)
|
||||
.SelectMany(x => x.Contents).ExecuteDeleteAsync();
|
||||
|
||||
await dbContext.RepositoryIssues
|
||||
.Where(x => x.Repository == rp)
|
||||
.ExecuteDeleteAsync();
|
||||
|
||||
set.Commits.Clear();
|
||||
set.Depots.Clear();
|
||||
set.Members.Clear();
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"CoreDb": "Server=localhost;Port=5432;User Id=postgres;Password=postgres;Database=flawless"
|
||||
"CoreDb": "Server=192.168.10.172;Port=5432;User Id=postgres;Password=postgres;Database=flawless"
|
||||
},
|
||||
"LocalStoragePath": "./data/development",
|
||||
"User": {
|
||||
|
||||
@ -5,17 +5,18 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"CoreDb": "Server=localhost;Port=5432;User Id=postgres;Password=postgres;Database=flawless"
|
||||
"CoreDb": "Server=192.168.10.172;Port=5432;User Id=postgres;Password=postgres;Database=flawless"
|
||||
},
|
||||
"LocalStoragePath": "./data/production",
|
||||
"LocalStoragePath": "./data/development",
|
||||
"User": {
|
||||
"PublicRegister": false
|
||||
"PublicRegister": true
|
||||
},
|
||||
"Jwt": {
|
||||
"SecretKey": "your_256bit_security_key_at_here_otherwise_not_bootable",
|
||||
"Issuer": "test",
|
||||
"ExpiresIn": 30
|
||||
"ExpiresIn": 30,
|
||||
"RefreshTokenLifeTime": 7
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user