Branding
This commit is contained in:
parent
c3802c72d1
commit
213e5a88f1
|
@ -359,7 +359,7 @@ public class PrimaryController {
|
|||
})
|
||||
)
|
||||
.onErrorResume(error -> MonoFxUtils.runLater(() -> {
|
||||
var alert = new Alert(AlertType.ERROR, "Error during transfer", ButtonType.CLOSE);
|
||||
var alert = new Alert(AlertType.ERROR, "Error during users addition", ButtonType.CLOSE);
|
||||
alert.setContentText(error.getLocalizedMessage());
|
||||
return MonoFxUtils.showAndWait(alert);
|
||||
}).then())
|
||||
|
|
|
@ -2,8 +2,8 @@ package it.cavallium;
|
|||
|
||||
public class StaticSettings {
|
||||
|
||||
public static final String BRANDING_NAME = "TransferBot";
|
||||
public static final boolean REMOVE_MEMBERS_FROM_SOURCE_SUPERGROUP = true;
|
||||
public static final String BRANDING_NAME = "P4RALLEL ADDER";
|
||||
public static final boolean REMOVE_MEMBERS_FROM_SOURCE_SUPERGROUP = false;
|
||||
|
||||
public static boolean requiresAdminPrivilegesOnSourceSupergroup() {
|
||||
return REMOVE_MEMBERS_FROM_SOURCE_SUPERGROUP;
|
||||
|
|
|
@ -309,7 +309,7 @@ public class TransferServiceImpl implements TransferService {
|
|||
|
||||
return percentageConsumer
|
||||
.apply(0)
|
||||
.then(phaseDescriptionConsumer.apply("Transfer from " + sourceGroup.getTitle() + " to " + destGroup.getTitle()))
|
||||
.then(phaseDescriptionConsumer.apply("Add users from " + sourceGroup.getTitle() + " to " + destGroup.getTitle()))
|
||||
|
||||
// Check and get the set of userbots that can transfer users from group X to group Y
|
||||
.then(phaseDescriptionConsumer.apply("Checking available userbots for " + (REMOVE_MEMBERS_FROM_SOURCE_SUPERGROUP ? "removing" : "managing") + " users in the source group"))
|
||||
|
@ -514,7 +514,7 @@ public class TransferServiceImpl implements TransferService {
|
|||
|
||||
// Transfer users
|
||||
.flatMap(context -> {
|
||||
return phaseDescriptionConsumer.apply("Transferring users")
|
||||
return phaseDescriptionConsumer.apply("Adding users")
|
||||
.then(percentageConsumer.apply(20)).thenReturn(context);
|
||||
})
|
||||
.flatMap(context -> {
|
||||
|
@ -587,7 +587,7 @@ public class TransferServiceImpl implements TransferService {
|
|||
|
||||
|
||||
.doOnNext(context -> {
|
||||
App.getLogService().append(Level.INFO, "Transfer done. Transferred " + transferredSuccessfullyUsersStats.get() + "/" + context.element3 + " users");
|
||||
App.getLogService().append(Level.INFO, "Users added. Added " + transferredSuccessfullyUsersStats.get() + "/" + context.element3 + " users");
|
||||
})
|
||||
|
||||
.then(percentageConsumer.apply(100))
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
</BorderPane>
|
||||
<BorderPane>
|
||||
<top>
|
||||
<Label alignment="CENTER" prefWidth="-1.0" style=" " text="Transfer" textAlignment="CENTER" wrapText="false" BorderPane.alignment="CENTER">
|
||||
<Label alignment="CENTER" prefWidth="-1.0" style=" " text="Current operation management" textAlignment="CENTER" wrapText="false" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="18.0" fx:id="x11" />
|
||||
</font>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<children>
|
||||
<ChoiceBox fx:id="sourceGroupCombo" minWidth="200.0" prefHeight="28.0" />
|
||||
<ChoiceBox fx:id="destGroupCombo" minWidth="200.0" prefHeight="28.0" />
|
||||
<Button fx:id="transferBtn" mnemonicParsing="false" onAction="#onDoTransfer" text="Transfer" />
|
||||
<Button fx:id="transferBtn" mnemonicParsing="false" onAction="#onDoTransfer" text="Add users" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
|
|
Loading…
Reference in New Issue