Skip to content

Commit 5ba960d

Browse files
authored
Merge pull request #12 from sweshelo/develop
Develop
2 parents ac36f21 + cbddfc8 commit 5ba960d

10 files changed

+92
-44
lines changed

locales/index.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -2956,6 +2956,10 @@ export interface Locale extends ILocale {
29562956
* 添付画像のサムネイルをオリジナル画質にする
29572957
*/
29582958
"loadRawImages": string;
2959+
/**
2960+
* 猫化(nyaize)を強制的に無効にする
2961+
*/
2962+
"denyaize": string;
29592963
/**
29602964
* アニメーション画像を再生しない
29612965
*/
@@ -4908,6 +4912,10 @@ export interface Locale extends ILocale {
49084912
* リトライ
49094913
*/
49104914
"gameRetry": string;
4915+
/**
4916+
* QRコード
4917+
*/
4918+
"qrcode": string;
49114919
"_bubbleGame": {
49124920
/**
49134921
* 遊び方

locales/ja-JP.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,7 @@ enableHorizontalSwipe: "スワイプしてタブを切り替える"
12241224
loading: "読み込み中"
12251225
surrender: "やめる"
12261226
gameRetry: "リトライ"
1227+
qrcode: "QRコード"
12271228

12281229
_bubbleGame:
12291230
howToPlay: "遊び方"

packages/backend/src/server/NodeinfoServerService.ts

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export class NodeinfoServerService {
120120
enableMcaptcha: meta.enableMcaptcha,
121121
enableTurnstile: meta.enableTurnstile,
122122
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH,
123+
maxReactionsPerAccount: 128,
123124
enableEmail: meta.enableEmail,
124125
enableServiceWorker: meta.enableServiceWorker,
125126
proxyAccountName: proxyAccount ? proxyAccount.username : null,

packages/frontend/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"lint": "pnpm typecheck && pnpm eslint"
1818
},
1919
"dependencies": {
20+
"@chenfengyuan/vue-qrcode": "^2.0.0",
2021
"@discordapp/twemoji": "15.0.2",
2122
"@github/webauthn-json": "2.1.1",
2223
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",

packages/frontend/src/components/MkInviteCode.vue

+14
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,13 @@ SPDX-License-Identifier: AGPL-3.0-only
5151
</div>
5252
<div :class="$style.buttons">
5353
<MkButton v-if="!invite.used && !isExpired" primary rounded @click="copyInviteCode()"><i class="ti ti-copy"></i> {{ i18n.ts.copy }}</MkButton>
54+
<MkButton v-if="!invite.used && !isExpired" primary rounded @click="copyInviteCodeAsLink()"><i class="ti ti-copy"></i> {{ i18n.ts.copyLink }}</MkButton>
5455
<MkButton v-if="!invite.used || moderator" danger rounded @click="deleteCode()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
5556
</div>
57+
<div v-if="!invite.used && !isExpired">
58+
<div :class="$style.label">{{ i18n.ts.qrcode }}</div>
59+
<vue-qrcode :value="inviteUrl" :options="option" tag="img"></vue-qrcode>
60+
</div>
5661
</div>
5762
</MkFolder>
5863
</template>
@@ -65,6 +70,7 @@ import MkButton from '@/components/MkButton.vue';
6570
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
6671
import { i18n } from '@/i18n.js';
6772
import * as os from '@/os.js';
73+
import VueQrcode from "@chenfengyuan/vue-qrcode";
6874

6975
const props = defineProps<{
7076
invite: Misskey.entities.InviteCode;
@@ -79,6 +85,8 @@ const isExpired = computed(() => {
7985
return props.invite.expiresAt && new Date(props.invite.expiresAt) < new Date();
8086
});
8187

88+
const inviteUrl = `${(new URL(window.location.href)).origin}/?invite=${props.invite.code}`;
89+
8290
function deleteCode() {
8391
os.apiWithDialog('invite/delete', {
8492
inviteId: props.invite.id,
@@ -90,6 +98,12 @@ function copyInviteCode() {
9098
copyToClipboard(props.invite.code);
9199
os.success();
92100
}
101+
102+
function copyInviteCodeAsLink() {
103+
copyToClipboard(inviteUrl);
104+
os.success();
105+
}
106+
93107
</script>
94108

95109
<style lang="scss" module>

packages/frontend/src/components/MkReactionsViewer.reaction.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const buttonEl = shallowRef<HTMLElement>();
5353

5454
const emojiName = computed(() => props.reaction.replace(/:/g, '').replace(/@\./, ''));
5555
const emoji = computed(() => customEmojisMap.get(emojiName.value) ?? getUnicodeEmoji(props.reaction));
56+
const isCustomEmoji = computed(() => props.reaction.includes(':'));
5657

5758
const canToggle = computed(() => {
5859
return !props.reaction.match(/@\w/) && $i && emoji.value && checkReactionPermissions($i, props.note, emoji.value);
@@ -77,7 +78,7 @@ async function toggleReaction() {
7778
}
7879
misskeyApi('notes/reactions/delete', {
7980
noteId: props.note.id,
80-
reaction: (isCustomEmoji.value) ? `:${emoji.value.name}:` : props.reaction,
81+
reaction: (isCustomEmoji.value) ? `:${emojiName.value}:` : props.reaction,
8182
});
8283
} else {
8384
sound.playMisskeySfx('reaction');

packages/frontend/src/components/MkSignupDialog.form.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ import { i18n } from '@/i18n.js';
9393

9494
const props = withDefaults(defineProps<{
9595
autoSet?: boolean;
96+
initialInvitationCode?: string;
9697
}>(), {
9798
autoSet: false,
99+
initialInvitationCode: '',
98100
});
99101

100102
const emit = defineEmits<{
@@ -111,7 +113,7 @@ const turnstile = ref<Captcha | undefined>();
111113
const username = ref<string>('');
112114
const password = ref<string>('');
113115
const retypedPassword = ref<string>('');
114-
const invitationCode = ref<string>('');
116+
const invitationCode = ref<string>(props.initialInvitationCode);
115117
const email = ref('');
116118
const usernameState = ref<null | 'wait' | 'ok' | 'unavailable' | 'error' | 'invalid-format' | 'min-range' | 'max-range'>(null);
117119
const emailState = ref<null | 'wait' | 'ok' | 'unavailable:used' | 'unavailable:format' | 'unavailable:disposable' | 'unavailable:banned' | 'unavailable:mx' | 'unavailable:smtp' | 'unavailable' | 'error'>(null);

packages/frontend/src/components/MkSignupDialog.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
2525
<XServerRules @done="isAcceptedServerRule = true" @cancel="dialog?.close()"/>
2626
</template>
2727
<template v-else>
28-
<XSignup :autoSet="autoSet" @signup="onSignup" @signupEmailPending="onSignupEmailPending"/>
28+
<XSignup :autoSet="autoSet" :initialInvitationCode="invitecodeParam" @signup="onSignup" @signupEmailPending="onSignupEmailPending"/>
2929
</template>
3030
</Transition>
3131
</div>
@@ -55,6 +55,10 @@ const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
5555

5656
const isAcceptedServerRule = ref(false);
5757

58+
// URLからinvitecodeパラメータを取得
59+
const urlParams = new URLSearchParams(window.location.search);
60+
const invitecodeParam = urlParams.get('invite') || '';
61+
5862
function onSignup(res: Misskey.entities.SigninResponse) {
5963
emit('done', res);
6064
dialog.value?.close();

packages/frontend/src/components/global/MkCustomEmoji.vue

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const importEmoji = async (emojiName) => {
8585
if (!localCheckResponse) {
8686
const emoji = (await misskeyApi('admin/emoji/list-remote', {
8787
query: emojiName,
88+
host: props.host,
8889
})).find((_emoji) => _emoji.name === emojiName);
8990
await os.apiWithDialog('admin/emoji/copy', {
9091
emojiId: emoji.id,

0 commit comments

Comments
 (0)