mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 22:39:33 +09:00
Fix frontend loading
This commit is contained in:
parent
4d9a694d8d
commit
8291dfa045
@ -4,16 +4,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
import * as Acct from 'misskey-js/src/acct.js';
|
||||||
import { url } from '@/config.js';
|
import { url } from '@/config.js';
|
||||||
|
|
||||||
export const acct = (user: misskey.Acct) => {
|
export const acct = (user: Misskey.Acct) => {
|
||||||
return Misskey.acct.toString(user);
|
return Acct.toString(user);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userName = (user: Misskey.entities.User) => {
|
export const userName = (user: Misskey.entities.User) => {
|
||||||
return user.name || user.username;
|
return user.name || user.username;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userPage = (user: misskey.Acct, path?, absolute = false) => {
|
export const userPage = (user: Misskey.Acct, path?, absolute = false) => {
|
||||||
return `${absolute ? url : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
|
return `${absolute ? url : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user