Skip to content

Commit

Permalink
now the language popup wont be visible at all, earlier it was visible…
Browse files Browse the repository at this point in the history
… for a short duration in starting
  • Loading branch information
deepansh96 committed Apr 29, 2024
1 parent b6d9c41 commit 54a8ede
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
12 changes: 10 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@
// if user is not SSO user, everything works as defined in this file
// if user is SSO user, we take up the setting provided by the org,
// and if the setting is not to show language picker, it won't be shown
(checkIfIsSSOUser && isFirstTimeLanguagePickerShownBySetting) ||
(
checkIfIsSSOUser &&
isFirstTimeLanguagePickerShownBySetting !== null &&
isFirstTimeLanguagePickerShownBySetting == true
) ||
(!checkIfIsSSOUser && showLanguagePickerDialog)
)"
>
Expand Down Expand Up @@ -1190,7 +1194,11 @@ export default {
*/
isBackgroundDisabled() {
const output = (
(this.checkIfIsSSOUser && this.isFirstTimeLanguagePickerShownBySetting) ||
(
this.checkIfIsSSOUser &&
this.isFirstTimeLanguagePickerShownBySetting !== null &&
this.isFirstTimeLanguagePickerShownBySetting == true
) ||
(!this.checkIfIsSSOUser && this.showLanguagePickerDialog) ||
this.isSharePlioDialogShown ||
this.isEmbedPlioDialogShown ||
Expand Down
12 changes: 10 additions & 2 deletions src/pages/Embeds/Plio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export default {
},
},
computed: {
...mapGetters("auth", ["isAuthenticated"]),
...mapGetters("auth", ["isAuthenticated", "locale"]),
...mapState("generic", ["windowInnerWidth", "windowInnerHeight"]),
firstUnansweredItem() {
if (this.isSkipEnabled || this.lastAnsweredItemIndex == this.numItems - 1)
Expand Down Expand Up @@ -578,7 +578,12 @@ export default {
},
},
methods: {
...mapActions("generic", ["unsetFirstTimeLanguagePickerShownBySetting"]),
...mapActions(
"generic", [
"unsetFirstTimeLanguagePickerShownBySetting",
"setFirstTimeLanguagePickerShownBySetting"
]
),
...mapActions("auth", ["setAccessToken", "setActiveWorkspace"]),
/**
* @param {Number} itemIndex - the index of the item whose response is to be checked
Expand Down Expand Up @@ -877,6 +882,9 @@ export default {
if (
!this.shouldFirstTimeLanguagePickerBeShown
) this.unsetFirstTimeLanguagePickerShownBySetting();
else {
if (this.locale == null) this.setFirstTimeLanguagePickerShownBySetting()
}
})
.then(() => this.createSession())
.then(() => this.logData());
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/generic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const state = {
isFirstTimeLanguagePickerShownBySetting: true,
isFirstTimeLanguagePickerShownBySetting: null,
isSharePlioDialogShown: false,
isEmbedPlioDialogShown: false, // whether to show the dialog with info on embedding plio
plioLinkToShare: null,
Expand Down

0 comments on commit 54a8ede

Please sign in to comment.