Introduce group basic federation, event new page and notifications

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-02-18 08:57:00 +01:00
parent 300ef8f245
commit 4144e9ffd0
416 changed files with 32220 additions and 16750 deletions

View File

@@ -1,8 +1,8 @@
import Vue from 'vue';
import { ColorModifiers } from 'buefy/types/helpers';
import { Route, RawLocation } from 'vue-router';
import Vue from "vue";
import { ColorModifiers } from "buefy/types/helpers.d";
import { Route, RawLocation } from "vue-router";
declare module 'vue/types/vue' {
declare module "vue/types/vue" {
interface Vue {
$notifier: {
success: (message: string) => void;
@@ -10,21 +10,21 @@ declare module 'vue/types/vue' {
info: (message: string) => void;
};
beforeRouteEnter?(
to: Route,
from: Route,
next: (to?: RawLocation | false | ((vm: Vue) => void)) => void,
to: Route,
from: Route,
next: (to?: RawLocation | false | ((vm: Vue) => void)) => void
): void;
beforeRouteLeave?(
to: Route,
from: Route,
next: (to?: RawLocation | false | ((vm: Vue) => void)) => void,
to: Route,
from: Route,
next: (to?: RawLocation | false | ((vm: Vue) => void)) => void
): void;
beforeRouteUpdate?(
to: Route,
from: Route,
next: (to?: RawLocation | false | ((vm: Vue) => void)) => void,
to: Route,
from: Route,
next: (to?: RawLocation | false | ((vm: Vue) => void)) => void
): void;
}
}
@@ -37,29 +37,29 @@ export class Notifier {
}
success(message: string) {
this.notification(message, 'is-success');
this.notification(message, "is-success");
}
error(message: string) {
this.notification(message, 'is-danger');
this.notification(message, "is-danger");
}
info(message: string) {
this.notification(message, 'is-info');
this.notification(message, "is-info");
}
private notification(message: string, type: ColorModifiers) {
this.vue.prototype.$buefy.notification.open({
message,
duration: 5000,
position: 'is-bottom-right',
position: "is-bottom-right",
type,
hasIcon: true,
});
}
}
// tslint:disable
export function NotifierPlugin(vue: typeof Vue, options?: any): void {
/* eslint-disable */
export function NotifierPlugin(vue: typeof Vue): void {
vue.prototype.$notifier = new Notifier(vue);
}