Ignore:
Timestamp:
05/27/19 16:12:05 (5 years ago)
Author:
bln4
Message:

Added further instructions for adding contact information from another user.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/Actions.java

    r1384 r1385  
    55import java.io.FileNotFoundException;
    66import java.io.IOException;
     7import java.net.MalformedURLException;
     8import java.net.URI;
     9import java.net.URISyntaxException;
     10import java.net.URL;
    711import java.nio.file.Files;
    812import java.nio.file.Path;
     
    223227                return sb.toString();
    224228        }
     229        public static void AuthAddContactDetails() {
     230                MessageBay.displayMessage("If a user has sent their contact details to you, running this action again with their username attached to your cursor will display instructions to adding those details to your contacts directory.");
     231        }
     232        public static String AuthAddContactDetails(String username) {
     233                StringBuilder sb = new StringBuilder();
     234                String nl = System.getProperty("line.separator");
     235                String me = UserSettings.UserName.get();
     236                String driveSharedWithMeString = "https://drive.google.com/drive/shared-with-me";
     237                try {
     238                        URI driveSharedWithMeURL = new URL(driveSharedWithMeString).toURI();
     239                        Desktop.getDesktop().browse(driveSharedWithMeURL);
     240                        sb.append("1. We have opened Google Drive to the 'Shared With Me' page in your browser.  Right click on " + username + "-credentials and click on 'Add To My Drive'." + nl);
     241                } catch (IOException | URISyntaxException e) {
     242                        sb.append("1. Open your web browser to " + driveSharedWithMeString + ".  Right click on " + username + "-credentials and click on 'Add To My Drive'." + nl);
     243                }
     244               
     245                sb.append("2. Click organise and navigate the dialog to resources-" + me + "/contacts and click the 'Move Here' button to relocate your copy of " + username + "'s credentials folder.");
     246               
     247                return sb.toString();
     248        }
    225249        //      End Making Contacts Actions
    226250       
Note: See TracChangeset for help on using the changeset viewer.