Improve MisskeyPages
This commit is contained in:
parent
d3c3ad839b
commit
7c714f5788
|
@ -31,7 +31,7 @@ export class ASEvaluator {
|
||||||
VERSION: opts.version,
|
VERSION: opts.version,
|
||||||
URL: opts.page ? `${opts.url}/@${opts.page.user.username}/pages/${opts.page.name}` : '',
|
URL: opts.page ? `${opts.url}/@${opts.page.user.username}/pages/${opts.page.name}` : '',
|
||||||
LOGIN: opts.visitor != null,
|
LOGIN: opts.visitor != null,
|
||||||
NAME: opts.visitor ? opts.visitor.name : '',
|
NAME: opts.visitor ? opts.visitor.name || opts.visitor.username : '',
|
||||||
USERNAME: opts.visitor ? opts.visitor.username : '',
|
USERNAME: opts.visitor ? opts.visitor.username : '',
|
||||||
USERID: opts.visitor ? opts.visitor.id : '',
|
USERID: opts.visitor ? opts.visitor.id : '',
|
||||||
NOTES_COUNT: opts.visitor ? opts.visitor.notesCount : 0,
|
NOTES_COUNT: opts.visitor ? opts.visitor.notesCount : 0,
|
||||||
|
@ -42,7 +42,8 @@ export class ASEvaluator {
|
||||||
MY_FOLLOWERS_COUNT: opts.user ? opts.user.followersCount : 0,
|
MY_FOLLOWERS_COUNT: opts.user ? opts.user.followersCount : 0,
|
||||||
MY_FOLLOWING_COUNT: opts.user ? opts.user.followingCount : 0,
|
MY_FOLLOWING_COUNT: opts.user ? opts.user.followingCount : 0,
|
||||||
SEED: opts.randomSeed ? opts.randomSeed : '',
|
SEED: opts.randomSeed ? opts.randomSeed : '',
|
||||||
YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
|
YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`,
|
||||||
|
NULL: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,7 @@ export const envVarsDef: Record<string, Type> = {
|
||||||
MY_FOLLOWING_COUNT: 'number',
|
MY_FOLLOWING_COUNT: 'number',
|
||||||
SEED: null,
|
SEED: null,
|
||||||
YMD: 'string',
|
YMD: 'string',
|
||||||
|
NULL: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
export function isLiteralBlock(v: Block) {
|
export function isLiteralBlock(v: Block) {
|
||||||
|
|
Loading…
Reference in New Issue