From 0981fcf809d238c679fff07451b3d18e35d27e37 Mon Sep 17 00:00:00 2001 From: lungsangg Date: Tue, 4 Feb 2025 10:13:51 +0530 Subject: [PATCH 1/8] update --- static/js/Misc.jsx | 45 +++++++++++++++++++++++++++++++++++++++ static/js/ReaderPanel.jsx | 3 ++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx index afd09a1ef1..a09cd464a5 100644 --- a/static/js/Misc.jsx +++ b/static/js/Misc.jsx @@ -1347,6 +1347,50 @@ MenuButton.propTypes = { }; +// class NavigateBackButton extends Component { +// onClick(e) { +// e.preventDefault(); +// window.history.back(); +// } + +// render() { +// return ( +// +// {/* Font Awesome chevron-left icon */} +// +// ); +// } +// } + +class NavigateBackButton extends Component { + onClick(e) { + e.preventDefault(); + let newCurrentRef = this.props.currentRef; + + // Remove trailing numbers from currentRef + currentRef = newCurrentRef.replace(/\d+$/, ''); + + const currentRef = this.props.currentRef; + if (currentRef) { + window.location.href = `/${currentRef}?tab=contents`; + } + console.log("this is currentRef", currentRef) + } + + render() { + return ( + + + + ); + } +} + +NavigateBackButton.propTypes = { + currentRef: PropTypes.string +}; + + class CloseButton extends Component { onClick(e) { e.preventDefault(); @@ -3360,6 +3404,7 @@ export { ProfileListing, ProfilePic, ReaderMessage, + NavigateBackButton, CloseButton, DisplaySettingsButton, MenuButton, diff --git a/static/js/ReaderPanel.jsx b/static/js/ReaderPanel.jsx index 6dd52b20a2..283c458bdd 100644 --- a/static/js/ReaderPanel.jsx +++ b/static/js/ReaderPanel.jsx @@ -33,6 +33,7 @@ import PublicCollectionsPage from './PublicCollectionsPage'; import TranslationsPage from './TranslationsPage'; import { TextColumnBannerChooser } from './TextColumnBanner'; import { + NavigateBackButton, CloseButton, MenuButton, DisplaySettingsButton, @@ -1442,7 +1443,7 @@ class ReaderControls extends Component { let leftControls = hideHeader || connectionsHeader ? null : (
- {this.props.multiPanel ? () : null} + {this.props.multiPanel ? () : null} {this.props.multiPanel ? null : ()}
{this.setTextCompletionStatus(status)} From 699c43a26e07604d1d40e396fdcfc25a806f2784 Mon Sep 17 00:00:00 2001 From: lungsangg Date: Tue, 4 Feb 2025 10:46:37 +0530 Subject: [PATCH 2/8] button_color_changed_to_red --- static/css/s2.css | 4 ++-- static/js/NotificationsPanel.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/css/s2.css b/static/css/s2.css index 69814138f8..054fc70b15 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -13478,7 +13478,7 @@ section.SheetSource .SheetOutsideBiText { .resourcesLink.blue { color: white; - background-color: #18345d; + background-color: #c44c54; } .resourcesLink.blue img { @@ -14590,7 +14590,7 @@ body .homeFeedWrapper.userStats { } .userStatModeButton.active { - background-color: #19365d; + background-color: #c44c54; color: #fff; } diff --git a/static/js/NotificationsPanel.jsx b/static/js/NotificationsPanel.jsx index 5cf033e9cb..44cc9be764 100644 --- a/static/js/NotificationsPanel.jsx +++ b/static/js/NotificationsPanel.jsx @@ -211,7 +211,7 @@ const FollowNotification = ({date, content}) => { const topLine = ( <> {content.name}  - notifcation.is_following_you" + notifcation.is_following_you ); From 970bb399d978ff3ffd79423209b0b679ab095534 Mon Sep 17 00:00:00 2001 From: lobsam Date: Tue, 4 Feb 2025 10:54:50 +0530 Subject: [PATCH 3/8] fixed complex commentary list --- static/js/TextList.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/TextList.jsx b/static/js/TextList.jsx index f850a3e4b3..bb71f7a74c 100644 --- a/static/js/TextList.jsx +++ b/static/js/TextList.jsx @@ -95,6 +95,7 @@ class TextList extends Component { var commentator = filter[0]; var basetext = this.getSectionRef(); var commentarySection = Sefaria.commentarySectionRef(commentator, basetext); + console.log("commentary text,, ", commentator, basetext, commentarySection); if (!commentarySection) { this.setState({waitForText: false}); return; @@ -198,6 +199,7 @@ class TextList extends Component { var filter = this.props.filter; // Remove filterSuffix for display var displayFilter = filter.map(filter => filter.split("|")[0]); // Remove filterSuffix for display var links = this.getLinks(); + console.log("links : ", links, this.state.waitForText,this.state.textLoaded) var enText = filter.length ? displayFilter.join(", "): "" @@ -207,7 +209,7 @@ class TextList extends Component { var noResultsMessage = ; var message = !this.state.linksLoaded ? () : (links.length === 0 ? noResultsMessage : null); var content = links.length === 0 ? message : - this.state.waitForText && !this.state.textLoaded ? + this.state.waitForText ? () : links.map(function(link, i) { if (link.isSheet) { From 0d5932a3e54177b1edb7ab738e83d171a815f448 Mon Sep 17 00:00:00 2001 From: lobsam Date: Mon, 3 Feb 2025 15:26:51 +0530 Subject: [PATCH 4/8] add added sanskrit localization --- static/js/sefaria/localizationLanguage/chinese.json | 1 + static/js/sefaria/localizationLanguage/english.json | 1 + static/js/sefaria/localizationLanguage/tibetan.json | 1 + static/js/sefaria/sefaria.js | 1 + 4 files changed, 4 insertions(+) diff --git a/static/js/sefaria/localizationLanguage/chinese.json b/static/js/sefaria/localizationLanguage/chinese.json index 9d0cedc4b0..df66703c69 100644 --- a/static/js/sefaria/localizationLanguage/chinese.json +++ b/static/js/sefaria/localizationLanguage/chinese.json @@ -1,5 +1,6 @@ { "language.bilingual": "双语", + "language.sanskrit": "梵语", "language.english": "英语", "language.tibetan": "藏语", "language.yiddish": "意第绪语", diff --git a/static/js/sefaria/localizationLanguage/english.json b/static/js/sefaria/localizationLanguage/english.json index c8bea4292f..ffc820a999 100644 --- a/static/js/sefaria/localizationLanguage/english.json +++ b/static/js/sefaria/localizationLanguage/english.json @@ -1,5 +1,6 @@ { "language.bilingual":"Bilingual", + "language.sanskrit": "Sanskrit", "language.english": "English", "language.tibetan": "Tibetan", "language.yiddish": "Yiddish", diff --git a/static/js/sefaria/localizationLanguage/tibetan.json b/static/js/sefaria/localizationLanguage/tibetan.json index 27dfbb65fe..b11551cb1d 100644 --- a/static/js/sefaria/localizationLanguage/tibetan.json +++ b/static/js/sefaria/localizationLanguage/tibetan.json @@ -1,5 +1,6 @@ { "language.bilingual": "སྐད་གཉིས་ཤན་སྦྱར།", + "language.sanskrit": "སངས་ཀྲིན", "language.english": "ཨིན་ཇི།", "language.tibetan": "བོད་སྐད།", "language.yiddish": "ཡི་ཌིཤ།", diff --git a/static/js/sefaria/sefaria.js b/static/js/sefaria/sefaria.js index 7fe06324c9..4ec16bf7e0 100644 --- a/static/js/sefaria/sefaria.js +++ b/static/js/sefaria/sefaria.js @@ -601,6 +601,7 @@ Sefaria = extend(Sefaria, { "bn": {"name": "Bengali", "i18nString": "language.bengali", "showTranslations": 1}, "ur": {"name": "Urdu", "i18nString": "language.urdu", "showTranslations": 1}, "sv": {"name": "Swedish", "i18nString": "language.swedish", "showTranslations": 1}, + "sa": {"name": "Sanskrit", "i18nString": "language.sanskrit", "showTranslations": 1}, "da": {"name": "Danish", "i18nString": "language.danish", "showTranslations": 1}, "no": {"name": "Norwegian", "i18nString": "language.norwegian", "showTranslations": 1}, "nl": {"name": "Dutch", "i18nString": "language.dutch", "showTranslations": 1}, From 5c8d9b7509d72d0515212410b34b42e06e2184ba Mon Sep 17 00:00:00 2001 From: lobsam Date: Tue, 4 Feb 2025 10:57:28 +0530 Subject: [PATCH 5/8] small change --- static/js/TextList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/TextList.jsx b/static/js/TextList.jsx index bb71f7a74c..d791704087 100644 --- a/static/js/TextList.jsx +++ b/static/js/TextList.jsx @@ -201,7 +201,7 @@ class TextList extends Component { var links = this.getLinks(); console.log("links : ", links, this.state.waitForText,this.state.textLoaded) - + // this.state.waitForText && !this.state.textLoaded var enText = filter.length ? displayFilter.join(", "): "" var en = Sefaria._('text.message.no_connection', {text: enText}); var heText = displayFilter.map(f => Sefaria.hebrewTerm(f)).join(", ") == "Commentary" ? Sefaria._('text.commentary') : displayFilter.map(f => Sefaria.hebrewTerm(f)).join(", ") From 06114e612711a6b18ffaaf75ca11ff10230b525d Mon Sep 17 00:00:00 2001 From: lobsam Date: Tue, 4 Feb 2025 11:22:16 +0530 Subject: [PATCH 6/8] fixed commentery list --- static/js/ReaderPanel.jsx | 1 - static/js/TextList.jsx | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/static/js/ReaderPanel.jsx b/static/js/ReaderPanel.jsx index 6dd52b20a2..578b6019ce 100644 --- a/static/js/ReaderPanel.jsx +++ b/static/js/ReaderPanel.jsx @@ -635,7 +635,6 @@ class ReaderPanel extends Component { } render() { - console.log("book ref:",Sefaria.index(this.state.bookRef)) if (this.state.error) { return (
filter.split("|")[0]); // Remove filterSuffix for display var links = this.getLinks(); - console.log("links : ", links, this.state.waitForText,this.state.textLoaded) // this.state.waitForText && !this.state.textLoaded var enText = filter.length ? displayFilter.join(", "): "" @@ -209,7 +208,7 @@ class TextList extends Component { var noResultsMessage = ; var message = !this.state.linksLoaded ? () : (links.length === 0 ? noResultsMessage : null); var content = links.length === 0 ? message : - this.state.waitForText ? + this.state.waitForText && this.state.textLoaded ? () : links.map(function(link, i) { if (link.isSheet) { From 077a1d93e31e5e15a973fd066cbe609678af1df9 Mon Sep 17 00:00:00 2001 From: lungsangg Date: Tue, 4 Feb 2025 13:32:53 +0530 Subject: [PATCH 7/8] button_color_update --- static/css/s2.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/css/s2.css b/static/css/s2.css index 69814138f8..358737c612 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -227,7 +227,7 @@ a, a:hover { --miscelaneous-green: #3B5849; --selected-option: #000000; --select-blue: #0B71E7; - --pecha-red: #b5343c; + --pecha-red: #C39F48; --highlight-red: #cc7273; --highlight-red-light: #eccbcc; --inline-link-red: #cc5454; @@ -11256,7 +11256,7 @@ body #keyboardInputMaster tbody tr td table tbody tr td.pressed { padding: 5px 10px; font-size: 12px; font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; - background-color: #b84045; + background-color: #C39F48; color: white; border: var(--talmud-gold) 1px solid; border-radius: 5px; @@ -13478,7 +13478,7 @@ section.SheetSource .SheetOutsideBiText { .resourcesLink.blue { color: white; - background-color: #18345d; + background-color: #C39F48; } .resourcesLink.blue img { @@ -14590,7 +14590,7 @@ body .homeFeedWrapper.userStats { } .userStatModeButton.active { - background-color: #19365d; + background-color: #C39F48; color: #fff; } From cb55754c9ab6077b68bdc1db1a2789c65d6d579a Mon Sep 17 00:00:00 2001 From: lungsangg Date: Tue, 4 Feb 2025 13:41:34 +0530 Subject: [PATCH 8/8] navigation_back_button_update --- static/js/Misc.jsx | 45 --------------------------------------- static/js/ReaderPanel.jsx | 3 +-- 2 files changed, 1 insertion(+), 47 deletions(-) diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx index a09cd464a5..afd09a1ef1 100644 --- a/static/js/Misc.jsx +++ b/static/js/Misc.jsx @@ -1347,50 +1347,6 @@ MenuButton.propTypes = { }; -// class NavigateBackButton extends Component { -// onClick(e) { -// e.preventDefault(); -// window.history.back(); -// } - -// render() { -// return ( -// -// {/* Font Awesome chevron-left icon */} -// -// ); -// } -// } - -class NavigateBackButton extends Component { - onClick(e) { - e.preventDefault(); - let newCurrentRef = this.props.currentRef; - - // Remove trailing numbers from currentRef - currentRef = newCurrentRef.replace(/\d+$/, ''); - - const currentRef = this.props.currentRef; - if (currentRef) { - window.location.href = `/${currentRef}?tab=contents`; - } - console.log("this is currentRef", currentRef) - } - - render() { - return ( - - - - ); - } -} - -NavigateBackButton.propTypes = { - currentRef: PropTypes.string -}; - - class CloseButton extends Component { onClick(e) { e.preventDefault(); @@ -3404,7 +3360,6 @@ export { ProfileListing, ProfilePic, ReaderMessage, - NavigateBackButton, CloseButton, DisplaySettingsButton, MenuButton, diff --git a/static/js/ReaderPanel.jsx b/static/js/ReaderPanel.jsx index 21e5575fa1..578b6019ce 100644 --- a/static/js/ReaderPanel.jsx +++ b/static/js/ReaderPanel.jsx @@ -33,7 +33,6 @@ import PublicCollectionsPage from './PublicCollectionsPage'; import TranslationsPage from './TranslationsPage'; import { TextColumnBannerChooser } from './TextColumnBanner'; import { - NavigateBackButton, CloseButton, MenuButton, DisplaySettingsButton, @@ -1442,7 +1441,7 @@ class ReaderControls extends Component { let leftControls = hideHeader || connectionsHeader ? null : (
- {this.props.multiPanel ? () : null} + {this.props.multiPanel ? () : null} {this.props.multiPanel ? null : ()}
{this.setTextCompletionStatus(status)}