Skip to content

Commit

Permalink
update_08
Browse files Browse the repository at this point in the history
  • Loading branch information
Lungsangg committed Nov 29, 2024
1 parent bbc7932 commit a9105ee
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 33 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ RUN python -m pip show Pillow
COPY ./node ./node
COPY ./static/js ./static/js

RUN npm run setup
RUN npm run build-prod
# Copy prebuilt Webpack bundles into the Docker image
COPY static/bundles/ /app/static/bundles/


# Copy application source code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21699,7 +21699,7 @@ var TopicCategory = function TopicCategory(_ref) {
sidebarModules.unshift({
type: "TitledText",
props: {
enTitle: "About",
enTitle: sefaria._("common.about"),
heTitle: sefaria._("common.about"),
enText: topicData.description.en,
heText: topicData.description.he
Expand Down Expand Up @@ -21991,6 +21991,7 @@ var TopicPage = function TopicPage(_ref8) {
var clearAndSetTopic = function clearAndSetTopic(topic, topicTitle) {
setTopic(topic, topicTitle);
};
console.log("topic : ", topicData);

// Initial Topic Data, updates when `topic` changes
(0,external_React_.useEffect)(function () {
Expand Down Expand Up @@ -22249,6 +22250,7 @@ var TopicPageTab = function TopicPageTab(_ref15) {
initialRenderSize = _ref15.initialRenderSize,
onSetTopicSort = _ref15.onSetTopicSort,
topicSort = _ref15.topicSort;
console.log("data : ", data);
return /*#__PURE__*/external_React_default().createElement("div", {
className: "topicTabContents"
}, !!data ? /*#__PURE__*/external_React_default().createElement("div", {
Expand Down Expand Up @@ -28274,9 +28276,9 @@ var InterfaceText = function InterfaceText(_ref4) {
className: 'reactMarkdown',
unwrapDisallowed: true,
disallowedElements: ['p'].concat(Misc_toConsumableArray(disallowedMarkdownElements))
}, textResponse)) : /*#__PURE__*/external_React_default().createElement("span", {
}, " ", textResponse)) : /*#__PURE__*/external_React_default().createElement("span", {
className: elemclasses
}, textResponse);
}, " ", textResponse);
};
InterfaceText.propTypes = {
//Makes sure that children passed in are either a single string, or an array consisting only of <EnglishText>, <HebrewText>
Expand Down Expand Up @@ -30973,7 +30975,12 @@ var SignUpModal = /*#__PURE__*/function (_Component20) {
var modalContent = !this.props.modalContentKind ? generateContentForModal() : generateContentForModal(this.props.modalContentKind);
var innerContent = modalContent.contentList.map(function (bullet) {
return /*#__PURE__*/external_React_default().createElement("div", {
key: bullet.icon
key: bullet.icon,
style: {
display: 'flex',
alignItems: 'center',
gap: '8px'
}
}, /*#__PURE__*/external_React_default().createElement("img", {
src: "/static/img/".concat(bullet.icon)
}), /*#__PURE__*/external_React_default().createElement(InterfaceText, null, bullet.bulletContent));
Expand Down Expand Up @@ -34986,13 +34993,14 @@ var AboutSheet = function AboutSheet(_ref) {
slug: tag.slug
};
});
console.log("topic: ", topics);
updatedSheet.topics = topics;
updatedSheet.lastModified = lastModified;
delete updatedSheet._id;
delete updatedSheet.error;
postJSON = JSON.stringify(updatedSheet);
postSheet(postJSON);
case 10:
case 11:
case "end":
return _context.stop();
}
Expand Down Expand Up @@ -35120,7 +35128,6 @@ var AboutSheet = function AboutSheet(_ref) {
"json": postJSON
}, function (data) {
if (data.id) {
console.log('saved...');
setLastModified(data.dateModified);
sefaria.sheets._loadSheetByID[data.id] = data;
} else {
Expand Down Expand Up @@ -35207,9 +35214,9 @@ var AboutSheet = function AboutSheet(_ref) {
className: "publishButton"
}, /*#__PURE__*/React.createElement("div", {
className: "publishedText"
}, /*#__PURE__*/React.createElement(InterfaceText, null, sefaria._("sheet.your_sheet_is"), /*#__PURE__*/React.createElement("span", {
}, sefaria._("sheet.your_sheet_is"), /*#__PURE__*/React.createElement("span", {
className: "publishedTextBold"
}, sefaria._("sheet.published"), " "), " ", sefaria._("topic.visible_to_other"))), /*#__PURE__*/React.createElement("button", {
}, sefaria._("sheet.published"), " "), " ", sefaria._("topic.visible_to_other")), /*#__PURE__*/React.createElement("button", {
className: "button published",
onClick: togglePublish
}, /*#__PURE__*/React.createElement(InterfaceText, null, "unpublish"))) : null);
Expand Down Expand Up @@ -61699,6 +61706,7 @@ var CommunityPage = function CommunityPage(_ref) {
} else {
featuredContent = /*#__PURE__*/external_React_default().createElement(LoadingMessage, null);
}
console.log("load data from recentlyPUblished component");
return /*#__PURE__*/external_React_default().createElement("div", {
className: "readerNavMenu communityPage sans-serif",
key: "0"
Expand All @@ -61721,11 +61729,10 @@ CommunityPage.propTypes = {
var RecentlyPublished = function RecentlyPublished(_ref2) {
var multiPanel = _ref2.multiPanel,
toggleSignUpModal = _ref2.toggleSignUpModal;
var options = sefaria.interfaceLang === "hebrew" ? {
"lang": "hebrew"
} : {};
// const options = Sefaria.interfaceLang === "hebrew" ? {"lang": "hebrew"} : {};
var options = {};
// options["filtered"] = true;
var pageSize = 18;
var pageSize = 10;
var _useState3 = (0,external_React_.useState)(0),
_useState4 = CommunityPage_slicedToArray(_useState3, 2),
nSheetsLoaded = _useState4[0],
Expand All @@ -61747,7 +61754,7 @@ var RecentlyPublished = function RecentlyPublished(_ref2) {
var newSheets = recentSheets ? recentSheets.concat(collapsedSheets) : collapsedSheets;
setRecentSheets(newSheets);
setNSheetsLoded(nSheetsLoaded + pageSize);
if (collapsedSheets.length < until) {
if (collapsedSheets.length < until && collapsedSheets.length !== 0) {
loadMore(null, until - collapsedSheets.length);
}
});
Expand Down Expand Up @@ -191624,4 +191631,4 @@ var SefariaReact = __webpack_require__(/*! ./ReaderApp */ "./ReaderApp.jsx");

/******/ })()
;
//# sourceMappingURL=client-7e483c87d2b1c812ef50.js.map
//# sourceMappingURL=client-d7a22e490f6066c40e0b.js.map
Original file line number Diff line number Diff line change
Expand Up @@ -21699,7 +21699,7 @@ var TopicCategory = function TopicCategory(_ref) {
sidebarModules.unshift({
type: "TitledText",
props: {
enTitle: "About",
enTitle: sefaria._("common.about"),
heTitle: sefaria._("common.about"),
enText: topicData.description.en,
heText: topicData.description.he
Expand Down Expand Up @@ -21991,6 +21991,7 @@ var TopicPage = function TopicPage(_ref8) {
var clearAndSetTopic = function clearAndSetTopic(topic, topicTitle) {
setTopic(topic, topicTitle);
};
console.log("topic : ", topicData);

// Initial Topic Data, updates when `topic` changes
(0,external_React_.useEffect)(function () {
Expand Down Expand Up @@ -22249,6 +22250,7 @@ var TopicPageTab = function TopicPageTab(_ref15) {
initialRenderSize = _ref15.initialRenderSize,
onSetTopicSort = _ref15.onSetTopicSort,
topicSort = _ref15.topicSort;
console.log("data : ", data);
return /*#__PURE__*/external_React_default().createElement("div", {
className: "topicTabContents"
}, !!data ? /*#__PURE__*/external_React_default().createElement("div", {
Expand Down Expand Up @@ -28274,9 +28276,9 @@ var InterfaceText = function InterfaceText(_ref4) {
className: 'reactMarkdown',
unwrapDisallowed: true,
disallowedElements: ['p'].concat(Misc_toConsumableArray(disallowedMarkdownElements))
}, textResponse)) : /*#__PURE__*/external_React_default().createElement("span", {
}, " ", textResponse)) : /*#__PURE__*/external_React_default().createElement("span", {
className: elemclasses
}, textResponse);
}, " ", textResponse);
};
InterfaceText.propTypes = {
//Makes sure that children passed in are either a single string, or an array consisting only of <EnglishText>, <HebrewText>
Expand Down Expand Up @@ -30973,7 +30975,12 @@ var SignUpModal = /*#__PURE__*/function (_Component20) {
var modalContent = !this.props.modalContentKind ? generateContentForModal() : generateContentForModal(this.props.modalContentKind);
var innerContent = modalContent.contentList.map(function (bullet) {
return /*#__PURE__*/external_React_default().createElement("div", {
key: bullet.icon
key: bullet.icon,
style: {
display: 'flex',
alignItems: 'center',
gap: '8px'
}
}, /*#__PURE__*/external_React_default().createElement("img", {
src: "/static/img/".concat(bullet.icon)
}), /*#__PURE__*/external_React_default().createElement(InterfaceText, null, bullet.bulletContent));
Expand Down Expand Up @@ -34986,13 +34993,14 @@ var AboutSheet = function AboutSheet(_ref) {
slug: tag.slug
};
});
console.log("topic: ", topics);
updatedSheet.topics = topics;
updatedSheet.lastModified = lastModified;
delete updatedSheet._id;
delete updatedSheet.error;
postJSON = JSON.stringify(updatedSheet);
postSheet(postJSON);
case 10:
case 11:
case "end":
return _context.stop();
}
Expand Down Expand Up @@ -35120,7 +35128,6 @@ var AboutSheet = function AboutSheet(_ref) {
"json": postJSON
}, function (data) {
if (data.id) {
console.log('saved...');
setLastModified(data.dateModified);
sefaria.sheets._loadSheetByID[data.id] = data;
} else {
Expand Down Expand Up @@ -35207,9 +35214,9 @@ var AboutSheet = function AboutSheet(_ref) {
className: "publishButton"
}, /*#__PURE__*/React.createElement("div", {
className: "publishedText"
}, /*#__PURE__*/React.createElement(InterfaceText, null, sefaria._("sheet.your_sheet_is"), /*#__PURE__*/React.createElement("span", {
}, sefaria._("sheet.your_sheet_is"), /*#__PURE__*/React.createElement("span", {
className: "publishedTextBold"
}, sefaria._("sheet.published"), " "), " ", sefaria._("topic.visible_to_other"))), /*#__PURE__*/React.createElement("button", {
}, sefaria._("sheet.published"), " "), " ", sefaria._("topic.visible_to_other")), /*#__PURE__*/React.createElement("button", {
className: "button published",
onClick: togglePublish
}, /*#__PURE__*/React.createElement(InterfaceText, null, "unpublish"))) : null);
Expand Down Expand Up @@ -61699,6 +61706,7 @@ var CommunityPage = function CommunityPage(_ref) {
} else {
featuredContent = /*#__PURE__*/external_React_default().createElement(LoadingMessage, null);
}
console.log("load data from recentlyPUblished component");
return /*#__PURE__*/external_React_default().createElement("div", {
className: "readerNavMenu communityPage sans-serif",
key: "0"
Expand All @@ -61721,11 +61729,10 @@ CommunityPage.propTypes = {
var RecentlyPublished = function RecentlyPublished(_ref2) {
var multiPanel = _ref2.multiPanel,
toggleSignUpModal = _ref2.toggleSignUpModal;
var options = sefaria.interfaceLang === "hebrew" ? {
"lang": "hebrew"
} : {};
// const options = Sefaria.interfaceLang === "hebrew" ? {"lang": "hebrew"} : {};
var options = {};
// options["filtered"] = true;
var pageSize = 18;
var pageSize = 10;
var _useState3 = (0,external_React_.useState)(0),
_useState4 = CommunityPage_slicedToArray(_useState3, 2),
nSheetsLoaded = _useState4[0],
Expand All @@ -61747,7 +61754,7 @@ var RecentlyPublished = function RecentlyPublished(_ref2) {
var newSheets = recentSheets ? recentSheets.concat(collapsedSheets) : collapsedSheets;
setRecentSheets(newSheets);
setNSheetsLoded(nSheetsLoaded + pageSize);
if (collapsedSheets.length < until) {
if (collapsedSheets.length < until && collapsedSheets.length !== 0) {
loadMore(null, until - collapsedSheets.length);
}
});
Expand Down Expand Up @@ -191624,4 +191631,4 @@ var SefariaReact = __webpack_require__(/*! ./ReaderApp */ "./ReaderApp.jsx");

/******/ })()
;
//# sourceMappingURL=client-7e483c87d2b1c812ef50.js.map
//# sourceMappingURL=client-d7a22e490f6066c40e0b.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion staticfiles/staticfiles.json

Large diffs are not rendered by default.

0 comments on commit a9105ee

Please sign in to comment.