fix: 🔥 Remove meta implementation in routing for now

This commit is contained in:
ThatOneCalculator 2022-08-09 13:00:14 -07:00
parent 47c19181f8
commit da83fd1ef2
3 changed files with 8 additions and 4 deletions

View File

@ -398,6 +398,7 @@ export default define(meta, paramDef, async (ps, me) => {
disableLocalTimeline: instance.disableLocalTimeline, disableLocalTimeline: instance.disableLocalTimeline,
disableRecommendedTimeline: instance.disableRecommendedTimeline, disableRecommendedTimeline: instance.disableRecommendedTimeline,
disableGlobalTimeline: instance.disableGlobalTimeline, disableGlobalTimeline: instance.disableGlobalTimeline,
enableGuestTimeline: instance.enableGuestTimeline,
driveCapacityPerLocalUserMb: instance.localDriveCapacityMb, driveCapacityPerLocalUserMb: instance.localDriveCapacityMb,
driveCapacityPerRemoteUserMb: instance.remoteDriveCapacityMb, driveCapacityPerRemoteUserMb: instance.remoteDriveCapacityMb,
emailRequiredForSignup: instance.emailRequiredForSignup, emailRequiredForSignup: instance.emailRequiredForSignup,

View File

@ -18,6 +18,7 @@ export const paramDef = {
disableLocalTimeline: { type: 'boolean', nullable: true }, disableLocalTimeline: { type: 'boolean', nullable: true },
disableRecommendedTimeline: { type: 'boolean', nullable: true }, disableRecommendedTimeline: { type: 'boolean', nullable: true },
disableGlobalTimeline: { type: 'boolean', nullable: true }, disableGlobalTimeline: { type: 'boolean', nullable: true },
enableGuestTimeline: { type: 'boolean', nullable: true },
useStarForReactionFallback: { type: 'boolean', nullable: true }, useStarForReactionFallback: { type: 'boolean', nullable: true },
recommendedInstances: { type: 'array', nullable: true, items: { recommendedInstances: { type: 'array', nullable: true, items: {
type: 'string', type: 'string',
@ -141,6 +142,10 @@ export default define(meta, paramDef, async (ps, me) => {
set.disableGlobalTimeline = ps.disableGlobalTimeline; set.disableGlobalTimeline = ps.disableGlobalTimeline;
} }
if (typeof ps.enableGuestTimeline === 'boolean') {
set.enableGuestTimeline = ps.enableGuestTimeline;
}
if (typeof ps.useStarForReactionFallback === 'boolean') { if (typeof ps.useStarForReactionFallback === 'boolean') {
set.useStarForReactionFallback = ps.useStarForReactionFallback; set.useStarForReactionFallback = ps.useStarForReactionFallback;
} }

View File

@ -4,10 +4,8 @@ import { $i, iAmModerator } from '@/account';
import MkLoading from '@/pages/_loading_.vue'; import MkLoading from '@/pages/_loading_.vue';
import MkError from '@/pages/_error_.vue'; import MkError from '@/pages/_error_.vue';
import { ui } from '@/config'; import { ui } from '@/config';
import * as os from '@/os';
const meta = os.api('admin/meta'); // const guestTimeline = nodeinfo.meta.enableGuestTimeline;
const guestTimeline = meta.enableGuestTimeline;
const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({ const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({
loader: loader, loader: loader,
@ -460,7 +458,7 @@ export const routes = [{
}, { }, {
path: '/timeline', path: '/timeline',
component: page(() => import('./pages/timeline.vue')), component: page(() => import('./pages/timeline.vue')),
loginRequired: guestTimeline, // loginRequired: guestTimeline,
}, { }, {
name: 'index', name: 'index',
path: '/', path: '/',