فهرست منبع

add anonymous login button to remote server login dialog

Felix Paul Kühne 9 سال پیش
والد
کامیت
74cf1109b2

+ 8 - 0
Apple-TV/VLCServerListTVViewController.m

@@ -233,6 +233,14 @@
                                                           handler:^(UIAlertAction * _Nonnull action) {
                                                               [SSKeychain deletePasswordForService:serviceIdentifier account:accountName];
                                                           }]];
+    } else {
+        [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_ANONYMOUS_LOGIN", nil)
+                                                            style:UIAlertActionStyleDefault
+                                                          handler:^(UIAlertAction * _Nonnull action) {
+                                                              login.username = nil;
+                                                              login.password = nil;
+                                                              [self showBrowserWithLogin:login];
+                                                          }]];
     }
 
     [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_CANCEL", nil)

BIN
Resources/de.lproj/Localizable.strings


+ 1 - 0
Resources/en.lproj/Localizable.strings

@@ -143,6 +143,7 @@
 "USER_LABEL"="User";
 "PASSWORD_LABEL"="Password";
 "DISABLE_LABEL"="Disable";
+"BUTTON_ANONYMOUS_LOGIN"="Anonymous Login";
 
 "LOCAL_SERVER_REFRESH"="Refresh";
 "LOCAL_SERVER_LAST_UPDATE"="Last Updated on %@";

+ 2 - 2
SharedSources/ServerBrowsing/General/VLCNetworkServerLoginInformation.h

@@ -15,8 +15,8 @@
 
 NS_ASSUME_NONNULL_BEGIN
 @interface VLCNetworkServerLoginInformation : NSObject <VLCNetworkServerLoginInformation>
-@property (nonatomic) NSString *username;
-@property (nonatomic) NSString *password;
+@property (nonatomic, nullable) NSString *username;
+@property (nonatomic, nullable) NSString *password;
 @property (nonatomic) NSString *address;
 @property (nonatomic) NSNumber *port;
 @property (nonatomic) NSString *protocolIdentifier;