Skip to content

Commit

Permalink
fix: iroiro
Browse files Browse the repository at this point in the history
  • Loading branch information
rassi0429 committed Jul 21, 2023
1 parent 24580fd commit 2dafa88
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
3 changes: 3 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,10 @@ export interface Locale {
"_widgets": {
"profile": string;
"instanceInfo": string;
"neosUserCount": string;
"neosEvent": string;
"memo": string;
"memo2": string;
"notifications": string;
"timeline": string;
"calendar": string;
Expand Down
20 changes: 9 additions & 11 deletions packages/frontend/src/components/MkUrlPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
</MkButton>
</div>
</template>
<div v-else :class="$style.urlPreview">
<component :is="self ? 'MkA' : 'a'" :class="[$style.link, { [$style.compact]: compact }]" :[attr]="self ? url.substr(local.length) : url" rel="nofollow noopener" :target="target" :title="url">
<suspense v-else-if="neosWorldRecordId || neosSessionId">
<NeosUrlPreview :compact="compact" :neos-session-id="neosSessionId" :neos-world-record-id="neosWorldRecordId" />
</suspense>
<div v-else :class="$style.urlPreview">
<component :is="self ? 'MkA' : 'a'" :class="[$style.link, { [$style.compact]: compact }]" :[attr]="self ? url.substr(local.length) : url" rel="nofollow noopener" :target="target" :title="url">
<div v-if="thumbnail" :class="$style.thumbnail" :style="`background-image: url('${thumbnail}')`">
</div>
<article :class="$style.body">
Expand Down Expand Up @@ -74,15 +74,15 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, onUnmounted } from 'vue';
import type { summaly } from 'summaly';
import { url as local } from '@/config';
import { i18n } from '@/i18n';
import {defineAsyncComponent, onUnmounted} from 'vue';
import type {summaly} from 'summaly';
import {url as local} from '@/config';
import {i18n} from '@/i18n';
import * as os from '@/os';
import { deviceKind } from '@/scripts/device-kind';
import {deviceKind} from '@/scripts/device-kind';
import MkButton from '@/components/MkButton.vue';
import { versatileLang } from '@/scripts/intl-const';
import { defaultStore } from '@/store';
import {versatileLang} from '@/scripts/intl-const';
import {defaultStore} from '@/store';
import NeosUrlPreview from "@/components/custom/NeosUrlPreview.vue";
type SummalyResult = Awaited<ReturnType<typeof summaly>>;
Expand Down Expand Up @@ -126,8 +126,6 @@ let tweetHeight = $ref(150);
let unknownUrl = $ref(false);
const requestUrl = new URL(props.url);
if (!['http:', 'https:'].includes(requestUrl.protocol)) throw new Error('invalid url');
Expand Down
7 changes: 3 additions & 4 deletions packages/frontend/src/pages/neos/direct-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
<script lang="ts" setup>
import { nextTick, ref } from 'vue';
import * as misskey from 'misskey-js';
import { Channel, DriveFile, Note, User } from 'misskey-js/built/entities';
import { stream } from '@/stream';
import * as os from '@/os';
import { defaultStore } from '@/store';
import { getAccounts, incNotesCount, notesCount } from '@/account';
import { getAccounts } from '@/account';
import { useStream } from "@/stream";
const marker = Math.random().toString();
const connection = stream.useChannel('main');
const connection = useStream().useChannel('main');
const text = ref<string>('direct-upload!!');
Expand Down

0 comments on commit 2dafa88

Please sign in to comment.