mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
Merge branch 'master' into cloudflare-caching
This commit is contained in:
commit
e1aeb89991
|
@ -83,7 +83,7 @@
|
||||||
"no_key_name": "Unnamed key",
|
"no_key_name": "Unnamed key",
|
||||||
"root_title": "These are superuser keys",
|
"root_title": "These are superuser keys",
|
||||||
"root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.",
|
"root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.",
|
||||||
"input_label": "Public ED25519 or RSA key"
|
"input_label": "Public ED25519, ECDSA or RSA key"
|
||||||
},
|
},
|
||||||
"onboarding": {
|
"onboarding": {
|
||||||
"page1_title": "Digital independence, available to all of us",
|
"page1_title": "Digital independence, available to all of us",
|
||||||
|
|
|
@ -455,8 +455,8 @@ class DigitalOceanApi extends RestApiMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<GenericResult<bool>> resizeVolume(
|
Future<GenericResult<bool>> resizeVolume(
|
||||||
final String name,
|
final String uuid,
|
||||||
final DiskSize size,
|
final int gb,
|
||||||
) async {
|
) async {
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
@ -464,11 +464,10 @@ class DigitalOceanApi extends RestApiMap {
|
||||||
final Dio client = await getClient();
|
final Dio client = await getClient();
|
||||||
try {
|
try {
|
||||||
resizeVolumeResponse = await client.post(
|
resizeVolumeResponse = await client.post(
|
||||||
'/volumes/actions',
|
'/volumes/$uuid/actions',
|
||||||
data: {
|
data: {
|
||||||
'type': 'resize',
|
'type': 'resize',
|
||||||
'volume_name': name,
|
'size_gigabytes': gb,
|
||||||
'size_gigabytes': size.gibibyte,
|
|
||||||
'region': region,
|
'region': region,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -12,7 +12,7 @@ class SshFormCubit extends FormCubit {
|
||||||
required this.user,
|
required this.user,
|
||||||
}) {
|
}) {
|
||||||
final RegExp keyRegExp = RegExp(
|
final RegExp keyRegExp = RegExp(
|
||||||
r'^(ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$',
|
r'^(ecdsa-sha2-nistp256 AAAAE2VjZH|ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$',
|
||||||
);
|
);
|
||||||
|
|
||||||
key = FieldCubit(
|
key = FieldCubit(
|
||||||
|
|
|
@ -698,8 +698,8 @@ class DigitalOceanServerProvider extends ServerProvider {
|
||||||
final DiskSize size,
|
final DiskSize size,
|
||||||
) async =>
|
) async =>
|
||||||
_adapter.api().resizeVolume(
|
_adapter.api().resizeVolume(
|
||||||
volume.name,
|
volume.uuid!,
|
||||||
size,
|
size.gibibyte.toInt(),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -157,7 +157,9 @@ class _ExtendingVolumePageState extends State<ExtendingVolumePage> {
|
||||||
: () {
|
: () {
|
||||||
context.read<ApiProviderVolumeCubit>().resizeVolume(
|
context.read<ApiProviderVolumeCubit>().resizeVolume(
|
||||||
widget.diskVolumeToResize,
|
widget.diskVolumeToResize,
|
||||||
DiskSize.fromGibibyte(_currentSliderGbValue),
|
DiskSize.fromGibibyte(
|
||||||
|
_currentSliderGbValue.truncate().toDouble(),
|
||||||
|
),
|
||||||
context.read<ApiServerVolumeCubit>().reload,
|
context.read<ApiServerVolumeCubit>().reload,
|
||||||
);
|
);
|
||||||
context.router.popUntilRoot();
|
context.router.popUntilRoot();
|
||||||
|
|
|
@ -45,8 +45,11 @@ class StorageCard extends StatelessWidget {
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
child: InkResponse(
|
child: InkResponse(
|
||||||
highlightShape: BoxShape.rectangle,
|
highlightShape: BoxShape.rectangle,
|
||||||
onTap: () =>
|
|
||||||
context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)),
|
/// TODO: when 'isEmpty' replace with a skeleton
|
||||||
|
onTap: () => diskStatus.diskVolumes.isEmpty
|
||||||
|
? null
|
||||||
|
: context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
Loading…
Reference in a new issue