Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.16 into develop #12239

Merged
merged 11 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/release_kolibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ jobs:
with:
name: ${{ needs.whl.outputs.whl-file-name }}
path: dist
- name: Zip whl file
run: zip -j dist/kolibri.zip dist/${{ needs.whl.outputs.whl-file-name }}
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}'
Expand All @@ -204,8 +206,9 @@ jobs:
- name: Upload to BCK bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'dist/${{ needs.whl.outputs.whl-file-name }}'
path: 'dist/kolibri.zip'
destination: '${{ secrets.BCK_PROD_BUILD_ARTIFACT_GCS_BUCKET }}'
parent: false
android_release:
name: Release Android App
if: ${{ !github.event.release.prerelease }}
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion kolibri/plugins/default_theme/kolibri_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def theme(self):
return {
"signIn": {
"background": static("assets/default_theme/background.jpg"),
"backgroundImgCredit": "Thomas Van Den Driessche",
"backgroundImgCredit": "Lewa Wildlife Conservancy",
"topLogo": {
"style": "padding-left: 64px; padding-right: 64px; margin-bottom: 8px; margin-top: 8px",
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 29 additions & 11 deletions kolibri/plugins/user_auth/assets/src/views/AuthBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="fh">
<div class="wrapper-table">
<div class="main-row table-row" :style="backgroundImageStyle">
<div class="main-row table-row">
<div class="main-cell table-cell">
<!-- remote access disabled -->
<div
Expand Down Expand Up @@ -92,6 +92,7 @@
/>
</p>
</div>
<div class="background" :style="backgroundImageStyle" aria-hidden="true"></div>
</div>
</div>
<div class="table-row">
Expand All @@ -113,9 +114,11 @@
/>
<template v-if="themeConfig.signIn.backgroundImgCredit">
<span> • </span>
{{ $tr('photoCreditLabel', {
photoCredit: themeConfig.signIn.backgroundImgCredit
}) }}
<span>
{{ $tr('photoCreditLabel', {
photoCredit: themeConfig.signIn.backgroundImgCredit
}) }}
</span>
</template>
</div>
</div>
Expand Down Expand Up @@ -197,13 +200,14 @@
...mapGetters(['facilityConfig']),
backgroundImageStyle() {
if (this.themeConfig.signIn.background) {
const scrimOpacity =
this.themeConfig.signIn.scrimOpacity !== undefined
? this.themeConfig.signIn.scrimOpacity
: 0.2;
const scrimOpacity = this.themeConfig.signIn.scrimOpacity;
return {
backgroundColor: this.$themeTokens.primary,
backgroundImage: `linear-gradient(rgba(0, 0, 0, ${scrimOpacity}), rgba(0, 0, 0, ${scrimOpacity})), url(${this.themeConfig.signIn.background})`,
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
backgroundSize: 'cover',
filter: 'blur(2px)',
};
}
return { backgroundColor: this.$themeBrand.primary.v_800 };
Expand Down Expand Up @@ -317,14 +321,15 @@
}

.table-row {
position: relative;
z-index: 1;
display: table-row;
// Do this to mitigate issues with just using z-index on Safari.
transform: translateZ(1px);
}

.main-row {
text-align: center;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}

.table-cell {
Expand All @@ -336,9 +341,22 @@
vertical-align: middle;
}

.background {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 0;
width: 100%;
height: 100%;
}

.box {
@extend %dropshadow-16dp;

position: relative;
z-index: 1;
width: 360px;
padding: 32px;
margin: 16px auto;
Expand Down
5 changes: 4 additions & 1 deletion kolibri/plugins/user_profile/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def validate(self, data):
details = e.detail if isinstance(e.detail, list) else [e.detail]
for detail in details:
# If any of the errors are authentication related, then we need to create the user
if detail.code == error_constants.AUTHENTICATION_FAILED:
if (
detail.code == error_constants.AUTHENTICATION_FAILED
or detail.code == error_constants.INVALID_USERNAME
):
self.create_remote_user(data)
job_data = super(MergeUserValidator, self).validate(data)
break
Expand Down