-
+
{{ i18n.ts._initialAccountSetting.initialAccountSettingCompleted }}
{{ i18n.tsx._initialAccountSetting.youCanContinueTutorial({ name: instance.name ?? host }) }}
@@ -223,7 +223,7 @@ async function later(later: boolean) {
.progressBarValue {
height: 100%;
- background: linear-gradient(90deg, var(--buttonGradateA), var(--buttonGradateB));
+ background: linear-gradient(90deg, var(--MI_THEME-buttonGradateA), var(--MI_THEME-buttonGradateB));
transition: all 0.5s cubic-bezier(0,.5,.5,1);
}
@@ -252,7 +252,7 @@ async function later(later: boolean) {
left: 0;
flex-shrink: 0;
padding: 12px;
- border-top: solid 0.5px var(--divider);
+ border-top: solid 0.5px var(--MI_THEME-divider);
-webkit-backdrop-filter: blur(15px);
backdrop-filter: blur(15px);
}
diff --git a/packages/frontend/src/components/MkUsersTooltip.vue b/packages/frontend/src/components/MkUsersTooltip.vue
index 054a503257..0cb7f22e93 100644
--- a/packages/frontend/src/components/MkUsersTooltip.vue
+++ b/packages/frontend/src/components/MkUsersTooltip.vue
@@ -16,12 +16,12 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue
index 50bec990a1..f600f7eed2 100644
--- a/packages/frontend/src/components/global/MkTime.vue
+++ b/packages/frontend/src/components/global/MkTime.vue
@@ -99,10 +99,10 @@ if (!invalid && props.origin === null && (props.mode === 'relative' || props.mod
diff --git a/packages/frontend/src/components/global/RouterView.vue b/packages/frontend/src/components/global/RouterView.vue
index 19bd794a5d..38bdfc52d4 100644
--- a/packages/frontend/src/components/global/RouterView.vue
+++ b/packages/frontend/src/components/global/RouterView.vue
@@ -27,6 +27,7 @@ import MkLoadingPage from '@/pages/_loading_.vue';
const props = defineProps<{
router?: IRouter;
+ nested?: boolean;
}>();
const router = props.router ?? inject('router');
@@ -39,6 +40,8 @@ const currentDepth = inject('routerCurrentDepth', 0);
provide('routerCurrentDepth', currentDepth + 1);
function resolveNested(current: Resolved, d = 0): Resolved | null {
+ if (!props.nested) return current;
+
if (d === currentDepth) {
return current;
} else {
diff --git a/packages/frontend/src/components/page/page.dynamic.vue b/packages/frontend/src/components/page/page.dynamic.vue
index 8c511a690d..c2449931c1 100644
--- a/packages/frontend/src/components/page/page.dynamic.vue
+++ b/packages/frontend/src/components/page/page.dynamic.vue
@@ -27,9 +27,9 @@ const props = defineProps<{
diff --git a/packages/frontend/src/directives/adaptive-bg.ts b/packages/frontend/src/directives/adaptive-bg.ts
index 23fd1bddf4..f88996019f 100644
--- a/packages/frontend/src/directives/adaptive-bg.ts
+++ b/packages/frontend/src/directives/adaptive-bg.ts
@@ -4,24 +4,16 @@
*/
import { Directive } from 'vue';
+import { getBgColor } from '@/scripts/get-bg-color.js';
export default {
mounted(src, binding, vn) {
- const getBgColor = (el: HTMLElement) => {
- const style = window.getComputedStyle(el);
- if (style.backgroundColor && !['rgba(0, 0, 0, 0)', 'rgba(0,0,0,0)', 'transparent'].includes(style.backgroundColor)) {
- return style.backgroundColor;
- } else {
- return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
- }
- };
-
- const parentBg = getBgColor(src.parentElement);
+ const parentBg = getBgColor(src.parentElement) ?? 'transparent';
const myBg = window.getComputedStyle(src).backgroundColor;
if (parentBg === myBg) {
- src.style.backgroundColor = 'var(--bg)';
+ src.style.backgroundColor = 'var(--MI_THEME-bg)';
} else {
src.style.backgroundColor = myBg;
}
diff --git a/packages/frontend/src/directives/adaptive-border.ts b/packages/frontend/src/directives/adaptive-border.ts
index b436075fcd..1305f312bd 100644
--- a/packages/frontend/src/directives/adaptive-border.ts
+++ b/packages/frontend/src/directives/adaptive-border.ts
@@ -4,24 +4,16 @@
*/
import { Directive } from 'vue';
+import { getBgColor } from '@/scripts/get-bg-color.js';
export default {
mounted(src, binding, vn) {
- const getBgColor = (el: HTMLElement) => {
- const style = window.getComputedStyle(el);
- if (style.backgroundColor && !['rgba(0, 0, 0, 0)', 'rgba(0,0,0,0)', 'transparent'].includes(style.backgroundColor)) {
- return style.backgroundColor;
- } else {
- return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
- }
- };
-
- const parentBg = getBgColor(src.parentElement);
+ const parentBg = getBgColor(src.parentElement) ?? 'transparent';
const myBg = window.getComputedStyle(src).backgroundColor;
if (parentBg === myBg) {
- src.style.borderColor = 'var(--divider)';
+ src.style.borderColor = 'var(--MI_THEME-divider)';
} else {
src.style.borderColor = myBg;
}
diff --git a/packages/frontend/src/directives/panel.ts b/packages/frontend/src/directives/panel.ts
index bbcc220e09..aa26b94d0b 100644
--- a/packages/frontend/src/directives/panel.ts
+++ b/packages/frontend/src/directives/panel.ts
@@ -4,26 +4,18 @@
*/
import { Directive } from 'vue';
+import { getBgColor } from '@/scripts/get-bg-color.js';
export default {
mounted(src, binding, vn) {
- const getBgColor = (el: HTMLElement) => {
- const style = window.getComputedStyle(el);
- if (style.backgroundColor && !['rgba(0, 0, 0, 0)', 'rgba(0,0,0,0)', 'transparent'].includes(style.backgroundColor)) {
- return style.backgroundColor;
- } else {
- return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
- }
- };
+ const parentBg = getBgColor(src.parentElement) ?? 'transparent';
- const parentBg = getBgColor(src.parentElement);
-
- const myBg = getComputedStyle(document.documentElement).getPropertyValue('--panel');
+ const myBg = getComputedStyle(document.documentElement).getPropertyValue('--MI_THEME-panel');
if (parentBg === myBg) {
- src.style.backgroundColor = 'var(--bg)';
+ src.style.backgroundColor = 'var(--MI_THEME-bg)';
} else {
- src.style.backgroundColor = 'var(--panel)';
+ src.style.backgroundColor = 'var(--MI_THEME-panel)';
}
},
} as Directive;
diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts
index ac730f8021..096d404a57 100644
--- a/packages/frontend/src/navbar.ts
+++ b/packages/frontend/src/navbar.ts
@@ -40,7 +40,6 @@ export const navbarItemDef = reactive({
followRequests: {
title: i18n.ts.followRequests,
icon: 'ti ti-user-plus',
- show: computed(() => $i != null && $i.isLocked),
indicated: computed(() => $i != null && $i.hasPendingReceivedFollowRequest),
to: '/my/follow-requests',
},
diff --git a/packages/frontend/src/nirax.ts b/packages/frontend/src/nirax.ts
index 25f853453a..965bd6f0bc 100644
--- a/packages/frontend/src/nirax.ts
+++ b/packages/frontend/src/nirax.ts
@@ -36,6 +36,8 @@ interface RouteDefWithRedirect extends RouteDefBase {
export type RouteDef = RouteDefWithComponent | RouteDefWithRedirect;
+export type RouterFlag = 'forcePage';
+
type ParsedPath = (string | {
name: string;
startsWith?: string;
@@ -107,7 +109,7 @@ export interface IRouter extends EventEmitter {
current: Resolved;
currentRef: ShallowRef;
currentRoute: ShallowRef;
- navHook: ((path: string, flag?: any) => boolean) | null;
+ navHook: ((path: string, flag?: RouterFlag) => boolean) | null;
/**
* ルートの初期化(eventListenerの定義後に必ず呼び出すこと)
@@ -116,11 +118,11 @@ export interface IRouter extends EventEmitter {
resolve(path: string): Resolved | null;
- getCurrentPath(): any;
+ getCurrentPath(): string;
getCurrentKey(): string;
- push(path: string, flag?: any): void;
+ push(path: string, flag?: RouterFlag): void;
replace(path: string, key?: string | null): void;
@@ -197,7 +199,7 @@ export class Router extends EventEmitter implements IRouter {
private currentKey = Date.now().toString();
private redirectCount = 0;
- public navHook: ((path: string, flag?: any) => boolean) | null = null;
+ public navHook: ((path: string, flag?: RouterFlag) => boolean) | null = null;
constructor(routes: Router['routes'], currentPath: Router['currentPath'], isLoggedIn: boolean, notFoundPageComponent: Component) {
super();
@@ -404,7 +406,7 @@ export class Router extends EventEmitter implements IRouter {
return this.currentKey;
}
- public push(path: string, flag?: any) {
+ public push(path: string, flag?: RouterFlag) {
const beforePath = this.currentPath;
if (path === beforePath) {
this.emit('same');
diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts
index 60e4218a48..ea1b673de9 100644
--- a/packages/frontend/src/os.ts
+++ b/packages/frontend/src/os.ts
@@ -10,6 +10,7 @@ import { EventEmitter } from 'eventemitter3';
import * as Misskey from 'misskey-js';
import type { ComponentProps as CP } from 'vue-component-type-helpers';
import type { Form, GetFormResultType } from '@/scripts/form.js';
+import type { MenuItem } from '@/types/menu.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
@@ -22,19 +23,20 @@ import MkPasswordDialog from '@/components/MkPasswordDialog.vue';
import MkEmojiPickerDialog from '@/components/MkEmojiPickerDialog.vue';
import MkPopupMenu from '@/components/MkPopupMenu.vue';
import MkContextMenu from '@/components/MkContextMenu.vue';
-import type { MenuItem } from '@/types/menu.js';
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js';
import { pleaseLogin } from '@/scripts/please-login.js';
import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
import { getHTMLElementOrNull } from '@/scripts/get-dom-node-or-null.js';
import { focusParent } from '@/scripts/focus.js';
+import type { PostFormProps } from '@/types/post-form.js';
export const openingWindowsCount = ref(0);
-export const apiWithDialog = ((
+export const apiWithDialog = ((
endpoint: E,
- data: P = {} as any,
+ data: P,
token?: string | null | undefined,
+ customErrors?: Record,
) => {
const promise = misskeyApi(endpoint, data, token);
promiseDialog(promise, null, async (err) => {
@@ -77,6 +79,9 @@ export const apiWithDialog = (>(
promise: T,
- onSuccess?: ((res: any) => void) | null,
+ onSuccess?: ((res: Awaited) => void) | null,
onFailure?: ((err: Misskey.api.APIError) => void) | null,
text?: string,
): T {
@@ -132,12 +137,12 @@ export function promiseDialog>(
}
let popupIdCount = 0;
-export const popups = ref([]) as Ref<{
+export const popups = ref<{
id: number;
component: Component;
props: Record;
events: Record;
-}[]>;
+}[]>([]);
const zIndexes = {
veryLow: 500000,
@@ -454,7 +459,7 @@ type SelectItem = {
};
// default が指定されていたら result は null になり得ないことを保証する overload function
-export function select(props: {
+export function select(props: {
title?: string;
text?: string;
default: string;
@@ -467,7 +472,7 @@ export function select(props: {
} | {
canceled: false; result: C;
}>;
-export function select(props: {
+export function select(props: {
title?: string;
text?: string;
default?: string | null;
@@ -480,7 +485,7 @@ export function select(props: {
} | {
canceled: false; result: C | null;
}>;
-export function select(props: {
+export function select(props: {
title?: string;
text?: string;
default?: string | null;
@@ -683,15 +688,17 @@ export function contextMenu(items: MenuItem[], ev: MouseEvent): Promise {
}));
}
-export function post(props: Record = {}): Promise {
- pleaseLogin(undefined, (props.initialText || props.initialNote ? {
- type: 'share',
- params: {
- text: props.initialText ?? props.initialNote.text,
- visibility: props.initialVisibility ?? props.initialNote?.visibility,
- localOnly: (props.initialLocalOnly || props.initialNote?.localOnly) ? '1' : '0',
- },
- } : undefined));
+export function post(props: PostFormProps = {}): Promise {
+ pleaseLogin({
+ openOnRemote: (props.initialText || props.initialNote ? {
+ type: 'share',
+ params: {
+ text: props.initialText ?? props.initialNote?.text ?? '',
+ visibility: props.initialVisibility ?? props.initialNote?.visibility ?? 'public',
+ localOnly: (props.initialLocalOnly || props.initialNote?.localOnly) ? '1' : '0',
+ },
+ } : undefined),
+ });
showMovedDialog();
return new Promise(resolve => {
diff --git a/packages/frontend/src/pages/about-misskey.vue b/packages/frontend/src/pages/about-misskey.vue
index 960df59485..f2becfd8f5 100644
--- a/packages/frontend/src/pages/about-misskey.vue
+++ b/packages/frontend/src/pages/about-misskey.vue
@@ -266,6 +266,15 @@ const patronsWithIcon = [{
}, {
name: 'なっかあ',
icon: 'https://assets.misskey-hub.net/patrons/c2f5f3e394e74a64912284a2f4ca710e.jpg',
+}, {
+ name: '如月ユカ',
+ icon: 'https://assets.misskey-hub.net/patrons/f24a042076a041b6811a2f124eb620ca.jpg',
+}, {
+ name: 'Yatoigawa',
+ icon: 'https://assets.misskey-hub.net/patrons/505e3568885a4a488431a8f22b4553d0.jpg',
+}, {
+ name: '秋瀬カヲル',
+ icon: 'https://assets.misskey-hub.net/patrons/0f22aeb866484f4fa51db6721e3f9847.jpg',
}];
const patrons = [
@@ -371,6 +380,10 @@ const patrons = [
'塩キャベツ',
'はとぽぷさん',
'100の人 (エスパー・イーシア)',
+ 'ケモナーのケシン',
+ 'こまつぶり',
+ 'まゆつな空高',
+ 'asata',
];
const thereIsTreasure = ref($i && !claimedAchievements.includes('foundTreasure'));
@@ -440,7 +453,7 @@ definePageMetadata(() => ({
.znqjceqz {
> .about {
position: relative;
- border-radius: var(--radius);
+ border-radius: var(--MI-radius);
> .treasure {
position: absolute;
@@ -528,17 +541,17 @@ definePageMetadata(() => ({
display: flex;
align-items: center;
padding: 12px;
- background: var(--buttonBg);
+ background: var(--MI_THEME-buttonBg);
border-radius: 6px;
&:hover {
text-decoration: none;
- background: var(--buttonHoverBg);
+ background: var(--MI_THEME-buttonHoverBg);
}
&.active {
- color: var(--accent);
- background: var(--buttonHoverBg);
+ color: var(--MI_THEME-accent);
+ background: var(--MI_THEME-buttonHoverBg);
}
}
@@ -561,7 +574,7 @@ definePageMetadata(() => ({
display: flex;
align-items: center;
padding: 12px;
- background: var(--buttonBg);
+ background: var(--MI_THEME-buttonBg);
border-radius: 6px;
}
diff --git a/packages/frontend/src/pages/about.federation.vue b/packages/frontend/src/pages/about.federation.vue
index b3776c67e6..0a7cb8a50b 100644
--- a/packages/frontend/src/pages/about.federation.vue
+++ b/packages/frontend/src/pages/about.federation.vue
@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.host }}
-
+
{{ i18n.ts.state }}
diff --git a/packages/frontend/src/pages/about.overview.vue b/packages/frontend/src/pages/about.overview.vue
index b645506eff..e5e57c05c4 100644
--- a/packages/frontend/src/pages/about.overview.vue
+++ b/packages/frontend/src/pages/about.overview.vue
@@ -147,7 +147,7 @@ const initStats = () => misskeyApi('stats', {});
text-align: center;
border-radius: 10px;
overflow: clip;
- background-color: var(--panel);
+ background-color: var(--MI_THEME-panel);
background-size: cover;
background-position: center center;
}
@@ -183,14 +183,14 @@ const initStats = () => misskeyApi('stats', {});
flex-shrink: 0;
display: flex;
position: sticky;
- top: calc(var(--stickyTop, 0px) + 8px);
+ top: calc(var(--MI-stickyTop, 0px) + 8px);
counter-increment: item;
content: counter(item);
width: 32px;
height: 32px;
line-height: 32px;
- background-color: var(--accentedBg);
- color: var(--accent);
+ background-color: var(--MI_THEME-accentedBg);
+ color: var(--MI_THEME-accent);
font-size: 13px;
font-weight: bold;
align-items: center;
diff --git a/packages/frontend/src/pages/admin-file.vue b/packages/frontend/src/pages/admin-file.vue
index d8311186ab..60f6be51d4 100644
--- a/packages/frontend/src/pages/admin-file.vue
+++ b/packages/frontend/src/pages/admin-file.vue
@@ -44,6 +44,9 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.delete }}
+