Commit a9c56d2a authored by Benedikt Heinrichs's avatar Benedikt Heinrichs Committed by Marcel Nellesen

New: Add Newfeed to loginApp (coscine/issues#1014)

parent c6aed9e4
This diff is collapsed.
...@@ -14,26 +14,22 @@ ...@@ -14,26 +14,22 @@
</h1> </h1>
<div v-if="!tos" class="row"> <div v-if="!tos" class="row">
<div class="col-sm-12 col-md-7"> <div class="col-sm-12 col-md-7">
<div class="alert alert-warning" role="alert"> <div class="alert alert-warning" role="alert">
<h5 class="alert-heading">{{ $t('alert_headline') }}</h5> <h5 class="alert-heading">{{ $t('alert_headline') }}</h5>
<p class="alert-title">{{ $t('alert_text1') }} <p class="alert-title">{{ $t('alert_text1') }}
<a href="mailto:servicedesk@itc.rwth-aachen.de?subject=CoScInE%20Pilot%20Program">Servicedesk</a> <a href="mailto:servicedesk@itc.rwth-aachen.de?subject=CoScInE%20Pilot%20Program">Servicedesk</a>
{{ $t('alert_text2') }} {{ $t('alert_text2') }}
</p>
</div>
<div class="card bg-light mb-3 w-100">
<div class="card-body">
<p class="card-text">
<vue-markdown :source="news"></vue-markdown>
</p> </p>
</div> </div>
<div class="card bg-light mb-3 w-100">
<div class="card-body">
<h5 class="card-title">{{ $t('description_headline') }}</h5>
<p class="card-text">{{ $t('description_text') }}</p>
<h5 class="card-title">{{ $t('description_help_headline') }}</h5>
<p class="card-text">
{{ $t('description_help') }}
<a href="mailto:servicedesk@itc.rwth-aachen.de">Servicedesk</a>
</p>
</div>
</div> </div>
</div> </div>
<div class="col-sm-12 col-md-5"> <div class="col-sm-12 col-md-5">
<div class="row"> <div class="row">
<div class="card bg-light mb-3 w-100"> <div class="card bg-light mb-3 w-100">
<div class="card-body"> <div class="card-body">
...@@ -60,6 +56,19 @@ ...@@ -60,6 +56,19 @@
id="signup-toggle" id="signup-toggle"
>{{ $t('signup') }}</button> >{{ $t('signup') }}</button>
</div> </div>
<div class="row">
<div class="card bg-light mb-3 w-100">
<div class="card-body">
<h5 class="card-title">{{ $t('description_headline') }}</h5>
<p class="card-text">{{ $t('description_text') }}</p>
<h5 class="card-title">{{ $t('description_help_headline') }}</h5>
<p class="card-text">
{{ $t('description_help') }}
<a href="mailto:servicedesk@itc.rwth-aachen.de">Servicedesk</a>
</p>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div v-else class="row"> <div v-else class="row">
...@@ -79,6 +88,7 @@ ...@@ -79,6 +88,7 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
import VueMarkdown from 'vue-markdown';
import LoginMain from './components/LoginMain.vue'; import LoginMain from './components/LoginMain.vue';
import LogoutMain from './components/LogoutMain.vue'; import LogoutMain from './components/LogoutMain.vue';
import TOS from './components/TOS.vue'; import TOS from './components/TOS.vue';
...@@ -93,6 +103,8 @@ import mailGreyPath from './assets/mail_grey.svg'; ...@@ -93,6 +103,8 @@ import mailGreyPath from './assets/mail_grey.svg';
import phoneGreyPath from './assets/phone_grey.svg'; import phoneGreyPath from './assets/phone_grey.svg';
import faxGreyPath from './assets/fax_grey.svg'; import faxGreyPath from './assets/fax_grey.svg';
import { NoticeApi } from '@coscine/api-connection';
let scriptPath = ''; let scriptPath = '';
let imageEnabled = false; let imageEnabled = false;
if (document.currentScript !== undefined) { if (document.currentScript !== undefined) {
...@@ -170,6 +182,7 @@ export default Vue.extend({ ...@@ -170,6 +182,7 @@ export default Vue.extend({
TOS, TOS,
RWTHHeader, RWTHHeader,
RWTHFooter, RWTHFooter,
VueMarkdown,
}, },
computed: { computed: {
cssProps() { cssProps() {
...@@ -198,9 +211,22 @@ export default Vue.extend({ ...@@ -198,9 +211,22 @@ export default Vue.extend({
currentInputCard: 'LoginMain', currentInputCard: 'LoginMain',
logoutComponent: 'LogoutMain', logoutComponent: 'LogoutMain',
tos: getIsTOS(), tos: getIsTOS(),
news: '',
}; };
}, },
watch: {
'$i18n.locale'() {
this.retrieveNotices();
},
},
methods: { methods: {
retrieveNotices() {
NoticeApi.getNotices('changelog', this.$i18n.locale, (response: any) => {
let splitArray = response.data.data.body.split(/\s(?:#{3})\s/g, 5);
splitArray = splitArray.join('### ');
this.news = splitArray.toString();
});
},
loginBack() { loginBack() {
this.currentInputCard = 'LoginMain'; this.currentInputCard = 'LoginMain';
}, },
...@@ -211,6 +237,9 @@ export default Vue.extend({ ...@@ -211,6 +237,9 @@ export default Vue.extend({
this.logoutState = !this.logoutState; this.logoutState = !this.logoutState;
}, },
}, },
created() {
this.retrieveNotices();
},
}); });
</script> </script>
......
...@@ -4,13 +4,14 @@ declare module '*.vue' { ...@@ -4,13 +4,14 @@ declare module '*.vue' {
} }
declare module '@coscine/api-connection'; declare module '@coscine/api-connection';
declare module 'vue-markdown';
declare module '@itcenter-layout/bootstrap' declare module '@itcenter-layout/bootstrap';
declare module "*.png" { declare module '*.png' {
const value: any; const value: any;
export default value; export default value;
} }
declare module "*.svg" { declare module '*.svg' {
const value: any; const value: any;
export default value; export default value;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment