Skip to content

Commit 71654a9

Browse files
committed
[build] 0.3.2
2 parents 2ab7696 + 8097d9f commit 71654a9

File tree

41 files changed

+2666
-1601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2666
-1601
lines changed

.github/workflows/build-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
# Read the version
3434
- name: Read version
35-
run: echo "VERSION=$(cat OpenBullet2.Web/version.txt)" >> $GITHUB_ENV
35+
run: echo "VERSION=$(head -n 1 OpenBullet2.Web/version.txt)" >> $GITHUB_ENV
3636

3737
# Build using docker
3838
- name: Build using docker
@@ -70,7 +70,7 @@ jobs:
7070
file_glob: true
7171
release_name: ${{ env.VERSION }}
7272
tag: ${{ env.VERSION }}
73-
overwrite: true
73+
overwrite: false
7474
prerelease: false
7575
make_latest: true
7676
# Show ONLY the commit description in the release (without)

.github/workflows/build-staging.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ jobs:
3434
- name: Get commit number
3535
run: echo "COMMIT_NUMBER=$(git rev-list --count HEAD)" >> $GITHUB_ENV
3636

37-
# Append the commit number to version.txt of the web client
37+
# Read the version
38+
- name: Read version
39+
run: echo "VERSION=$(head -n 1 OpenBullet2.Web/version.txt)" >> $GITHUB_ENV
40+
41+
# Overwrite the contents of version.txt with $VERSION.$COMMIT_NUMBER
3842
- name: Append commit number to version.txt
39-
run: echo ".$COMMIT_NUMBER" >> OpenBullet2.Web/version.txt
43+
run: echo "${{ env.VERSION }}.${{ env.COMMIT_NUMBER }}" > OpenBullet2.Web/version.txt
4044

41-
# Append the commit number to version.txt of the native client
45+
# Do the same for the native client
4246
- name: Append commit number to version.txt
43-
run: echo ".$COMMIT_NUMBER" >> OpenBullet2.Native/version.txt
47+
run: echo "${{ env.VERSION }}.${{ env.COMMIT_NUMBER }}" > OpenBullet2.Native/version.txt
4448

4549
# Get the commit description
4650
- name: Get commit description
@@ -50,8 +54,8 @@ jobs:
5054
echo 'EOF' >> $GITHUB_ENV
5155
5256
# Read the version
53-
- name: Read version
54-
run: echo "VERSION=$(cat OpenBullet2.Web/version.txt)" >> $GITHUB_ENV
57+
- name: Read version again
58+
run: echo "VERSION=$(head -n 1 OpenBullet2.Web/version.txt)" >> $GITHUB_ENV
5559

5660
# Build using docker
5761
- name: Build using docker
@@ -89,7 +93,7 @@ jobs:
8993
file_glob: true
9094
release_name: ${{ env.VERSION }}
9195
tag: ${{ env.VERSION }}
92-
overwrite: true
96+
overwrite: false
9397
prerelease: true
9498
make_latest: true
9599
# Show ONLY the commit description in the release (without)

Changelog/0.3.2.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Changelog for version 0.3.2
2+
3+
This release contains some bugfixes and improvements.
4+
Most notably, `CaptchaSharp` has been upgraded to version `2.1.0` and **many new captcha-related blocks and services have been added**.
5+
Check them out in the "RL Settings" and Stacker!
6+
7+
Other changes:
8+
9+
##### RuriLib
10+
- Added support for parsing comma-separated cookies from the `Set-Cookie` and `Set-Cookie2` headers in the `RuriLib.Http` client. *This breaks support for cookie values that contain commas, but [they are disallowed](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) by the standard anyway*
11+
- Removed auth constraint from SMTP blocks that send mails, allowing to send mails as an anonymous user on servers that allow it
12+
- Fixed/Added support for the `ListOfStrings` and `DictionaryOfStrings` output variables when using Node.js in the Script block
13+
- Removed support for the CapSolver service upon request from the service owner
14+
- Added missing timeouts to `NoProxyClient`'s `ProxySettings`
15+
- Added elliptic curve support for JWT signature (by GekySan)
16+
17+
##### OpenBullet (Web)
18+
- Fixed missing suggestions in variable-mode input fields
19+
- Removed double labels from some boolean parameters for a cleaner UI
20+
- Added try/catch in `ReadNetworkUsage` due to a macOS issue that caused the program to crash
21+
22+
##### OpenBullet (Native)
23+
- Fixed annoying auto word selection in Windows Forms' RichTextBoxes

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 openbullet
3+
Copyright (c) 2024 openbullet
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

OpenBullet2.Core/Repositories/DiskConfigRepository.cs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,33 +72,35 @@ public async Task<Config> GetAsync(string id)
7272
{
7373
var file = GetFileName(id);
7474

75-
if (File.Exists(file))
75+
if (!File.Exists(file))
7676
{
77-
using var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read);
78-
79-
var config = await ConfigPacker.UnpackAsync(fileStream);
80-
config.Id = id;
81-
return config;
77+
throw new FileNotFoundException();
8278
}
79+
80+
await using var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read);
81+
82+
var config = await ConfigPacker.UnpackAsync(fileStream);
83+
config.Id = id;
84+
return config;
8385

84-
throw new FileNotFoundException();
8586
}
8687

8788
/// <inheritdoc/>
8889
public async Task<byte[]> GetBytesAsync(string id)
8990
{
9091
var file = GetFileName(id);
9192

92-
if (File.Exists(file))
93+
if (!File.Exists(file))
9394
{
94-
using FileStream fileStream = new(file, FileMode.Open, FileAccess.Read);
95-
using var ms = new MemoryStream();
96-
await fileStream.CopyToAsync(ms);
97-
98-
return ms.ToArray();
95+
throw new FileNotFoundException();
9996
}
97+
98+
await using FileStream fileStream = new(file, FileMode.Open, FileAccess.Read);
99+
using var ms = new MemoryStream();
100+
await fileStream.CopyToAsync(ms);
101+
102+
return ms.ToArray();
100103

101-
throw new FileNotFoundException();
102104
}
103105

104106
/// <inheritdoc/>
@@ -129,7 +131,7 @@ public async Task UploadAsync(Stream stream, string fileName)
129131
else if (extension == ".loli")
130132
{
131133
using var ms = new MemoryStream();
132-
stream.CopyTo(ms);
134+
await stream.CopyToAsync(ms);
133135
ms.Seek(0, SeekOrigin.Begin);
134136
var content = Encoding.UTF8.GetString(ms.ToArray());
135137
var id = Path.GetFileNameWithoutExtension(fileName);

OpenBullet2.Native/Converters/BooleanConverter.cs

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,51 @@
33
using System.Globalization;
44
using System.Windows;
55
using System.Windows.Data;
6-
using System.Windows.Media;
76

8-
namespace OpenBullet2.Native.Converters
7+
namespace OpenBullet2.Native.Converters;
8+
9+
// From https://stackoverflow.com/a/5182660/4332314
10+
public class BooleanConverter<T> : IValueConverter
911
{
10-
// From https://stackoverflow.com/a/5182660/4332314
11-
public class BooleanConverter<T> : IValueConverter
12+
public BooleanConverter(T trueValue, T falseValue)
1213
{
13-
public BooleanConverter(T trueValue, T falseValue)
14-
{
15-
True = trueValue;
16-
False = falseValue;
17-
}
14+
True = trueValue;
15+
False = falseValue;
16+
}
1817

19-
public T True { get; set; }
20-
public T False { get; set; }
18+
public T True { get; set; }
19+
public T False { get; set; }
2120

22-
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
23-
=> value is bool b && b ? True : False;
21+
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
22+
=> value is bool b && b ? True : False;
2423

25-
public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
26-
=> value is T convertedValue && EqualityComparer<T>.Default.Equals(convertedValue, True);
27-
}
24+
public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
25+
=> value is T convertedValue && EqualityComparer<T>.Default.Equals(convertedValue, True);
26+
}
2827

29-
public sealed class BoolToVisibilityConverter : BooleanConverter<Visibility>
28+
public sealed class BoolToVisibilityConverter : BooleanConverter<Visibility>
29+
{
30+
public BoolToVisibilityConverter() :
31+
base(Visibility.Visible, Visibility.Collapsed)
3032
{
31-
public BoolToVisibilityConverter() :
32-
base(Visibility.Visible, Visibility.Collapsed)
33-
{
3433

35-
}
3634
}
35+
}
3736

38-
public sealed class BoolToThicknessConverter : BooleanConverter<Thickness>
37+
public sealed class BoolToThicknessConverter : BooleanConverter<Thickness>
38+
{
39+
public BoolToThicknessConverter() :
40+
base(new Thickness(1), new Thickness(0))
3941
{
40-
public BoolToThicknessConverter() :
41-
base(new Thickness(1), new Thickness(0))
42-
{
4342

44-
}
4543
}
44+
}
4645

47-
public sealed class BoolToTextWrappingConverter : BooleanConverter<TextWrapping>
46+
public sealed class BoolToTextWrappingConverter : BooleanConverter<TextWrapping>
47+
{
48+
public BoolToTextWrappingConverter() :
49+
base(TextWrapping.Wrap, TextWrapping.NoWrap)
4850
{
49-
public BoolToTextWrappingConverter() :
50-
base(TextWrapping.Wrap, TextWrapping.NoWrap)
51-
{
5251

53-
}
5452
}
5553
}

OpenBullet2.Native/Services/UpdateService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class UpdateService : IDisposable
1313
private readonly string versionFile = "version.txt";
1414
private readonly Timer timer;
1515

16-
public Version CurrentVersion { get; private set; } = new(0, 3, 1);
17-
public Version RemoteVersion { get; private set; } = new(0, 3, 1);
16+
public Version CurrentVersion { get; private set; } = new(0, 3, 2);
17+
public Version RemoteVersion { get; private set; } = new(0, 3, 2);
1818
public bool IsUpdateAvailable => RemoteVersion > CurrentVersion;
1919
public string CurrentVersionType => CurrentVersion.Major == 0
2020
? (CurrentVersion.Minor == 0 ? "Alpha" : "Beta")

0 commit comments

Comments
 (0)