Various UI stuff (mainly implement mookup)

Fix lint

Disable modern mode

Fixes

UI fixes

Fixes

Ignore .po~ files

Fixes

Fix homepage

Fixes

Fixes

Mix format

Fix tests

Fix tests (yeah…)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-04-03 17:29:03 +02:00
parent 2dcd65ea78
commit da2a0593ca
66 changed files with 14247 additions and 15872 deletions

View File

@@ -33,7 +33,7 @@ export const actorRoutes: RouteConfig[] = [
meta: { requiredAuth: true },
},
{
path: '/~:name',
path: '/~:preferredUsername',
name: ActorRouteName.GROUP,
component: Group,
props: true,

View File

@@ -12,7 +12,7 @@ export const beforeRegisterGuard: NavigationGuard = async function (to, from, ne
const config: IConfig = data.config;
if (config.registrationsOpen === false) {
if (!config.registrationsOpen) {
return next({
name: ErrorRouteName.ERROR,
query: { code: ErrorCode.REGISTRATION_CLOSED },

View File

@@ -7,12 +7,24 @@ import { EventRouteName, eventRoutes } from '@/router/event';
import { ActorRouteName, actorRoutes } from '@/router/actor';
import { ErrorRouteName, errorRoutes } from '@/router/error';
import { authGuardIfNeeded } from '@/router/guards/auth-guard';
import Search from '@/views/Search.vue';
Vue.use(Router);
enum GlobalRouteName {
HOME = 'Home',
PAGE_NOT_FOUND = 'PageNotFound',
SEARCH = 'Search',
}
function scrollBehavior(to) {
if (to.hash) {
return {
selector: to.hash,
// , offset: { x: 0, y: 10 }
};
}
return { x: 0, y: 0 };
}
// Hack to merge enums
@@ -26,6 +38,7 @@ export const RouteName = {
};
const router = new Router({
scrollBehavior,
mode: 'history',
base: '/',
routes: [
@@ -33,7 +46,13 @@ const router = new Router({
...eventRoutes,
...actorRoutes,
...errorRoutes,
{
path: '/search/:searchTerm/:searchType?',
name: RouteName.SEARCH,
component: Search,
props: true,
meta: { requiredAuth: false },
},
{
path: '/',
name: RouteName.HOME,