Skip to content

Commit

Permalink
Merge pull request #219 from amrut-prabhu/theme
Browse files Browse the repository at this point in the history
Change Theme of app
  • Loading branch information
yash-chowdhary committed Apr 11, 2018
2 parents 5ab38ff + 5efb51f commit e3eade7
Show file tree
Hide file tree
Showing 27 changed files with 141 additions and 131 deletions.
1 change: 0 additions & 1 deletion docs/UserGuide.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
= Club Connect - User Guide
[.text-center]
:toc:
:toc-title:
:toc-placement: preamble
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/club/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/
public class MainApp extends Application {

public static final Version VERSION = new Version(1, 4, 0, true);
public static final Version VERSION = new Version(1, 5, 0, true);

private static final Logger logger = LogsCenter.getLogger(MainApp.class);

Expand Down
14 changes: 6 additions & 8 deletions src/main/java/seedu/club/commons/core/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ public class Messages {
public static final String MESSAGE_INVALID_MEMBER_FORMAT = "Invalid member format! \n%1$s";
public static final String MESSAGE_INVALID_MEMBER_DISPLAYED_INDEX = "The member index provided is invalid.";
public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX = "The task index provided is invalid.";
public static final String MESSAGE_MEMBERS_LISTED_OVERVIEW = "%1$d members listed!";
public static final String MESSAGE_MEMBERS_LISTED_OVERVIEW = "%1$d members listed.";
public static final String MESSAGE_NON_EXISTENT_GROUP = "The group \'%1$s\' does not exist in the Club Book.";
public static final String MESSAGE_MANDATORY_GROUP = "The group \'%1$s\' cannot be deleted as "
+ "it is a mandatory group.";
public static final String MESSAGE_INVALID_POLL_DISPLAYED_INDEX = "The poll index provided is invalid";
public static final String MESSAGE_INVALID_POLL_DISPLAYED_INDEX = "The poll index provided is invalid.";
public static final String MESSAGE_INVALID_ANSWER_DISPLAYED_INDEX = "The answer index provided is invalid.";
public static final String MESSAGE_INVALID_PHOTO_PATH = "Unable to read profile photo from the path: %1$s";
public static final String MESSAGE_SAME_PHOTO_PATH = "Profile photo path entered is same as the current photo";
public static final String MESSAGE_REQUIRE_LOG_IN = "Please log in to Club Connect.";
public static final String MESSAGE_REQUIRE_SIGN_UP = "Please sign up to use Club Connect";
public static final String MESSAGE_REQUIRE_EXCO_LOG_IN = "You need to be an exco to use these features";
public static final String MESSAGE_REQUIRE_LOG_OUT = "Please logout before using the login feature";
public static final String MESSAGE_REQUIRE_LOG_IN = "Please log in to Club Connect to use this feature.";
public static final String MESSAGE_REQUIRE_SIGN_UP = "Please sign up to use Club Connect.";
public static final String MESSAGE_REQUIRE_EXCO_LOG_IN = "You need to be an Exco member to use this feature.";
public static final String MESSAGE_REQUIRE_LOG_OUT = "Please logout before logging in to another account.";
}
2 changes: 1 addition & 1 deletion src/main/java/seedu/club/logic/commands/SignUpCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class SignUpCommand extends Command {
Arrays.asList(COMMAND_WORD, "register", "enroll")
);

public static final String COMMAND_FORMAT = COMMAND_WORD + " n/ p/ e/ m/ [pic/ ] ";
public static final String COMMAND_FORMAT = COMMAND_WORD + " n/ p/ e/ m/ [t/]";

public static final String MESSAGE_SUCCESS = "Sign up successful! Please log in with your matriculation number"
+ " and password to start using Club Connect.";
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/club/model/ClubBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ private void deleteTagFromMember(Tag tag, Member member) throws MemberNotFoundEx
}

Member newMember = new Member(member.getName(), member.getPhone(), member.getEmail(), member.getMatricNumber(),
member.getGroup(), memberTags);
member.getGroup(), memberTags, member.getCredentials(), member.getProfilePhoto());
try {
updateMember(member, newMember);
} catch (DuplicateMatricNumberException dme) {
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/seedu/club/model/poll/Question.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
*/
public class Question {

public static final String MESSAGE_QUESTION_CONSTRAINTS = "Questions may not be empty";
public static final String MESSAGE_QUESTION_CONSTRAINTS = "You need a question for the poll.";
public static final String QUESTION_VALIDATION_REGEX = ".*\\S.*";
public static final String PREFIX_QUESTION = "Qn: ";

private String value;

Expand Down Expand Up @@ -42,6 +41,6 @@ public int hashCode() {

@Override
public String toString() {
return PREFIX_QUESTION + value;
return value;
}
}
2 changes: 1 addition & 1 deletion src/main/java/seedu/club/ui/AnswerCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class AnswerCard extends UiPart<Region> {

private static final String FXML = "AnswerListCard.fxml";
private static final String DESCRIPTION_VOTE_COUNT = "Vote Count: ";
private static final String DESCRIPTION_VOTE_COUNT = "Votes: ";
private static final String PERCENTAGE_SYMBOL = "%";
private final int totalVoteCount;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/club/ui/MemberCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class MemberCard extends UiPart<Region> {
private static final String[] TAG_COLORS = {"red", "yellow", "grey", "brown", "pink", "white",
"orange", "blue", "violet"};
//@@author amrut-prabhu
private static final Integer PHOTO_WIDTH = 90;
private static final Integer PHOTO_HEIGHT = 120;
private static final Integer PHOTO_WIDTH = 100;
private static final Integer PHOTO_HEIGHT = 130;
private static final String DEFAULT_PHOTO_PATH = "/images/defaultProfilePhoto.png";
private static final String EMPTY_STRING = "";

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/club/ui/MemberOverviewPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ private void loadMemberPage(Member member) {
group.setText(member.getGroup().groupName);
group.setAlignment(Pos.CENTER);
createTags(member);
setIcons();
//setIcons();
}

/**
* Set Icon pictures
*/
private void setIcons() {
/*private void setIcons() {
Image phoneImg;
Image emailImg;
phoneImg = new Image(MainApp.class.getResourceAsStream(PHONE_ICON),
Expand All @@ -241,7 +241,7 @@ private void setIcons() {
emailImg = new Image(MainApp.class.getResourceAsStream(EMAIL_ICON),
21, 21, false, true);
emailIcon.setImage(emailImg);
}
}*/
//@@author

//@@author yash-chowdhary
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/club/ui/PollCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class PollCard extends UiPart<Region> {

private static final String FXML = "PollListCard.fxml";
private static final String DESCRIPTION_TOTAL_VOTE_COUNT = "Total Vote Count: ";
private static final String DESCRIPTION_TOTAL_VOTE_COUNT = "Total Votes: ";

public final Poll poll;

Expand Down
15 changes: 12 additions & 3 deletions src/main/java/seedu/club/ui/StatusBarFooter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package seedu.club.ui;

import java.io.File;
import java.io.IOException;
import java.time.Clock;
import java.util.Date;
import java.util.logging.Logger;
Expand All @@ -19,8 +21,9 @@
*/
public class StatusBarFooter extends UiPart<Region> {

public static final String SYNC_STATUS_INITIAL = "Not updated yet in this session";
public static final String SYNC_STATUS_UPDATED = "Last Updated: %s";
public static final String SYNC_STATUS_INITIAL = "Not updated Club Connect yet in this session";
public static final String SYNC_STATUS_UPDATED = "Last Updated Club Connect at: %s";
public static final String SAVE_LOCATION = "Data saved in %s";

/**
* Used to generate time stamps.
Expand Down Expand Up @@ -64,7 +67,13 @@ public static Clock getClock() {
}

private void setSaveLocation(String location) {
Platform.runLater(() -> this.saveLocationStatus.setText(location));
try {
String saveFileLocation = new File(location).getCanonicalPath();
Platform.runLater(() -> this.saveLocationStatus.setText(String.format(SAVE_LOCATION, saveFileLocation)));
} catch (IOException ioe) {
String saveFileLocation = new File(location).getAbsolutePath();
Platform.runLater(() -> this.saveLocationStatus.setText(String.format(SAVE_LOCATION, saveFileLocation)));
}
}

private void setSyncStatus(String status) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/view/AnswerListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
</columnConstraints>
<VBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308" minHeight="33.0" prefHeight="106.0" prefWidth="213.0" GridPane.columnIndex="0">
<padding>
<Insets bottom="5" left="15" right="5" top="5" />
<Insets bottom="5" left="15" right="5" top="2" />
</padding>
<HBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308" prefHeight="65.0" prefWidth="135.0" spacing="5" VBox.vgrow="ALWAYS">
<Label fx:id="choice" maxHeight="1.7976931348623157E308" styleClass="cell_big_label" wrapText="true">
<minWidth>
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
<Label fx:id="answerValue" maxHeight="1.7976931348623157E308" wrapText="true" />
<Label fx:id="answerValue" styleClass="cell_big_label" maxHeight="1.7976931348623157E308" wrapText="true" />
</HBox>
<VBox maxHeight="1.7976931348623157E308">
<children>
<Label fx:id="voteCount" maxHeight="1.7976931348623157E308" styleClass="cell_big_label">
<Label fx:id="voteCount" maxHeight="1.7976931348623157E308" styleClass="cell_small_label">
<minWidth>
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
Expand All @@ -43,7 +43,7 @@
<HBox.margin>
<Insets />
</HBox.margin></ProgressBar>
<Label fx:id="votePercentage" alignment="TOP_LEFT" styleClass="cell_big_label">
<Label fx:id="votePercentage" alignment="TOP_LEFT" styleClass="cell_small_label">
<minWidth>
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
Expand Down

0 comments on commit e3eade7

Please sign in to comment.