Merge remote-tracking branch 'misskey-original/develop' into develop
# Conflicts: # package.json # packages/backend/src/server/api/stream/ChannelsService.ts # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/mute-block.vue
This commit is contained in:
commit
d19a4ab8a3
208 changed files with 1404 additions and 740 deletions
|
|
@ -38,14 +38,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||
import bytes from '@/filters/bytes.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { dateString } from '@/filters/date.js';
|
||||
|
||||
const props = defineProps<{
|
||||
pagination: Paging;
|
||||
pagination: any;
|
||||
viewMode: 'grid' | 'list';
|
||||
}>();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ import { claimAchievement } from '@/scripts/achievements.js';
|
|||
import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
||||
import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
|
||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ const renotesPagination = computed(() => ({
|
|||
params: {
|
||||
noteId: appearNote.value.id,
|
||||
},
|
||||
} satisfies Paging));
|
||||
}));
|
||||
|
||||
const reactionsPagination = computed(() => ({
|
||||
endpoint: 'notes/reactions',
|
||||
|
|
@ -342,7 +342,7 @@ const reactionsPagination = computed(() => ({
|
|||
noteId: appearNote.value.id,
|
||||
type: reactionTabType.value,
|
||||
},
|
||||
} satisfies Paging));
|
||||
}));
|
||||
|
||||
useNoteCapture({
|
||||
rootEl: el,
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<button v-tooltip="i18n.ts.hashtags" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: withHashtags }]" @click="withHashtags = !withHashtags"><i class="ti ti-hash"></i></button>
|
||||
<button v-if="postFormActions.length > 0" v-tooltip="i18n.ts.plugin" class="_button" :class="$style.footerButton" @click="showActions"><i class="ti ti-plug"></i></button>
|
||||
<button v-tooltip="i18n.ts.emoji" :class="['_button', $style.footerButton]" @click="insertEmoji"><i class="ti ti-mood-happy"></i></button>
|
||||
<button v-tooltip="i18n.ts.mfm" :class="['_button', $style.footerButton]" @click="insertMfm"><i class="ti ti-wand"></i></button>
|
||||
<button v-tooltip="i18n.ts.ruby" :class="['_button', $style.footerButton]" @click="insertRuby"><i class="ti ti-abc"></i></button>
|
||||
</div>
|
||||
<button v-if="showAddMfmFunction" v-tooltip="i18n.ts.addMfmFunction" :class="['_button', $style.footerButton]" @click="insertMfmFunction"><i class="ti ti-palette"></i></button>
|
||||
<button v-tooltip="i18n.ts.ruby" :class="['_button', $style.footerButton]" @click="insertRuby"><i class="ti ti-abc"></i></button>
|
||||
</div>
|
||||
<div :class="$style.footerRight">
|
||||
<button v-tooltip="i18n.ts.previewNoteText" class="_button" :class="[$style.footerButton, { [$style.previewButtonActive]: showPreview }]" @click="showPreview = !showPreview"><i class="ti ti-eye"></i></button>
|
||||
<!--<button v-tooltip="i18n.ts.more" class="_button" :class="$style.footerButton" @click="showingOptions = !showingOptions"><i class="ti ti-dots"></i></button>-->
|
||||
|
|
@ -136,8 +136,7 @@ import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
|||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { claimAchievement } from '@/scripts/achievements.js';
|
||||
import { emojiPicker } from '@/scripts/emoji-picker.js';
|
||||
import MkScheduleEditor from '@/components/MkScheduleEditor.vue';
|
||||
import { listSchedulePost } from '@/os.js';
|
||||
import { mfmFunctionPicker } from '@/scripts/mfm-function-picker.js';
|
||||
|
||||
const modal = inject('modal');
|
||||
let gamingType = computed(defaultStore.makeGetterSetter('gamingType'));
|
||||
|
|
@ -200,6 +199,8 @@ let schedule = ref<{
|
|||
const useCw = ref<boolean>(!!props.initialCw);
|
||||
const showPreview = ref(defaultStore.state.showPreview);
|
||||
watch(showPreview, () => defaultStore.set('showPreview', showPreview.value));
|
||||
const showAddMfmFunction = ref(defaultStore.state.enableQuickAddMfmFunction);
|
||||
watch(showAddMfmFunction, () => defaultStore.set('enableQuickAddMfmFunction', showAddMfmFunction.value));
|
||||
const cw = ref<string | null>(props.initialCw ?? null);
|
||||
const localOnly = ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
||||
const visibility = ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof Misskey.noteVisibilities[number]);
|
||||
|
|
@ -891,12 +892,15 @@ async function insertEmoji(ev: MouseEvent) {
|
|||
},
|
||||
);
|
||||
}
|
||||
function insertMfm(){
|
||||
insertTextAtCursor(textareaEl.value, '$');
|
||||
}
|
||||
function insertRuby() {
|
||||
insertTextAtCursor(textareaEl.value, '$[ruby 本文 上につくやつ]');
|
||||
|
||||
async function insertMfmFunction(ev: MouseEvent) {
|
||||
mfmFunctionPicker(
|
||||
ev.currentTarget ?? ev.target,
|
||||
textareaEl.value,
|
||||
text,
|
||||
);
|
||||
}
|
||||
|
||||
function showActions(ev) {
|
||||
os.popupMenu(postFormActions.map(action => ({
|
||||
text: action.title,
|
||||
|
|
|
|||
|
|
@ -224,7 +224,8 @@ if (!mock) {
|
|||
}
|
||||
|
||||
.limitWidth {
|
||||
max-width: 150px;
|
||||
max-width: 70px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.count {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkButton inline @click="enableAll">{{ i18n.ts.enableAll }}</MkButton>
|
||||
</div>
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-for="kind in (initialPermissions || Misskey.permissions)" :key="kind" v-model="permissions[kind]">{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch>
|
||||
<MkSwitch v-for="kind in Object.keys(permissions)" :key="kind" v-model="permissions[kind]">{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
|
|
@ -54,7 +54,7 @@ const props = withDefaults(defineProps<{
|
|||
title?: string | null;
|
||||
information?: string | null;
|
||||
initialName?: string | null;
|
||||
initialPermissions?: string[] | null;
|
||||
initialPermissions?: (typeof Misskey.permissions)[number][] | null;
|
||||
}>(), {
|
||||
title: null,
|
||||
information: null,
|
||||
|
|
@ -67,16 +67,17 @@ const emit = defineEmits<{
|
|||
(ev: 'done', result: { name: string | null, permissions: string[] }): void;
|
||||
}>();
|
||||
|
||||
const defaultPermissions = Misskey.permissions.filter(p => !p.startsWith('read:admin') && !p.startsWith('write:admin'));
|
||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||
const name = ref(props.initialName);
|
||||
const permissions = ref({});
|
||||
const permissions = ref(<Record<(typeof Misskey.permissions)[number], boolean>>{});
|
||||
|
||||
if (props.initialPermissions) {
|
||||
for (const kind of props.initialPermissions) {
|
||||
permissions.value[kind] = true;
|
||||
}
|
||||
} else {
|
||||
for (const kind of Misskey.permissions) {
|
||||
for (const kind of defaultPermissions) {
|
||||
permissions.value[kind] = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,15 +37,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import { i18n } from '@/i18n.js';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import XUser from '@/components/MkUserSetupDialog.User.vue';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
||||
const pinnedUsers = { endpoint: 'pinned-users', noPaging: true } satisfies Paging;
|
||||
const pinnedUsers = { endpoint: 'pinned-users', noPaging: true };
|
||||
|
||||
const popularUsers = { endpoint: 'users', limit: 10, noPaging: true, params: {
|
||||
state: 'alive',
|
||||
origin: 'local',
|
||||
sort: '+follower',
|
||||
} } satisfies Paging;
|
||||
} };
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
|
|||
|
|
@ -292,13 +292,13 @@ export default function(props: MfmProps, context: SetupContext<MfmEvents>) {
|
|||
case 'fg': {
|
||||
let color = token.props.args.color;
|
||||
if (!/^[0-9a-f]{3,6}$/i.test(color)) color = 'f00';
|
||||
style = `color: #${color};`;
|
||||
style = `color: #${color}; overflow-wrap: anywhere;`;
|
||||
break;
|
||||
}
|
||||
case 'bg': {
|
||||
let color = token.props.args.color;
|
||||
if (!/^[0-9a-f]{3,6}$/i.test(color)) color = 'f00';
|
||||
style = `background-color: #${color};`;
|
||||
style = `background-color: #${color}; overflow-wrap: anywhere;`;
|
||||
break;
|
||||
}
|
||||
case 'ruby': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue