summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkPostForm.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/MkPostForm.vue')
-rw-r--r--packages/frontend/src/components/MkPostForm.vue10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index d709286041..b0e665acf2 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -119,7 +119,7 @@ import * as mfm from 'mfm-js';
import * as Misskey from 'misskey-js';
import insertTextAtCursor from 'insert-text-at-cursor';
import { toASCII } from 'punycode.js';
-import { host, url } from '@@/js/config.js';
+import { localHost, webUrl } from '@@/js/config.js';
import MkUploaderItems from './MkUploaderItems.vue';
import type { ShallowRef } from 'vue';
import type { PostFormProps } from '@/types/post-form.js';
@@ -355,7 +355,7 @@ if (props.mention) {
text.value += ' ';
}
-if (replyTargetNote.value && (replyTargetNote.value.user.username !== $i.username || (replyTargetNote.value.user.host != null && replyTargetNote.value.user.host !== host))) {
+if (replyTargetNote.value && (replyTargetNote.value.user.username !== $i.username || (replyTargetNote.value.user.host != null && replyTargetNote.value.user.host !== localHost))) {
text.value = `@${replyTargetNote.value.user.username}${replyTargetNote.value.user.host != null ? '@' + toASCII(replyTargetNote.value.user.host) : ''} `;
}
@@ -371,7 +371,7 @@ if (replyTargetNote.value && replyTargetNote.value.text != null) {
`@${x.username}@${toASCII(otherHost)}`;
// 自分は除外
- if ($i.username === x.username && (x.host == null || x.host === host)) continue;
+ if ($i.username === x.username && (x.host == null || x.host === localHost)) continue;
// 重複は除外
if (text.value.includes(`${mention} `)) continue;
@@ -769,7 +769,7 @@ async function onPaste(ev: ClipboardEvent) {
const paste = ev.clipboardData.getData('text');
- if (!renoteTargetNote.value && !quoteId.value && paste.startsWith(url + '/notes/')) {
+ if (!renoteTargetNote.value && !quoteId.value && paste.startsWith(webUrl + '/notes/')) {
ev.preventDefault();
const { canceled } = await os.confirm({
@@ -1119,7 +1119,7 @@ async function post(ev?: PointerEvent) {
'https://open.spotify.com/track/7anfcaNPQWlWCwyCHmZqNy',
'https://open.spotify.com/track/5Odr16TvEN4my22K9nbH7l',
'https://open.spotify.com/album/5bOlxyl4igOrp2DwVQxBco',
- ].some(url => text.includes(url))) {
+ ].some(webUrl => text.includes(webUrl))) {
claimAchievement('brainDiver');
}