Skip to content

Commit 64d496d

Browse files
author
LDFOUR\luisd
committed
created staging banner
1 parent a080479 commit 64d496d

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

resources/assets/js/layouts/app.vue

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</main>
1212
</b-row>
1313
</b-container>
14+
<div v-if="showEnvBanner" class="environment-banner-container"><div class="environment-banner">{{ $t('app.staging_banner') }}</div></div>
1415
</div>
1516
</template>
1617

@@ -27,7 +28,8 @@ export default {
2728
data () {
2829
return {
2930
collapseSidebar: false,
30-
permissions: permissionsList
31+
permissions: permissionsList,
32+
showEnvBanner: window?.config?.appEnv === 'testing'
3133
}
3234
},
3335
components: {
@@ -52,3 +54,22 @@ export default {
5254
}
5355
}
5456
</script>
57+
58+
<style>
59+
.environment-banner-container {
60+
position: fixed;
61+
bottom: 0;
62+
left: 0;
63+
width: 100%;
64+
z-index: 9999;
65+
}
66+
67+
.environment-banner {
68+
background-color: #FF8000;
69+
color: #fff;
70+
padding: 10px;
71+
text-align: center;
72+
font-weight: bold;
73+
text-transform: uppercase;
74+
}
75+
</style>

resources/lang/en.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
"title": "No Internet Connection",
6666
"description": "Please save changes within {time} or progress will be lost"
6767
},
68+
"app": {
69+
"staging_banner": "Staging Site"
70+
},
6871
"breadcrumbs": {
6972
"applications": "Applications",
7073
"admin_users": "Admin Users",
@@ -468,7 +471,7 @@
468471
"title": "Messages",
469472
"set_attribution": "Set society name and attribution message to publish",
470473
"whatnow": "IFRC National Society Preparedness Messages",
471-
"empty": "There are not messages for this National Society in this language",
474+
"empty": "There are no messages for this National Society in this language",
472475
"steps": "Steps",
473476
"publish": "Publish",
474477
"no_publish": "Nothing to publish",
@@ -846,7 +849,7 @@
846849
"register_form": {
847850
"heading_1": "Create your free ",
848851
"heading_2": "IFRC ",
849-
"heading_3": "IFRC National Society Preparedness Messages",
852+
"heading_3": "National Society Preparedness Messages",
850853
"subtitle_1": "Help communities prepare for and respond to local hazards with Red Cross Red Crescent actionable safety messages.",
851854
"subtitle_2": "If you want to access with the API, sign up and share the messages with the 3 step guide.",
852855
"subtitle_3": "If you are a Red Cross Red Crescent National Society, sign up and you will receive instructions on how to adapt and share your safety messages.",

resources/views/scripts.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@php
33
$config = [
44
'appName' => config('app.name'),
5+
'appEnv' => config('app.env'),
56
'locale' => $locale = app()->getLocale(),
67
'locales' => config('app.locales'),
78
'translations' => json_decode(file_get_contents(resource_path("lang/{$locale}.json")), true),
@@ -62,4 +63,4 @@
6263
<script src="{{ mix('js/manifest.js') }}"></script>
6364
<script src="{{ mix('js/vendor.js') }}"></script>
6465
<script src="{{ mix('js/app.js') }}"></script>
65-
@endif
66+
@endif

0 commit comments

Comments
 (0)