-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commented out a lot of template components that I'm not currently using
- Loading branch information
1 parent
ab2d67e
commit 4ea2d28
Showing
6 changed files
with
66 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
export default { | ||
TOGGLE_LOADING (state) { | ||
state.callingAPI = !state.callingAPI | ||
TOGGLE_LOADING(state) { | ||
state.callingAPI = !state.callingAPI; | ||
}, | ||
TOGGLE_SEARCHING (state) { | ||
state.searching = (state.searching === '') ? 'loading' : '' | ||
TOGGLE_SEARCHING(state) { | ||
state.searching = state.searching === "" ? "loading" : ""; | ||
}, | ||
SET_USER (state, user) { | ||
state.user = user | ||
SET_USER(state, user) { | ||
state.user = user; | ||
}, | ||
SET_TOKEN (state, token) { | ||
state.token = token | ||
SET_TOKEN(state, token) { | ||
state.token = token; | ||
}, | ||
|
||
SET_MENU (state, newMenuState) { | ||
state.menuState = newMenuState | ||
SET_MENU(state, newMenuState) { | ||
state.menuState = newMenuState; | ||
}, | ||
|
||
SET_OWNED_DEVICES (state, newOwnedDevicesState) { | ||
state.ownedDevices = newOwnedDevicesState | ||
SET_OWNED_DEVICES(state, newOwnedDevicesState) { | ||
state.ownedDevices = newOwnedDevicesState; | ||
}, | ||
SET_RENTED_DEVICES (state, newRentedDevicesState) { | ||
state.rentedDevices = newRentedDevicesState | ||
SET_RENTED_DEVICES(state, newRentedDevicesState) { | ||
state.rentedDevices = newRentedDevicesState; | ||
}, | ||
|
||
SET_USER_ID (state, userData) { | ||
if(userData === 'Not Logged In') | ||
state.userInfo.GUID = 'Not Logged In' | ||
SET_USER_ID(state, userData) { | ||
if (userData === "Not Logged In") state.userInfo.GUID = "Not Logged In"; | ||
else { | ||
state.userInfo.GUID = userData.user._id.toString() | ||
state.userInfo.token = userData.token | ||
state.userInfo.GUID = userData.user._id.toString(); | ||
state.userInfo.token = userData.token; | ||
state.userInfo.username = userData.user.username; | ||
} | ||
}, | ||
|
||
UPDATE_MODAL (state, newModalData) { | ||
state.modal = newModalData | ||
UPDATE_MODAL(state, newModalData) { | ||
state.modal = newModalData; | ||
|
||
// Show the modal based on the state. | ||
if (state.modal.show) { | ||
$('.appModal').modal('show') | ||
$('.appModal').modal('handleUpdate') | ||
$(".appModal").modal("show"); | ||
$(".appModal").modal("handleUpdate"); | ||
} else { | ||
$('.appModal').modal('hide') | ||
$(".appModal").modal("hide"); | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters