Improve MisskeyPages
This commit is contained in:
parent
d3c3ad839b
commit
7c714f5788
2 changed files with 4 additions and 2 deletions
|
@ -31,7 +31,7 @@ export class ASEvaluator {
|
|||
VERSION: opts.version,
|
||||
URL: opts.page ? `${opts.url}/@${opts.page.user.username}/pages/${opts.page.name}` : '',
|
||||
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 : '',
|
||||
USERID: opts.visitor ? opts.visitor.id : '',
|
||||
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_FOLLOWING_COUNT: opts.user ? opts.user.followingCount : 0,
|
||||
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',
|
||||
SEED: null,
|
||||
YMD: 'string',
|
||||
NULL: null,
|
||||
};
|
||||
|
||||
export function isLiteralBlock(v: Block) {
|
||||
|
|
Loading…
Reference in a new issue