Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into merge-upstream-24
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Jan 21, 2025
2 parents 2bbfa7e + 31ccefa commit 7812eb4
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-misskey-js-autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: setup node
id: setup-node
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version-file: '.node-version'
cache: pnpm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4.0.4
- uses: actions/setup-node@v4.1.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down Expand Up @@ -67,14 +67,14 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4.0.4
- uses: actions/setup-node@v4.1.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Restore eslint cache
uses: actions/cache@v4.1.0
uses: actions/cache@v4.2.0
with:
path: ${{ env.eslint-cache-path }}
key: eslint-${{ env.eslint-cache-version }}-${{ matrix.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }}
Expand All @@ -97,7 +97,7 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4.0.4
- uses: actions/setup-node@v4.1.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4.0.4
- uses: actions/setup-node@v4.1.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
fi
done
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-federation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
fi
done
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.3
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- run: corepack enable

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-api-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.4
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Enhance: ノートの添付ファイルを一覧で遡れる「ファイル」タブを追加
(Based on https://github.com/Otaku-Social/maniakey/pull/14)
- Enhance: AiScriptの拡張API関数において引数の型チェックをより厳格に
- Enhance: クエリパラメータでuiを一時的に変更できるように #15240
- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
- Fix: サーバー情報メニューに区切り線が不足していたのを修正
- Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正
Expand Down
5 changes: 5 additions & 0 deletions packages/backend/src/core/activitypub/misc/contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ const extension_context_definition = {
'_misskey_requireSigninToViewContents': 'misskey:_misskey_requireSigninToViewContents',
'_misskey_makeNotesFollowersOnlyBefore': 'misskey:_misskey_makeNotesFollowersOnlyBefore',
'_misskey_makeNotesHiddenBefore': 'misskey:_misskey_makeNotesHiddenBefore',
'_misskey_license': 'misskey:_misskey_license',
'freeText': {
'@id': 'misskey:freeText',
'@type': 'schema:text',
},
'isCat': 'misskey:isCat',
// vcard
vcard: 'http://www.w3.org/2006/vcard/ns#',
Expand Down
40 changes: 33 additions & 7 deletions packages/frontend/src/boot/main-boot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { createApp, defineAsyncComponent, markRaw } from 'vue';
import { ui } from '@@/js/config.js';
import { common } from './common.js';
import type * as Misskey from 'misskey-js';
import type { Component } from 'vue';
import { i18n } from '@/i18n.js';
import { alert, confirm, popup, post, toast } from '@/os.js';
import { useStream } from '@/stream.js';
Expand All @@ -26,13 +27,38 @@ import { type Keymap, makeHotkey } from '@/scripts/hotkey.js';
import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js';

export async function mainBoot() {
const { isClientUpdated } = await common(() => createApp(
new URLSearchParams(window.location.search).has('zen') || (ui === 'deck' && deckStore.state.useSimpleUiForNonRootPages && location.pathname !== '/') ? defineAsyncComponent(() => import('@/ui/zen.vue')) :
!$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) :
ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) :
ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) :
defineAsyncComponent(() => import('@/ui/universal.vue')),
));
const { isClientUpdated } = await common(() => {
let uiStyle = ui;
const searchParams = new URLSearchParams(window.location.search);

if (!$i) uiStyle = 'visitor';

if (searchParams.has('zen')) uiStyle = 'zen';
if (uiStyle === 'deck' && deckStore.state.useSimpleUiForNonRootPages && location.pathname !== '/') uiStyle = 'zen';

if (searchParams.has('ui')) uiStyle = searchParams.get('ui');

let rootComponent: Component;
switch (uiStyle) {
case 'zen':
rootComponent = defineAsyncComponent(() => import('@/ui/zen.vue'));
break;
case 'deck':
rootComponent = defineAsyncComponent(() => import('@/ui/deck.vue'));
break;
case 'visitor':
rootComponent = defineAsyncComponent(() => import('@/ui/visitor.vue'));
break;
case 'classic':
rootComponent = defineAsyncComponent(() => import('@/ui/classic.vue'));
break;
default:
rootComponent = defineAsyncComponent(() => import('@/ui/universal.vue'));
break;
}

return createApp(rootComponent);
});

reactionPicker.init();
emojiPicker.init();
Expand Down
19 changes: 16 additions & 3 deletions packages/frontend/src/components/MkInstanceTicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { instance as localInstance } from '@/instance.js';
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';

const props = defineProps<{
host: string | null;
instance?: {
faviconUrl?: string | null
name?: string | null
Expand All @@ -25,12 +26,24 @@ const props = defineProps<{
}>();

// if no instance data is given, this is for the local instance
const instanceName = computed(() => props.instance?.name ?? localInstanceName);
const instanceName = computed(() => props.host == null ? localInstanceName : props.instance?.name ?? props.host);

const faviconUrl = computed(() => getProxiedImageUrlNullable(props.instance?.faviconUrl ?? localInstance.iconUrl, 'preview') ?? '/favicon.ico');
const faviconUrl = computed(() => {
let imageSrc: string | null = null;
if (props.host == null) {
if (localInstance.iconUrl == null) {
return '/favicon.ico';
} else {
imageSrc = localInstance.iconUrl;
}
} else {
imageSrc = props.instance?.faviconUrl ?? null;
}
return getProxiedImageUrlNullable(imageSrc);
});

const themeColorStyle = computed<CSSProperties>(() => {
const themeColor = props.instance?.themeColor ?? localInstance.themeColor ?? '#777777';
const themeColor = (props.host == null ? localInstance.themeColor : props.instance?.themeColor) ?? '#777777';
return {
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock"/>
<div :class="$style.main">
<MkNoteHeader :note="appearNote" :mini="true"/>
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
<MkInstanceTicker v-if="showTicker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
<div style="container-type: inline-size;">
<p v-if="appearNote.cw != null" :class="$style.cw">
<Mfm
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<img v-for="(role, i) in appearNote.user.badgeRoles" :key="i" v-tooltip="role.name" :class="$style.noteHeaderBadgeRole" :src="role.iconUrl!"/>
</div>
</div>
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
<MkInstanceTicker v-if="showTicker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
</div>
</header>
<div :class="$style.noteContent">
Expand Down

0 comments on commit 7812eb4

Please sign in to comment.