diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8140d8675..db2bc7faa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,6 +1,12 @@ name: Publish Docker image on: + push: + branches: + - stable + paths: + - packages/** + - locales/** release: types: [published] workflow_dispatch: diff --git a/package.json b/package.json index 48bdf9af4..f11c74ccd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sharkey", - "version": "2023.9.1.beta2", + "version": "2023.9.1.beta3", "codename": "shonk", "repository": { "type": "git", diff --git a/packages/backend/assets/transparent.png b/packages/backend/assets/transparent.png new file mode 100644 index 000000000..240ca4f8d Binary files /dev/null and b/packages/backend/assets/transparent.png differ diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index bcd99548f..b3e140e58 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -343,6 +343,9 @@ export class NoteEntityService implements OnModuleInit { uri: note.uri ?? undefined, url: note.url ?? undefined, updatedAt: note.updatedAt != null ? note.updatedAt.toISOString() : undefined, + ...(meId ? { + myReaction: this.populateMyReaction(note, meId, options?._hint_), + } : {}), ...(opts.detail ? { clippedCount: note.clippedCount, @@ -358,10 +361,6 @@ export class NoteEntityService implements OnModuleInit { }) : undefined, poll: note.hasPoll ? this.populatePoll(note, meId) : undefined, - - ...(meId ? { - myReaction: this.populateMyReaction(note, meId, options?._hint_), - } : {}), } : {}), }); diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index f442fbdd2..6cdd61756 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -27,7 +27,7 @@ export const meta = { requireCredential: true, limit: { - duration: ms('1hour'), + duration: ms('1minute'), max: 30, }, diff --git a/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts b/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts index fe9f1fc87..b0b5147a4 100644 --- a/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts +++ b/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts @@ -3,7 +3,7 @@ import megalodon, { Entity, MegalodonInterface } from 'megalodon'; import querystring from 'querystring'; import { IsNull } from 'typeorm'; import multer from 'fastify-multer'; -import type { UsersRepository } from '@/models/_.js'; +import type { NotesRepository, UserProfilesRepository, UsersRepository } from '@/models/_.js'; import { DI } from '@/di-symbols.js'; import { bindThis } from '@/decorators.js'; import type { Config } from '@/config.js'; @@ -12,6 +12,7 @@ import { convertId, IdConvertType as IdType, convertAccount, convertAnnouncement import { getInstance } from './endpoints/meta.js'; import { ApiAuthMastodon, ApiAccountMastodon, ApiFilterMastodon, ApiNotifyMastodon, ApiSearchMastodon, ApiTimelineMastodon, ApiStatusMastodon } from './endpoints.js'; import type { FastifyInstance, FastifyPluginOptions } from 'fastify'; +import { UserEntityService } from '@/core/entities/UserEntityService.js'; export function getClient(BASE_URL: string, authorization: string | undefined): MegalodonInterface { const accessTokenArr = authorization?.split(' ') ?? [null]; @@ -26,9 +27,14 @@ export class MastodonApiServerService { constructor( @Inject(DI.usersRepository) private usersRepository: UsersRepository, + @Inject(DI.notesRepository) + private notesRepository: NotesRepository, + @Inject(DI.userProfilesRepository) + private userProfilesRepository: UserProfilesRepository, @Inject(DI.config) private config: Config, private metaService: MetaService, + private userEntityService: UserEntityService, ) { } @bindThis @@ -256,8 +262,10 @@ export class MastodonApiServerService { const client = getClient(BASE_URL, accessTokens); // we are using this here, because in private mode some info isnt // displayed without being logged in try { - const account = new ApiAccountMastodon(_request, client, BASE_URL); - reply.send(await account.lookup()); + const data = await client.search((_request.query as any).acct, { type: 'accounts' }); + const profile = await this.userProfilesRepository.findOneBy({ userId: data.data.accounts[0].id }); + data.data.accounts[0].fields = profile?.fields.map(f => ({ ...f, verified_at: null })) || []; + reply.send(convertAccount(data.data.accounts[0])); } catch (e: any) { /* console.error(e); */ reply.code(401).send(e.response.data); @@ -294,6 +302,8 @@ export class MastodonApiServerService { try { const sharkId = convertId(_request.params.id, IdType.SharkeyId); const data = await client.getAccount(sharkId); + const profile = await this.userProfilesRepository.findOneBy({ userId: sharkId }); + data.data.fields = profile?.fields.map(f => ({ ...f, verified_at: null })) || []; reply.send(convertAccount(data.data)); } catch (e: any) { /* console.error(e); @@ -744,7 +754,7 @@ export class MastodonApiServerService { //#endregion //#region Timelines - const TLEndpoint = new ApiTimelineMastodon(fastify); + const TLEndpoint = new ApiTimelineMastodon(fastify, this.config, this.usersRepository, this.notesRepository, this.userEntityService); // GET Endpoints TLEndpoint.getTL(); @@ -769,7 +779,7 @@ export class MastodonApiServerService { //#endregion //#region Status - const NoteEndpoint = new ApiStatusMastodon(fastify); + const NoteEndpoint = new ApiStatusMastodon(fastify, this.config, this.usersRepository, this.notesRepository, this.userEntityService); // GET Endpoints NoteEndpoint.getStatus(); diff --git a/packages/backend/src/server/api/mastodon/converters.ts b/packages/backend/src/server/api/mastodon/converters.ts index 58b8dc23c..69b0ad93f 100644 --- a/packages/backend/src/server/api/mastodon/converters.ts +++ b/packages/backend/src/server/api/mastodon/converters.ts @@ -1,4 +1,14 @@ +import type { Config } from '@/config.js'; +import { MfmService } from '@/core/MfmService.js'; +import { DI } from '@/di-symbols.js'; +import { Inject } from '@nestjs/common'; import { Entity } from 'megalodon'; +import { parse } from 'mfm-js'; +import { GetterService } from '../GetterService.js'; +import type { IMentionedRemoteUsers } from '@/models/Note.js'; +import type { MiUser } from '@/models/User.js'; +import type { NotesRepository, UsersRepository } from '@/models/_.js'; +import { UserEntityService } from '@/core/entities/UserEntityService.js'; const CHAR_COLLECTION = '0123456789abcdefghijklmnopqrstuvwxyz'; @@ -7,6 +17,91 @@ export enum IdConvertType { SharkeyId, } +export const escapeMFM = (text: string): string => text + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(/`/g, "`") + .replace(/\r?\n/g, "
"); + +export class MastoConverters { + private MfmService: MfmService; + private GetterService: GetterService; + + constructor( + @Inject(DI.config) + private config: Config, + + @Inject(DI.usersRepository) + private usersRepository: UsersRepository, + + @Inject(DI.notesRepository) + private notesRepository: NotesRepository, + + private userEntityService: UserEntityService + ) { + this.MfmService = new MfmService(this.config); + this.GetterService = new GetterService(this.usersRepository, this.notesRepository, this.userEntityService); + } + + private encode(u: MiUser, m: IMentionedRemoteUsers): MastodonEntity.Mention { + let acct = u.username; + let acctUrl = `https://${u.host || this.config.host}/@${u.username}`; + let url: string | null = null; + if (u.host) { + const info = m.find(r => r.username === u.username && r.host === u.host); + acct = `${u.username}@${u.host}`; + acctUrl = `https://${u.host}/@${u.username}`; + if (info) url = info.url ?? info.uri; + } + return { + id: u.id, + username: u.username, + acct: acct, + url: url ?? acctUrl, + }; + } + + public async getUser(id: string): Promise { + return this.GetterService.getUser(id).then(p => { + return p; + }); + } + + public async convertStatus(status: Entity.Status) { + status.account = convertAccount(status.account); + const note = await this.GetterService.getNote(status.id); + status.id = convertId(status.id, IdConvertType.MastodonId); + if (status.in_reply_to_account_id) status.in_reply_to_account_id = convertId( + status.in_reply_to_account_id, + IdConvertType.MastodonId, + ); + if (status.in_reply_to_id) status.in_reply_to_id = convertId(status.in_reply_to_id, IdConvertType.MastodonId); + status.media_attachments = status.media_attachments.map((attachment) => + convertAttachment(attachment), + ); + // This will eventually be improved with a rewrite of this file + const mentions = Promise.all(note.mentions.map(p => + this.getUser(p) + .then(u => this.encode(u, JSON.parse(note.mentionedRemoteUsers))) + .catch(() => null))) + .then(p => p.filter(m => m)) as Promise; + status.mentions = await mentions; + status.mentions = status.mentions.map((mention) => ({ + ...mention, + id: convertId(mention.id, IdConvertType.MastodonId), + })); + const convertedMFM = this.MfmService.toHtml(parse(status.content), JSON.parse(note.mentionedRemoteUsers)); + status.content = status.content ? convertedMFM?.replace(/&/g, "&").replaceAll(`&`, "\'") as string : status.content; + if (status.poll) status.poll = convertPoll(status.poll); + if (status.reblog) status.reblog = convertStatus(status.reblog); + + return status; + } +} + export function convertId(in_id: string, id_convert_type: IdConvertType): string { switch (id_convert_type) { case IdConvertType.MastodonId: { diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index 4abb5fff1..24ebe0c48 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -63,7 +63,7 @@ export class ApiAccountMastodon { const data = await this.client.search((this.request.query as any).acct, { type: 'accounts' }); return convertAccount(data.data.accounts[0]); } catch (e: any) { - /* console.error(e); + /* console.error(e) console.error(e.response.data); */ return e.response; } diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index a295564b9..46dce6508 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -1,10 +1,13 @@ import querystring from 'querystring'; import { emojiRegexAtStartToEnd } from '@/misc/emoji-regex.js'; -import { convertId, IdConvertType as IdType, convertAccount, convertAttachment, convertPoll, convertStatus, convertStatusSource } from '../converters.js'; +import { convertId, IdConvertType as IdType, convertAccount, convertAttachment, convertPoll, convertStatusSource, MastoConverters } from '../converters.js'; import { getClient } from '../MastodonApiServerService.js'; import { convertTimelinesArgsId, limitToInt } from './timeline.js'; import type { Entity } from 'megalodon'; import type { FastifyInstance } from 'fastify'; +import type { Config } from '@/config.js'; +import { NotesRepository, UsersRepository } from '@/models/_.js'; +import { UserEntityService } from '@/core/entities/UserEntityService.js'; function normalizeQuery(data: any) { const str = querystring.stringify(data); @@ -13,9 +16,11 @@ function normalizeQuery(data: any) { export class ApiStatusMastodon { private fastify: FastifyInstance; + private mastoconverter: MastoConverters; - constructor(fastify: FastifyInstance) { + constructor(fastify: FastifyInstance, config: Config, usersrepo: UsersRepository, notesrepo: NotesRepository, userentity: UserEntityService) { this.fastify = fastify; + this.mastoconverter = new MastoConverters(config, usersrepo, notesrepo, userentity); } public async getStatus() { @@ -25,7 +30,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.getStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(_request.is404 ? 404 : 401).send(e.response.data); @@ -59,8 +64,8 @@ export class ApiStatusMastodon { convertId(_request.params.id, IdType.SharkeyId), convertTimelinesArgsId(limitToInt(query)), ); - data.data.ancestors = data.data.ancestors.map((status: Entity.Status) => convertStatus(status)); - data.data.descendants = data.data.descendants.map((status: Entity.Status) => convertStatus(status)); + data.data.ancestors = await Promise.all(data.data.ancestors.map(async (status: Entity.Status) => await this.mastoconverter.convertStatus(status))); + data.data.descendants = await Promise.all(data.data.descendants.map(async (status: Entity.Status) => await this.mastoconverter.convertStatus(status))); reply.send(data.data); } catch (e: any) { console.error(e); @@ -219,7 +224,7 @@ export class ApiStatusMastodon { } const data = await client.postStatus(text, body); - reply.send(convertStatus(data.data as Entity.Status)); + reply.send(await this.mastoconverter.convertStatus(data.data as Entity.Status)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -240,7 +245,7 @@ export class ApiStatusMastodon { body.media_ids = (body.media_ids as string[]).map((p) => convertId(p, IdType.SharkeyId)); } const data = await client.editStatus(convertId(_request.params.id, IdType.SharkeyId), body); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(_request.is404 ? 404 : 401).send(e.response.data); @@ -258,7 +263,7 @@ export class ApiStatusMastodon { convertId(_request.params.id, IdType.SharkeyId), '❤', )) as any; - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -276,7 +281,7 @@ export class ApiStatusMastodon { convertId(_request.params.id, IdType.SharkeyId), '❤', ); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -291,7 +296,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.reblogStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -306,7 +311,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.unreblogStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -321,7 +326,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.bookmarkStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -336,7 +341,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.unbookmarkStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -351,7 +356,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.pinStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -366,7 +371,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.unpinStatus(convertId(_request.params.id, IdType.SharkeyId)); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -381,7 +386,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.createEmojiReaction(convertId(_request.params.id, IdType.SharkeyId), _request.params.name); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); @@ -396,7 +401,7 @@ export class ApiStatusMastodon { const client = getClient(BASE_URL, accessTokens); try { const data = await client.deleteEmojiReaction(convertId(_request.params.id, IdType.SharkeyId), _request.params.name); - reply.send(convertStatus(data.data)); + reply.send(await this.mastoconverter.convertStatus(data.data)); } catch (e: any) { console.error(e); reply.code(401).send(e.response.data); diff --git a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts index a17120516..bb66a7707 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts @@ -1,8 +1,11 @@ import { ParsedUrlQuery } from 'querystring'; -import { convertId, IdConvertType as IdType, convertAccount, convertConversation, convertList, convertStatus } from '../converters.js'; +import { convertId, IdConvertType as IdType, convertAccount, convertConversation, convertList, MastoConverters } from '../converters.js'; import { getClient } from '../MastodonApiServerService.js'; import type { Entity } from 'megalodon'; import type { FastifyInstance } from 'fastify'; +import type { Config } from '@/config.js'; +import { NotesRepository, UsersRepository } from '@/models/_.js'; +import { UserEntityService } from '@/core/entities/UserEntityService.js'; export function limitToInt(q: ParsedUrlQuery) { const object: any = q; @@ -38,9 +41,11 @@ export function convertTimelinesArgsId(q: ParsedUrlQuery) { export class ApiTimelineMastodon { private fastify: FastifyInstance; + private mastoconverter: MastoConverters; - constructor(fastify: FastifyInstance) { + constructor(fastify: FastifyInstance, config: Config, usersRepository: UsersRepository, notesRepository: NotesRepository, userEntityService: UserEntityService) { this.fastify = fastify; + this.mastoconverter = new MastoConverters(config, usersRepository, notesRepository, userEntityService); } public async getTL() { @@ -53,7 +58,7 @@ export class ApiTimelineMastodon { const data = query.local === 'true' ? await client.getLocalTimeline(convertTimelinesArgsId(argsToBools(limitToInt(query)))) : await client.getPublicTimeline(convertTimelinesArgsId(argsToBools(limitToInt(query)))); - reply.send(data.data.map((status: Entity.Status) => convertStatus(status))); + reply.send(await Promise.all(data.data.map(async (status: Entity.Status) => await this.mastoconverter.convertStatus(status)))); } catch (e: any) { console.error(e); console.error(e.response.data); @@ -70,7 +75,7 @@ export class ApiTimelineMastodon { try { const query: any = _request.query; const data = await client.getHomeTimeline(convertTimelinesArgsId(limitToInt(query))); - reply.send(data.data.map((status: Entity.Status) => convertStatus(status))); + reply.send(await Promise.all(data.data.map(async (status: Entity.Status) => await this.mastoconverter.convertStatus(status)))); } catch (e: any) { console.error(e); console.error(e.response.data); @@ -88,7 +93,7 @@ export class ApiTimelineMastodon { const query: any = _request.query; const params: any = _request.params; const data = await client.getTagTimeline(params.hashtag, convertTimelinesArgsId(limitToInt(query))); - reply.send(data.data.map((status: Entity.Status) => convertStatus(status))); + reply.send(await Promise.all(data.data.map(async (status: Entity.Status) => await this.mastoconverter.convertStatus(status)))); } catch (e: any) { console.error(e); console.error(e.response.data); @@ -106,7 +111,7 @@ export class ApiTimelineMastodon { const query: any = _request.query; const params: any = _request.params; const data = await client.getListTimeline(convertId(params.id, IdType.SharkeyId), convertTimelinesArgsId(limitToInt(query))); - reply.send(data.data.map((status: Entity.Status) => convertStatus(status))); + reply.send(await Promise.all(data.data.map(async (status: Entity.Status) => await this.mastoconverter.convertStatus(status)))); } catch (e: any) { console.error(e); console.error(e.response.data); diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 48939ef7a..570b15da0 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -228,7 +228,7 @@ } button { - border-radius: 999px; + border-radius: 4px; padding: 0px 12px 0px 12px; border: none; cursor: pointer; @@ -296,7 +296,7 @@ margin-bottom: 2rem; padding: 0.5rem 1rem; width: 40rem; - border-radius: 10px; + border-radius: 5px; justify-content: center; margin: auto; } diff --git a/packages/backend/src/server/web/error.css b/packages/backend/src/server/web/error.css index ea3056bda..8bad3d843 100644 --- a/packages/backend/src/server/web/error.css +++ b/packages/backend/src/server/web/error.css @@ -24,7 +24,7 @@ html { } button { - border-radius: 999px; + border-radius: 4px; padding: 0px 12px 0px 12px; border: none; cursor: pointer; @@ -93,7 +93,7 @@ code { background: #333; padding: 0.5rem 1rem; max-width: 40rem; - border-radius: 10px; + border-radius: 5px; justify-content: center; margin: auto; white-space: pre-wrap; diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 08cd80d3d..af0352357 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -39,7 +39,7 @@ html link(rel='prefetch' href=infoImageUrl) link(rel='prefetch' href=notFoundImageUrl) //- https://github.com/misskey-dev/misskey/issues/9842 - link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.35.0') + link(rel='stylesheet' href='/assets/phosphor-icons/bold/style.css') link(rel='modulepreload' href=`/vite/${clientEntry.file}`) if !config.clientManifestExists @@ -51,7 +51,7 @@ html title block title - = title || 'Misskey' + = title || 'Sharkey' block desc meta(name='description' content= desc || '✨🌎✨ A interplanetary communication platform ✨🚀✨') diff --git a/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts b/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts index a7b8cbb03..3640b656b 100644 --- a/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts +++ b/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts @@ -63,7 +63,7 @@ import { M as MkContainer } from './MkContainer-!~{03M}~.js'; import { b as defineComponent, a as ref, e as onMounted, z as resolveComponent, g as openBlock, h as createBlock, i as withCtx, K as createTextVNode, E as toDisplayString, u as unref, l as createBaseVNode, q as normalizeClass, B as createCommentVNode, k as createElementBlock, F as Fragment, C as renderList, A as createVNode } from './vue-!~{002}~.js'; import './photoswipe-!~{003}~.js'; -const _hoisted_1 = /* @__PURE__ */ createBaseVNode("i", { class: "ti ti-photo" }, null, -1); +const _hoisted_1 = /* @__PURE__ */ createBaseVNode("i", { class: "ph-image-square ph-bold ph-lg" }, null, -1); const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index.photos", props: { @@ -179,7 +179,7 @@ import {M as MkContainer} from './MkContainer-!~{03M}~.js'; import {b as defineComponent, a as ref, e as onMounted, z as resolveComponent, g as openBlock, h as createBlock, i as withCtx, K as createTextVNode, E as toDisplayString, u as unref, l as createBaseVNode, q as normalizeClass, B as createCommentVNode, k as createElementBlock, F as Fragment, C as renderList, A as createVNode} from './vue-!~{002}~.js'; import './photoswipe-!~{003}~.js'; const _hoisted_1 = createBaseVNode("i", { - class: "ti ti-photo" + class: "ph-image-square ph-bold ph-lg" }, null, -1); const _sfc_main = defineComponent({ __name: "index.photos", @@ -348,7 +348,7 @@ const _sfc_main = defineComponent({ class: $style["date-1"] }, [ h("i", { - class: \`ti ti-chevron-up \${$style["date-1-icon"]}\` + class: \`ph-caret-up ph-bold ph-lg \${$style["date-1-icon"]}\` }), getDateText(item.createdAt) ]), @@ -357,7 +357,7 @@ const _sfc_main = defineComponent({ }, [ getDateText(props.items[i + 1].createdAt), h("i", { - class: \`ti ti-chevron-down \${$style["date-2-icon"]}\` + class: \`ph-caret-down ph-bold ph-lg \${$style["date-2-icon"]}\` }) ]) ])); @@ -514,11 +514,11 @@ const _sfc_main = defineComponent({ }, [h("span", { class: $style["date-1"] }, [h("i", { - class: \`ti ti-chevron-up \${$style["date-1-icon"]}\` + class: \`ph-caret-up ph-bold ph-lg \${$style["date-1-icon"]}\` }), getDateText(item.createdAt)]), h("span", { class: $style["date-2"] }, [getDateText(props.items[i + 1].createdAt), h("i", { - class: \`ti ti-chevron-down \${$style["date-2-icon"]}\` + class: \`ph-caret-down ph-bold ph-lg \${$style["date-2-icon"]}\` })])])); return [el, separator]; } else { diff --git a/packages/frontend/package.json b/packages/frontend/package.json index f579da3cb..2f62fec68 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -18,12 +18,12 @@ "dependencies": { "@discordapp/twemoji": "14.1.2", "@github/webauthn-json": "2.1.1", + "@phosphor-icons/web": "^2.0.3", "@rollup/plugin-alias": "5.0.0", "@rollup/plugin-json": "6.0.0", "@rollup/plugin-replace": "5.0.2", "@rollup/pluginutils": "5.0.4", "@syuilo/aiscript": "0.16.0", - "@tabler/icons-webfont": "2.35.0", "@vitejs/plugin-vue": "4.3.4", "@vue-macros/reactivity-transform": "0.3.23", "@vue/compiler-sfc": "3.3.4", diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts index c17be6fc6..f19cad331 100644 --- a/packages/frontend/src/account.ts +++ b/packages/frontend/src/account.ts @@ -286,7 +286,7 @@ export async function openAccountMenu(opts: { avatar: $i, }, null, ...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises, { type: 'parent' as const, - icon: 'ti ti-plus', + icon: 'ph-plus ph-bold ph-lg', text: i18n.ts.addAccount, children: [{ text: i18n.ts.existingAccount, @@ -297,12 +297,12 @@ export async function openAccountMenu(opts: { }], }, { type: 'link' as const, - icon: 'ti ti-users', + icon: 'ph-users ph-bold ph-lg', text: i18n.ts.manageAccounts, to: '/settings/accounts', }, { type: 'button' as const, - icon: 'ti ti-power', + icon: 'ph-power ph-bold ph-lg', text: i18n.ts.logout, action: () => { signout(); }, }]], ev.currentTarget ?? ev.target, { diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue index 66114b873..1ef8a205e 100644 --- a/packages/frontend/src/components/MkAbuseReport.vue +++ b/packages/frontend/src/components/MkAbuseReport.vue @@ -84,7 +84,7 @@ function resolve() { box-sizing: border-box; align-items: center; padding: 14px; - border-radius: 8px; + border-radius: 5px; --c: rgb(255 196 0 / 15%); background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%); background-size: 16px 16px; diff --git a/packages/frontend/src/components/MkAbuseReportWindow.vue b/packages/frontend/src/components/MkAbuseReportWindow.vue index 7814681ea..6819630b7 100644 --- a/packages/frontend/src/components/MkAbuseReportWindow.vue +++ b/packages/frontend/src/components/MkAbuseReportWindow.vue @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -80,6 +80,6 @@ const headerTabs = $computed(() => []); definePageMetadata({ title: i18n.ts._theme.install, - icon: 'ti ti-download', + icon: 'ph-download ph-bold ph-lg', }); diff --git a/packages/frontend/src/pages/settings/theme.manage.vue b/packages/frontend/src/pages/settings/theme.manage.vue index 8c90c175f..484e83be4 100644 --- a/packages/frontend/src/pages/settings/theme.manage.vue +++ b/packages/frontend/src/pages/settings/theme.manage.vue @@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only - {{ i18n.ts.uninstall }} + {{ i18n.ts.uninstall }} @@ -78,6 +78,6 @@ const headerTabs = $computed(() => []); definePageMetadata({ title: i18n.ts._theme.manage, - icon: 'ti ti-tool', + icon: 'ph-wrench ph-bold ph-lg', }); diff --git a/packages/frontend/src/pages/settings/theme.vue b/packages/frontend/src/pages/settings/theme.vue index 9e55a8fd8..1f67d3785 100644 --- a/packages/frontend/src/pages/settings/theme.vue +++ b/packages/frontend/src/pages/settings/theme.vue @@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- + @@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -58,10 +58,10 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts._theme.manage }} - {{ i18n.ts._theme.explore }} - {{ i18n.ts._theme.install }} - {{ i18n.ts._theme.make }} + {{ i18n.ts._theme.manage }} + {{ i18n.ts._theme.explore }} + {{ i18n.ts._theme.install }} + {{ i18n.ts._theme.make }}
@@ -166,13 +166,13 @@ const headerTabs = $computed(() => []); definePageMetadata({ title: i18n.ts.theme, - icon: 'ti ti-palette', + icon: 'ph-palette ph-bold ph-lg', }); diff --git a/packages/frontend/src/pages/welcome.setup.vue b/packages/frontend/src/pages/welcome.setup.vue index ec47fc8ad..bac6cc1f0 100644 --- a/packages/frontend/src/pages/welcome.setup.vue +++ b/packages/frontend/src/pages/welcome.setup.vue @@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +
diff --git a/packages/frontend/src/pages/welcome.timeline.vue b/packages/frontend/src/pages/welcome.timeline.vue index f2e151468..823f713d3 100644 --- a/packages/frontend/src/pages/welcome.timeline.vue +++ b/packages/frontend/src/pages/welcome.timeline.vue @@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- + RN: ...
@@ -88,7 +88,7 @@ onUpdated(() => { padding: 16px; margin: 0 0 0 auto; max-width: max-content; - border-radius: 16px; + border-radius: 4px; } .richcontent { diff --git a/packages/frontend/src/scripts/get-drive-file-menu.ts b/packages/frontend/src/scripts/get-drive-file-menu.ts index 096410824..a01df8cf5 100644 --- a/packages/frontend/src/scripts/get-drive-file-menu.ts +++ b/packages/frontend/src/scripts/get-drive-file-menu.ts @@ -78,50 +78,50 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile, folder?: Miss let menu; menu = [{ text: i18n.ts.rename, - icon: 'ti ti-forms', + icon: 'ph-textbox ph-bold ph-lg', action: () => rename(file), }, { text: file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive, - icon: file.isSensitive ? 'ti ti-eye' : 'ti ti-eye-exclamation', + icon: file.isSensitive ? 'ph-eye ph-bold ph-lg' : 'ph-eye-closed ph-bold ph-lg', action: () => toggleSensitive(file), }, { text: i18n.ts.describeFile, - icon: 'ti ti-text-caption', + icon: 'ph-text-indent ph-bold ph-lg', action: () => describe(file), }, ...isImage ? [{ text: i18n.ts.cropImage, - icon: 'ti ti-crop', + icon: 'ph-crop ph-bold ph-lg', action: () => os.cropImage(file, { aspectRatio: NaN, uploadFolder: folder ? folder.id : folder, }), }] : [], null, { text: i18n.ts.createNoteFromTheFile, - icon: 'ti ti-pencil', + icon: 'ph-pencil ph-bold ph-lg', action: () => os.post({ initialFiles: [file], }), }, { text: i18n.ts.copyUrl, - icon: 'ti ti-link', + icon: 'ph-link ph-bold ph-lg', action: () => copyUrl(file), }, { type: 'a', href: file.url, target: '_blank', text: i18n.ts.download, - icon: 'ti ti-download', + icon: 'ph-download ph-bold ph-lg', download: file.name, }, null, { text: i18n.ts.delete, - icon: 'ti ti-trash', + icon: 'ph-trash ph-bold ph-lg', danger: true, action: () => deleteFile(file), }]; if (defaultStore.state.devMode) { menu = menu.concat([null, { - icon: 'ti ti-id', + icon: 'ph-identification-card ph-bold ph-lg', text: i18n.ts.copyFileId, action: () => { copyToClipboard(file.id); diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index 99475d623..4889efe10 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -60,7 +60,7 @@ export async function getNoteClipMenu(props: { ); }, })), null, { - icon: 'ti ti-plus', + icon: 'ph-plus ph-bold ph-lg', text: i18n.ts.createNew, action: async () => { const { canceled, result } = await os.form(i18n.ts.createNewClip, { @@ -94,7 +94,7 @@ export async function getNoteClipMenu(props: { export function getAbuseNoteMenu(note: misskey.entities.Note, text: string): MenuItem { return { - icon: 'ti ti-exclamation-circle', + icon: 'ph-warning-circle ph-bold ph-lg', text, action: (): void => { const u = note.url ?? note.uri ?? `${url}/notes/${note.id}`; @@ -108,7 +108,7 @@ export function getAbuseNoteMenu(note: misskey.entities.Note, text: string): Men export function getCopyNoteLinkMenu(note: misskey.entities.Note, text: string): MenuItem { return { - icon: 'ti ti-link', + icon: 'ph-link ph-bold ph-lg', text, action: (): void => { copyToClipboard(`${url}/notes/${note.id}`); @@ -267,74 +267,74 @@ export function getNoteMenu(props: { menu = [ ...( props.currentClip?.userId === $i.id ? [{ - icon: 'ti ti-backspace', + icon: 'ph-backspace ph-bold ph-lg', text: i18n.ts.unclip, danger: true, action: unclip, }, null] : [] ), { - icon: 'ti ti-info-circle', + icon: 'ph-info ph-bold ph-lg', text: i18n.ts.details, action: openDetail, }, { - icon: 'ti ti-copy', + icon: 'ph-copy ph-bold ph-lg', text: i18n.ts.copyContent, action: copyContent, }, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink) , (appearNote.url || appearNote.uri) ? { - icon: 'ti ti-external-link', + icon: 'ph-arrow-square-out ph-bold ph-lg', text: i18n.ts.showOnRemote, action: () => { window.open(appearNote.url ?? appearNote.uri, '_blank'); }, } : undefined, { - icon: 'ti ti-share', + icon: 'ph-share-network ph-bold pg-lg', text: i18n.ts.share, action: share, }, instance.translatorAvailable ? { - icon: 'ti ti-language-hiragana', + icon: 'ph-translate ph-bold ph-lg', text: i18n.ts.translate, action: translate, } : undefined, null, statePromise.then(state => state.isFavorited ? { - icon: 'ti ti-star-off', + icon: 'ph-star-half ph-bold pg-lg', text: i18n.ts.unfavorite, action: () => toggleFavorite(false), } : { - icon: 'ti ti-star', + icon: 'ph-star ph-bold pg-lg', text: i18n.ts.favorite, action: () => toggleFavorite(true), }), { type: 'parent' as const, - icon: 'ti ti-paperclip', + icon: 'ph-paperclip ph-bold ph-lg', text: i18n.ts.clip, children: () => getNoteClipMenu(props), }, statePromise.then(state => state.isMutedThread ? { - icon: 'ti ti-message-off', + icon: 'ph-bell-slash ph-bold ph-lg', text: i18n.ts.unmuteThread, action: () => toggleThreadMute(false), } : { - icon: 'ti ti-message-off', + icon: 'ph-bell-slash ph-bold ph-lg', text: i18n.ts.muteThread, action: () => toggleThreadMute(true), }), appearNote.userId === $i.id ? ($i.pinnedNoteIds ?? []).includes(appearNote.id) ? { - icon: 'ti ti-pinned-off', + icon: 'ph-push-pin ph-bold ph-lgned-off', text: i18n.ts.unpin, action: () => togglePin(false), } : { - icon: 'ti ti-pin', + icon: 'ph-push-pin ph-bold ph-lg', text: i18n.ts.pin, action: () => togglePin(true), } : undefined, { type: 'parent' as const, - icon: 'ti ti-user', + icon: 'ph-user ph-bold ph-lg', text: i18n.ts.user, children: async () => { const user = appearNote.userId === $i?.id ? $i : await os.api('users/show', { userId: appearNote.userId }); @@ -347,7 +347,7 @@ export function getNoteMenu(props: { ...($i.isModerator || $i.isAdmin ? [ null, { - icon: 'ti ti-speakerphone', + icon: 'ph-megaphone ph-bold ph-lg', text: i18n.ts.promote, action: promote }] @@ -362,18 +362,18 @@ export function getNoteMenu(props: { ...(appearNote.userId === $i.id || $i.isModerator || $i.isAdmin ? [ null, appearNote.userId === $i.id ? { - icon: 'ti ti-pencil', + icon: 'ph-pencil ph-bold ph-lg', text: i18n.ts.edit, action: edit, } : undefined, { - icon: 'ti ti-edit', + icon: 'ph-pencil-line ph-bold pg-lg', text: i18n.ts.deleteAndEdit, danger: true, action: delEdit, }, { - icon: 'ti ti-trash', + icon: 'ph-trash ph-bold ph-lg', text: i18n.ts.delete, danger: true, action: del, @@ -383,16 +383,16 @@ export function getNoteMenu(props: { .filter(x => x !== undefined); } else { menu = [{ - icon: 'ti ti-info-circle', + icon: 'ph-info ph-bold ph-lg', text: i18n.ts.details, action: openDetail, }, { - icon: 'ti ti-copy', + icon: 'ph-copy ph-bold ph-lg', text: i18n.ts.copyContent, action: copyContent, }, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink) , (appearNote.url || appearNote.uri) ? { - icon: 'ti ti-external-link', + icon: 'ph-arrow-square-out ph-bold ph-lg', text: i18n.ts.showOnRemote, action: () => { window.open(appearNote.url ?? appearNote.uri, '_blank'); @@ -403,7 +403,7 @@ export function getNoteMenu(props: { if (noteActions.length > 0) { menu = menu.concat([null, ...noteActions.map(action => ({ - icon: 'ti ti-plug', + icon: 'ph-plug ph-bold ph-lg', text: action.title, action: () => { action.handler(appearNote); @@ -413,7 +413,7 @@ export function getNoteMenu(props: { if (defaultStore.state.devMode) { menu = menu.concat([null, { - icon: 'ti ti-id', + icon: 'ph-identification-card ph-bold ph-lg', text: i18n.ts.copyNoteId, action: () => { copyToClipboard(appearNote.id); diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index 128cbafb1..24ca93495 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -137,46 +137,46 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router } let menu = [{ - icon: 'ti ti-at', + icon: 'ph-at ph-bold ph-lg', text: i18n.ts.copyUsername, action: () => { copyToClipboard(`@${user.username}@${user.host ?? host}`); }, }, ...(iAmModerator ? [{ - icon: 'ti ti-user-exclamation', + icon: 'ph-warning-circle ph-bold ph-lg', text: i18n.ts.moderation, action: () => { router.push(`/admin/user/${user.id}`); }, }] : []), { - icon: 'ti ti-rss', + icon: 'ph-rss ph-bold ph-lg', text: i18n.ts.copyRSS, action: () => { copyToClipboard(`${user.host ?? host}/@${user.username}.atom`); }, }, { - icon: 'ti ti-share', + icon: 'ph-share-network ph-bold pg-lg', text: i18n.ts.copyProfileUrl, action: () => { const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${toUnicode(user.host)}`; copyToClipboard(`${url}/${canonical}`); }, }, { - icon: 'ti ti-mail', + icon: 'ph-envelope ph-bold ph-lg', text: i18n.ts.sendMessage, action: () => { const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${user.host}`; os.post({ specified: user, initialText: `${canonical} ` }); }, }, null, { - icon: 'ti ti-pencil', + icon: 'ph-pencil ph-bold ph-lg', text: i18n.ts.editMemo, action: () => { editMemo(); }, }, { type: 'parent', - icon: 'ti ti-list', + icon: 'ph-list ph-bold pg-lg', text: i18n.ts.addToList, children: async () => { const lists = await userListsCache.fetch(); @@ -209,7 +209,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router }, }, { type: 'parent', - icon: 'ti ti-antenna', + icon: 'ph-flying-saucer ph-bold pg-lg', text: i18n.ts.addToAntenna, children: async () => { const antennas = await antennasCache.fetch(); @@ -240,7 +240,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router if (iAmModerator) { menu = menu.concat([{ type: 'parent', - icon: 'ti ti-badges', + icon: 'ph-seal-check ph-bold pg-lg', text: i18n.ts.roles, children: async () => { const roles = await rolesCache.fetch(); @@ -282,36 +282,36 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router // フォローしたとしても user.isFollowing はリアルタイム更新されないので不便なため //if (user.isFollowing) { menu = menu.concat([{ - icon: user.notify === 'none' ? 'ti ti-bell' : 'ti ti-bell-off', + icon: user.notify === 'none' ? 'ph-bell ph-bold pg-lg' : 'ph-bell ph-bold pg-lg-off', text: user.notify === 'none' ? i18n.ts.notifyNotes : i18n.ts.unnotifyNotes, action: toggleNotify, }]); //} menu = menu.concat([null, { - icon: user.isMuted ? 'ti ti-eye' : 'ti ti-eye-off', + icon: user.isMuted ? 'ph-eye ph-bold ph-lg' : 'ph-eye-slash ph-bold ph-lg', text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute, action: toggleMute, }, { - icon: user.isRenoteMuted ? 'ti ti-repeat' : 'ti ti-repeat-off', + icon: user.isRenoteMuted ? 'ph-repeat ph-bold ph-lg' : 'ph-repeat ph-bold ph-lg-off', text: user.isRenoteMuted ? i18n.ts.renoteUnmute : i18n.ts.renoteMute, action: toggleRenoteMute, }, { - icon: 'ti ti-ban', + icon: 'ph-prohibit ph-bold ph-lg', text: user.isBlocking ? i18n.ts.unblock : i18n.ts.block, action: toggleBlock, }]); if (user.isFollowed) { menu = menu.concat([{ - icon: 'ti ti-link-off', + icon: 'ph-link ph-bold ph-lg-off', text: i18n.ts.breakFollow, action: invalidateFollow, }]); } menu = menu.concat([null, { - icon: 'ti ti-exclamation-circle', + icon: 'ph-warning-circle ph-bold ph-lg', text: i18n.ts.reportAbuse, action: reportAbuse, }]); @@ -319,7 +319,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router if (defaultStore.state.devMode) { menu = menu.concat([null, { - icon: 'ti ti-id', + icon: 'ph-identification-card ph-bold ph-lg', text: i18n.ts.copyUserId, action: () => { copyToClipboard(user.id); @@ -329,7 +329,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router if ($i && meId === user.id) { menu = menu.concat([null, { - icon: 'ti ti-pencil', + icon: 'ph-pencil ph-bold ph-lg', text: i18n.ts.editProfile, action: () => { router.push('/settings/profile'); @@ -339,7 +339,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router if (userActions.length > 0) { menu = menu.concat([null, ...userActions.map(action => ({ - icon: 'ti ti-plug', + icon: 'ph-plug ph-bold ph-lg', text: action.title, action: () => { action.handler(user); diff --git a/packages/frontend/src/scripts/select-file.ts b/packages/frontend/src/scripts/select-file.ts index 53e2cd5b1..674c762fa 100644 --- a/packages/frontend/src/scripts/select-file.ts +++ b/packages/frontend/src/scripts/select-file.ts @@ -92,15 +92,15 @@ function select(src: any, label: string | null, multiple: boolean): Promise chooseFileFromPc(multiple, keepOriginal.value).then(files => res(files)), }, { text: i18n.ts.fromDrive, - icon: 'ti ti-cloud', + icon: 'ph-cloud ph-bold ph-lg', action: () => chooseFileFromDrive(multiple).then(files => res(files)), }, { text: i18n.ts.fromUrl, - icon: 'ti ti-link', + icon: 'ph-link ph-bold ph-lg', action: () => chooseFileFromUrl().then(file => res([file])), }], src); }); diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index 1ef41b47d..fca25c737 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -17,7 +17,7 @@ export const soundConfigStore = markRaw(new Storage('sound', { }, sound_note: { where: 'account', - default: { type: 'syuilo/n-aec', volume: 1 }, + default: { type: 'syuilo/n-aec', volume: 0 }, }, sound_noteMy: { where: 'account', diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 37bc6e341..60b862276 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -63,11 +63,11 @@ export const defaultStore = markRaw(new Storage('base', { }, collapseRenotes: { where: 'account', - default: true, + default: false, }, collapseFiles: { where: 'account', - default: true, + default: false, }, rememberNoteVisibility: { where: 'account', @@ -203,7 +203,7 @@ export const defaultStore = markRaw(new Storage('base', { }, animatedMfm: { where: 'device', - default: false, + default: true, }, advancedMfm: { where: 'device', @@ -307,7 +307,7 @@ export const defaultStore = markRaw(new Storage('base', { }, squareAvatars: { where: 'device', - default: false, + default: true, }, postFormWithHashtags: { where: 'device', diff --git a/packages/frontend/src/style.scss b/packages/frontend/src/style.scss index 6efb6077c..df2f953c5 100644 --- a/packages/frontend/src/style.scss +++ b/packages/frontend/src/style.scss @@ -15,7 +15,7 @@ */ :root { - --radius: 12px; + --radius: 5px; --marginFull: 16px; --marginHalf: 10px; @@ -140,7 +140,7 @@ hr { background: var(--divider); } -.ti { +.ph-bold { width: 1.28em; vertical-align: -12%; line-height: 1em; @@ -391,7 +391,7 @@ hr { vertical-align: bottom; height: 128px; margin-bottom: 16px; - border-radius: 16px; + border-radius: 4px; } } diff --git a/packages/frontend/src/ui/_common_/announcements.vue b/packages/frontend/src/ui/_common_/announcements.vue index 2b1133d47..913fa35cc 100644 --- a/packages/frontend/src/ui/_common_/announcements.vue +++ b/packages/frontend/src/ui/_common_/announcements.vue @@ -12,10 +12,10 @@ SPDX-License-Identifier: AGPL-3.0-only to="/announcements" > - - - - + + + + {{ announcement.title }} {{ announcement.text }} diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts index 49fe5a834..3810be4fe 100644 --- a/packages/frontend/src/ui/_common_/common.ts +++ b/packages/frontend/src/ui/_common_/common.ts @@ -16,61 +16,61 @@ export function openInstanceMenu(ev: MouseEvent) { }, { type: 'link', text: i18n.ts.instanceInfo, - icon: 'ti ti-info-circle', + icon: 'ph-info ph-bold ph-lg', to: '/about', }, { type: 'link', text: i18n.ts.customEmojis, - icon: 'ti ti-icons', + icon: 'ph-smiley ph-bold pg-lg', to: '/about#emojis', }, { type: 'link', text: i18n.ts.federation, - icon: 'ti ti-whirl', + icon: 'ph-globe-hemisphere-west ph-bold ph-lg', to: '/about#federation', }, { type: 'link', text: i18n.ts.charts, - icon: 'ti ti-chart-line', + icon: 'ph-chart-line ph-bold pg-lg', to: '/about#charts', }, null, { type: 'link', text: i18n.ts.ads, - icon: 'ti ti-ad', + icon: 'ph-flag ph-bold ph-lg', to: '/ads', }, ($i && ($i.isAdmin || $i.policies.canInvite) && instance.disableRegistration) ? { type: 'link', to: '/invite', text: i18n.ts.invite, - icon: 'ti ti-user-plus', + icon: 'ph-user-plus ph-bold ph-lg', } : undefined, { type: 'parent', text: i18n.ts.tools, - icon: 'ti ti-tool', + icon: 'ph-wrench ph-bold ph-lg', children: [{ type: 'link', to: '/scratchpad', text: i18n.ts.scratchpad, - icon: 'ti ti-terminal-2', + icon: 'ph-terminal-window ph-bold ph-lg-2', }, { type: 'link', to: '/api-console', text: 'API Console', - icon: 'ti ti-terminal-2', + icon: 'ph-terminal-window ph-bold ph-lg-2', }, { type: 'link', to: '/clicker', text: '🍪👈', - icon: 'ti ti-cookie', + icon: 'ph-cookie ph-bold pg-lg', }, ($i && ($i.isAdmin || $i.policies.canManageCustomEmojis)) ? { type: 'link', to: '/custom-emojis-manager', text: i18n.ts.manageCustomEmojis, - icon: 'ti ti-icons', + icon: 'ph-smiley ph-bold pg-lg', } : undefined], }, null, { text: i18n.ts.help, - icon: 'ti ti-help-circle', + icon: 'ph-question ph-bold ph-lg', action: () => { window.open('https://misskey-hub.net/help.html', '_blank'); }, diff --git a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue index eed4cc777..70dbc7e0b 100644 --- a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue +++ b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.timeline }} + {{ i18n.ts.timeline }}
- {{ i18n.ts.controlPanel }} + {{ i18n.ts.controlPanel }} - {{ i18n.ts.settings }} + {{ i18n.ts.settings }}
- {{ i18n.ts.timeline }} + {{ i18n.ts.timeline }}
- {{ i18n.ts.controlPanel }} + {{ i18n.ts.controlPanel }} - {{ i18n.ts.settings }} + {{ i18n.ts.settings }}