mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
use config.url instead of "https://${config.host}"
This commit is contained in:
parent
e74fde8b31
commit
28551c8103
11 changed files with 22 additions and 21 deletions
|
@ -890,6 +890,7 @@ export class ClientServerService {
|
|||
return await reply.view('info-card', {
|
||||
version: this.config.version,
|
||||
host: this.config.host,
|
||||
url: this.config.url,
|
||||
meta: this.meta,
|
||||
originalUsersCount: await this.usersRepository.countBy({ host: IsNull() }),
|
||||
originalNotesCount: await this.notesRepository.countBy({ userHost: IsNull() }),
|
||||
|
|
|
@ -43,7 +43,7 @@ html
|
|||
}
|
||||
|
||||
body
|
||||
a#a(href=`https://${host}` target="_blank")
|
||||
a#a(href=url target="_blank")
|
||||
header#banner(style=`background-image: url(${meta.bannerUrl})`)
|
||||
div#title= meta.name || host
|
||||
div#content
|
||||
|
|
|
@ -184,7 +184,7 @@ import * as mfm from '@transfem-org/sfm-js';
|
|||
import * as Misskey from 'misskey-js';
|
||||
import { isLink } from '@@/js/is-link.js';
|
||||
import { shouldCollapsed } from '@@/js/collapsed.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import type { Ref } from 'vue';
|
||||
import type { MenuItem } from '@/types/menu.js';
|
||||
|
@ -328,7 +328,7 @@ const allowAnim = ref(prefer.s.advancedMfm && prefer.s.animatedMfm);
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `${config.url}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
const mergedCW = computed(() => computeMergedCw(appearNote.value));
|
||||
|
|
|
@ -236,7 +236,7 @@ import { computed, inject, onMounted, provide, ref, useTemplateRef, watch } from
|
|||
import * as mfm from '@transfem-org/sfm-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { isLink } from '@@/js/is-link.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import type { OpenOnRemoteOptions } from '@/utility/please-login.js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
|
@ -375,7 +375,7 @@ let renoting = false;
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `${config.url}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
const keymap = {
|
||||
|
|
|
@ -81,7 +81,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import { computed, ref, shallowRef, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import type { Visibility } from '@/utility/boost-quote.js';
|
||||
import type { OpenOnRemoteOptions } from '@/utility/please-login.js';
|
||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||
|
@ -150,7 +150,7 @@ const isRenote = (
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `${config.url}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
||||
|
|
|
@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import { useInterval } from '@@/js/use-interval.js';
|
||||
import type { OpenOnRemoteOptions } from '@/utility/please-login.js';
|
||||
import { sum } from '@/utility/array.js';
|
||||
|
@ -72,7 +72,7 @@ const showResult = ref(props.readOnly || isVoted.value);
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: `https://${host}/notes/${props.noteId}`,
|
||||
url: `${config.url}/notes/${props.noteId}`,
|
||||
}));
|
||||
|
||||
// 期限付きアンケート
|
||||
|
|
|
@ -185,7 +185,7 @@ import * as mfm from '@transfem-org/sfm-js';
|
|||
import * as Misskey from 'misskey-js';
|
||||
import { isLink } from '@@/js/is-link.js';
|
||||
import { shouldCollapsed } from '@@/js/collapsed.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import type { Ref } from 'vue';
|
||||
import type { MenuItem } from '@/types/menu.js';
|
||||
|
@ -328,7 +328,7 @@ const allowAnim = ref(prefer.s.advancedMfm && prefer.s.animatedMfm);
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `${config.url}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
const mergedCW = computed(() => computeMergedCw(appearNote.value));
|
||||
|
|
|
@ -241,7 +241,7 @@ import { computed, inject, onMounted, onUnmounted, onUpdated, provide, ref, useT
|
|||
import * as mfm from '@transfem-org/sfm-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { isLink } from '@@/js/is-link.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import type { OpenOnRemoteOptions } from '@/utility/please-login.js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
|
@ -381,7 +381,7 @@ let renoting = false;
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `${config.url}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
const keymap = {
|
||||
|
|
|
@ -89,7 +89,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import { computed, inject, ref, shallowRef, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import type { Visibility } from '@/utility/boost-quote.js';
|
||||
import type { OpenOnRemoteOptions } from '@/utility/please-login.js';
|
||||
import SkNoteHeader from '@/components/SkNoteHeader.vue';
|
||||
|
@ -164,7 +164,7 @@ const isRenote = (
|
|||
|
||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
type: 'lookup',
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||
url: appearNote.value.url ?? appearNote.value.uri ?? `${config.url}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
||||
|
|
|
@ -50,7 +50,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { computed, watch, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import DynamicNoteDetailed from '@/components/DynamicNoteDetailed.vue';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
|
@ -151,7 +151,7 @@ function fetchNote() {
|
|||
message: i18n.ts.thisContentsAreMarkedAsSigninRequiredByAuthor,
|
||||
openOnRemote: {
|
||||
type: 'lookup',
|
||||
url: `https://${host}/notes/${props.noteId}`,
|
||||
url: `${config.url}/notes/${props.noteId}`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { host } from '@@/js/config.js';
|
||||
import * as config from '@@/js/config.js';
|
||||
import type * as Misskey from 'misskey-js';
|
||||
import type * as mfm from '@transfem-org/sfm-js';
|
||||
import { extractUrlFromMfm } from '@/utility/extract-url-from-mfm.js';
|
||||
|
@ -18,15 +18,15 @@ export function extractPreviewUrls(note: Misskey.entities.Note, contents: mfm.Mf
|
|||
url !== note.url &&
|
||||
url !== note.uri &&
|
||||
// Local note
|
||||
url !== `https://${host}/notes/${note.id}` &&
|
||||
url !== `${config.url}/notes/${note.id}` &&
|
||||
// Remote renote or quote
|
||||
url !== note.renote?.url &&
|
||||
url !== note.renote?.uri &&
|
||||
// Local renote or quote
|
||||
url !== `https://${host}/notes/${note.renote?.id}` &&
|
||||
url !== `${config.url}/notes/${note.renote?.id}` &&
|
||||
// Remote renote *of* a quote
|
||||
url !== note.renote?.renote?.url &&
|
||||
url !== note.renote?.renote?.uri &&
|
||||
// Local renote *of* a quote
|
||||
url !== `https://${host}/notes/${note.renote?.renote?.id}`);
|
||||
url !== `${config.url}/notes/${note.renote?.renote?.id}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue