2018-03-19 06:48:05 +00:00
|
|
|
<template>
|
2018-04-26 12:08:08 +00:00
|
|
|
<div id="app" class="container">
|
2018-03-19 06:48:05 +00:00
|
|
|
<div v-cloak>
|
|
|
|
<div class="notificationContainer">
|
|
|
|
<div class="notification" :class="{ error: notification != null && notification.error }" v-if="notification != null" @click.prevent="hideNotification">
|
|
|
|
<span class="message">{{ notification.message }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-03-21 15:51:46 +00:00
|
|
|
<router-view></router-view>
|
2018-03-19 06:48:05 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import shared from './shared';
|
|
|
|
|
2018-04-27 15:13:18 +00:00
|
|
|
|
2018-03-19 06:48:05 +00:00
|
|
|
export default {
|
|
|
|
name: 'app',
|
2018-04-26 12:08:08 +00:00
|
|
|
data() {
|
2018-03-19 06:48:05 +00:00
|
|
|
return {
|
|
|
|
notification: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
created()
|
|
|
|
{
|
|
|
|
var self = this;
|
|
|
|
document.title = self.$i18n.t('title');
|
|
|
|
|
|
|
|
self.notificationTimer = null;
|
|
|
|
|
|
|
|
shared.$on('showNotification', (message, error) =>
|
|
|
|
{
|
|
|
|
var self = this;
|
|
|
|
self.notification = {
|
|
|
|
message: message,
|
|
|
|
error: error
|
|
|
|
};
|
|
|
|
|
|
|
|
if (self.notificationTimer != null)
|
|
|
|
clearTimeout(self.notificationTimer);
|
|
|
|
|
|
|
|
self.notificationTimer = setTimeout(() =>
|
|
|
|
{
|
|
|
|
self.notification = null;
|
|
|
|
self.notificationTimer = null;
|
|
|
|
}, 5000);
|
|
|
|
});
|
|
|
|
|
|
|
|
shared.$on('hideNotification', () =>
|
|
|
|
{
|
|
|
|
var self = this;
|
|
|
|
self.notification = null;
|
|
|
|
|
|
|
|
if (self.notificationTimer != null)
|
|
|
|
{
|
|
|
|
clearTimeout(self.notificationTimer);
|
|
|
|
self.notificationTimer = null;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2018-04-27 15:13:18 +00:00
|
|
|
@import '~purecss/build/base.css';
|
|
|
|
@import '~purecss/build/buttons.css';
|
|
|
|
@import '~purecss/build/forms.css';
|
|
|
|
@import '~purecss/build/grids.css';
|
2018-03-19 06:48:05 +00:00
|
|
|
|
|
|
|
/* open-sans-regular - latin */
|
|
|
|
@font-face {
|
|
|
|
font-family: 'Open Sans';
|
|
|
|
font-style: normal;
|
|
|
|
font-weight: 400;
|
|
|
|
src: url('/fonts/open-sans-v15-latin-regular.eot'); /* IE9 Compat Modes */
|
|
|
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
|
|
|
url('/fonts/open-sans-v15-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
|
|
|
url('/fonts/open-sans-v15-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
|
|
|
url('/fonts/open-sans-v15-latin-regular.woff') format('woff'), /* Modern Browsers */
|
|
|
|
url('/fonts/open-sans-v15-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
|
|
|
url('/fonts/open-sans-v15-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
body
|
|
|
|
{
|
|
|
|
background-color: #f0f0f0;
|
|
|
|
font-family: 'Open Sans', sans-serif;
|
|
|
|
font-size: 12pt;
|
|
|
|
}
|
|
|
|
|
2018-04-28 07:24:53 +00:00
|
|
|
a, a:hover
|
|
|
|
{
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
a
|
|
|
|
{
|
|
|
|
color: #228dd4;
|
|
|
|
}
|
|
|
|
|
2018-05-02 18:07:09 +00:00
|
|
|
.pure-form select
|
|
|
|
{
|
|
|
|
padding-top: 0;
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2018-04-27 15:13:18 +00:00
|
|
|
/*
|
|
|
|
pure-g uses hardcoded sans-serif to get accurate alignment, this class
|
|
|
|
is added as a workaround for text in rows
|
|
|
|
*/
|
|
|
|
.text
|
|
|
|
{
|
|
|
|
font-family: 'Open Sans', sans-serif;
|
|
|
|
}
|
|
|
|
|
2018-04-26 12:08:08 +00:00
|
|
|
.container
|
2018-03-19 06:48:05 +00:00
|
|
|
{
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
max-width: 768px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content
|
|
|
|
{
|
|
|
|
background-color: white;
|
|
|
|
margin: 2rem;
|
|
|
|
padding: 2rem;
|
|
|
|
box-shadow: 0 0 15px #c0c0c0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.notificationContainer
|
|
|
|
{
|
|
|
|
position: fixed;
|
|
|
|
top: 1.5rem;
|
|
|
|
z-index: 666;
|
|
|
|
width: 512px;
|
|
|
|
left: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.notification
|
|
|
|
{
|
|
|
|
background: #d5e8f6;
|
|
|
|
border: solid 1px rgba(0, 0, 0, 0.25);
|
|
|
|
box-shadow: 0 0 10px #c0c0c0;
|
|
|
|
color: black;
|
|
|
|
cursor: pointer;
|
|
|
|
padding: .5em;
|
|
|
|
margin-bottom: 2rem;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
left: -50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.notification .message
|
|
|
|
{
|
|
|
|
white-space: pre;
|
|
|
|
}
|
|
|
|
|
|
|
|
.notification.error
|
|
|
|
{
|
|
|
|
background: #973a38;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.logo
|
|
|
|
{
|
|
|
|
margin-bottom: 2rem;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.disclaimer
|
|
|
|
{
|
|
|
|
font-size: 8pt;
|
|
|
|
text-align: center;
|
|
|
|
}
|
2018-04-27 15:13:18 +00:00
|
|
|
|
|
|
|
.pure-form-description
|
|
|
|
{
|
|
|
|
font-size: 80%;
|
|
|
|
color: #808080;
|
|
|
|
|
|
|
|
margin-left: 180px;
|
|
|
|
margin-bottom: .5rem;
|
|
|
|
}
|
2018-04-28 07:51:58 +00:00
|
|
|
|
|
|
|
.confirmDelete
|
|
|
|
{
|
|
|
|
color: red;
|
|
|
|
}
|
2018-03-19 06:48:05 +00:00
|
|
|
</style>
|