forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request learningequality#10739 from nucleogenesis/enhancem…
…ent--py27-ie11-deprecation-warnings py27 ie11 deprecation warnings
- Loading branch information
Showing
9 changed files
with
163 additions
and
49 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
kolibri/plugins/device/assets/src/views/DeprecationWarningBanner.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<template> | ||
|
||
<div | ||
v-show="showBanner" | ||
class="alert" | ||
:style="{ backgroundColor: $themePalette.yellow.v_100 }" | ||
> | ||
<div style="display:flex"> | ||
<div> | ||
<KIcon | ||
icon="warning" | ||
class="icon" | ||
:color="$themePalette.amber.v_a400" | ||
/> | ||
</div> | ||
|
||
<div class="error-message"> | ||
<p v-if="py27Deprecated"> | ||
{{ coreString('pythonSupportWillBeDropped') }} | ||
</p> | ||
<p v-if="currentUserOnIE11"> | ||
{{ coreString('currentDeviceUsingIE11') }} | ||
</p> | ||
<p v-if="userDevicesUsingIE11"> | ||
{{ coreString('userDevicesUsingIE11') }} | ||
</p> | ||
<p v-if="currentUserOnIE11 || userDevicesUsingIE11"> | ||
{{ coreString('browserSupportWillBeDroppedIE11') }} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings'; | ||
import { browser } from 'kolibri.utils.browserInfo'; | ||
import plugin_data from 'plugin_data'; | ||
export default { | ||
name: 'DeprecationWarningBanner', | ||
mixins: [commonCoreStrings], | ||
computed: { | ||
showBanner() { | ||
return this.currentUserOnIE11 || this.userDevicesUsingIE11 || this.py27Deprecated; | ||
}, | ||
userDevicesUsingIE11() { | ||
return plugin_data.deprecationWarnings.ie11; | ||
}, | ||
py27Deprecated() { | ||
return plugin_data.deprecationWarnings.py27; | ||
}, | ||
currentUserOnIE11() { | ||
return browser.name === 'IE'; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
|
||
<style scoped> | ||
.alert { | ||
position: relative; | ||
padding-left: 2em; | ||
margin: 1em auto 0; | ||
max-width: 1000px; | ||
width: 100%; | ||
} | ||
.icon { | ||
height: 24px; | ||
width: 24px; | ||
top: 1em; | ||
left: 1em; | ||
position: absolute; | ||
} | ||
.error-message { | ||
font-size:14px; | ||
margin: 0em 1em 0 2em; | ||
} | ||
</style> |
37 changes: 37 additions & 0 deletions
37
kolibri/plugins/device/assets/src/views/DeviceAppBarPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
|
||
<AppBarPage :title="title"> | ||
|
||
<template #subNav> | ||
<DeviceTopNav /> | ||
</template> | ||
|
||
<DeprecationWarningBanner style="margin-bottom: 1em" /> | ||
|
||
<div> | ||
<slot></slot> | ||
</div> | ||
|
||
</AppBarPage> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
import AppBarPage from 'kolibri.coreVue.components.AppBarPage'; | ||
import DeviceTopNav from './DeviceTopNav'; | ||
import DeprecationWarningBanner from './DeprecationWarningBanner'; | ||
export default { | ||
name: 'DeviceAppBarPage', | ||
components: { AppBarPage, DeprecationWarningBanner, DeviceTopNav }, | ||
props: { | ||
title: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.