Skip to content

Commit

Permalink
improvements: updated saved changes button in chat listing form, adde…
Browse files Browse the repository at this point in the history
…d blog link to nav
  • Loading branch information
tiller1010 committed Apr 30, 2024
1 parent 5b51dd0 commit cbc53c5
Show file tree
Hide file tree
Showing 17 changed files with 45,691 additions and 35,584 deletions.
2 changes: 1 addition & 1 deletion js/components/ForgotPasswordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
2 changes: 1 addition & 1 deletion js/components/LessonSearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
14 changes: 13 additions & 1 deletion js/components/Navigation.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faPlus, faHome, faPlay, faUser, faComments, faBook
faPlus,
faHome,
faPlay,
faUser,
faComments,
faBook,
faNewspaper,
} from '@fortawesome/free-solid-svg-icons';

class Navigation extends React.Component {
Expand Down Expand Up @@ -38,6 +44,12 @@ class Navigation extends React.Component {
<FontAwesomeIcon icon={faComments}/>
</a>
</div>
<div className="small-pad">
<a href="https://blog.lingualearn.net" target="_blank" rel="noopener" className="button">
<span>Blog</span>
<FontAwesomeIcon icon={faNewspaper}/>
</a>
</div>
<div className="small-pad">
<a href="/account-profile" className="button">
<span>Account Profile</span>
Expand Down
2 changes: 1 addition & 1 deletion js/components/PremiumVideoChatListing.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
2 changes: 1 addition & 1 deletion js/components/PremiumVideoChatListingFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
17 changes: 12 additions & 5 deletions js/components/PremiumVideoChatListingForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down Expand Up @@ -313,7 +313,7 @@ var PremiumVideoChatListingForm = /** @class */ (function (_super) {
};
PremiumVideoChatListingForm.prototype.render = function () {
var _this = this;
var _a = this.state, topic = _a.topic, languageOfTopic = _a.languageOfTopic, duration = _a.duration, price = _a.price, currency = _a.currency, thumbnailSrc = _a.thumbnailSrc, timeSlots = _a.timeSlots, savedPremiumVideoChatListing = _a.savedPremiumVideoChatListing;
var _a = this.state, topic = _a.topic, languageOfTopic = _a.languageOfTopic, duration = _a.duration, price = _a.price, currency = _a.currency, thumbnailSrc = _a.thumbnailSrc, timeSlots = _a.timeSlots, savedPremiumVideoChatListing = _a.savedPremiumVideoChatListing, savedAllChanges = _a.savedAllChanges;
price = price.toFixed(2);
var user = this.props.user;
return (React.createElement("div", { className: "pure-g" },
Expand Down Expand Up @@ -367,9 +367,16 @@ var PremiumVideoChatListingForm = /** @class */ (function (_super) {
"Thumbnail",
React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUpload }))),
React.createElement("div", null,
React.createElement("button", { className: "button", onClick: this.handleSubmit, disabled: this.state.savedAllChanges },
this.state.savedAllChanges ? 'Saved' : 'Save',
React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faCheck })))))),
savedAllChanges ?
''
:
React.createElement("p", { style: { color: 'red' } }, "YOU HAVE UNSAVED CHANGES"),
React.createElement("button", { className: "button", onClick: this.handleSubmit, disabled: savedAllChanges, style: savedAllChanges ? {} : { padding: '10px 15px' } }, savedAllChanges ?
React.createElement(React.Fragment, null,
"Saved",
React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faCheck }))
:
'Save Now'))))),
React.createElement("div", { className: "pure-u-1 flex-container flex-horizontal-center" }, savedPremiumVideoChatListing ?
React.createElement("div", { className: "desktop-100" },
React.createElement("h3", null, "Your saved Video Chat Listing"),
Expand Down
20 changes: 16 additions & 4 deletions js/components/PremiumVideoChatListingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ export default class PremiumVideoChatListingForm extends React.Component<Premium
currency,
thumbnailSrc,
timeSlots,
savedPremiumVideoChatListing
savedPremiumVideoChatListing,
savedAllChanges,
} = this.state;

price = price.toFixed(2);
Expand Down Expand Up @@ -429,9 +430,20 @@ export default class PremiumVideoChatListingForm extends React.Component<Premium
</div>

<div>
<button className="button" onClick={this.handleSubmit} disabled={this.state.savedAllChanges}>
{this.state.savedAllChanges ? 'Saved' : 'Save'}
<FontAwesomeIcon icon={faCheck}/>
{savedAllChanges ?
''
:
<p style={{ color: 'red' }}>YOU HAVE UNSAVED CHANGES</p>
}
<button className="button" onClick={this.handleSubmit} disabled={savedAllChanges} style={savedAllChanges ? {} : { padding: '10px 15px' }}>
{savedAllChanges ?
<>
Saved
<FontAwesomeIcon icon={faCheck}/>
</>
:
'Save Now'
}
</button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion js/components/Product.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
2 changes: 1 addition & 1 deletion js/components/ProfileEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
2 changes: 1 addition & 1 deletion js/components/UserFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
2 changes: 1 addition & 1 deletion js/components/VideoChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
2 changes: 1 addition & 1 deletion js/components/VideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
Expand Down
Loading

0 comments on commit cbc53c5

Please sign in to comment.