chore(frontend): use toast to show message when call copyToClipboard

This commit is contained in:
syuilo 2025-03-16 15:04:38 +09:00
parent 32844e4775
commit 81a0cbd294
21 changed files with 16 additions and 27 deletions

View file

@ -210,7 +210,6 @@ const headerActions = computed(() => {
return;
}
copyToClipboard(`${url}/channels/${channel.value.id}`);
os.success();
},
});

View file

@ -148,7 +148,6 @@ const headerActions = computed(() => clip.value && isOwned.value ? [{
text: i18n.ts.copyUrl,
action: () => {
copyToClipboard(`${url}/clips/${clip.value!.id}`);
os.success();
},
}, {
icon: 'ti ti-code',

View file

@ -849,7 +849,6 @@ function exportLog() {
l: DropAndFusionGame.serializeLogs(logs),
});
copyToClipboard(data);
os.success();
}
function updateSettings<

View file

@ -25,7 +25,7 @@ import MkCustomEmojiDetailedDialog from '@/components/MkCustomEmojiDetailedDialo
import { $i } from '@/i.js';
const props = defineProps<{
emoji: Misskey.entities.EmojiSimple;
emoji: Misskey.entities.EmojiSimple;
}>();
function menu(ev) {
@ -38,7 +38,6 @@ function menu(ev) {
icon: 'ti ti-copy',
action: () => {
copyToClipboard(`:${props.emoji.name}:`);
os.success();
},
}, {
text: i18n.ts.info,

View file

@ -129,7 +129,6 @@ function copyLink() {
if (!flash.value) return;
copyToClipboard(`${url}/play/${flash.value.id}`);
os.success();
}
function shareWithNavigator() {

View file

@ -111,7 +111,6 @@ function fetchPost() {
function copyLink() {
copyToClipboard(`${url}/gallery/${post.value.id}`);
os.success();
}
function share() {

View file

@ -190,7 +190,6 @@ function copyLink() {
if (!page.value) return;
copyToClipboard(`${url}/@${page.value.user.username}/pages/${page.value.name}`);
os.success();
}
function shareWithNote() {

View file

@ -33,12 +33,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, ref } from 'vue';
import JSON5 from 'json5';
import type { Theme } from '@/theme.js';
import MkTextarea from '@/components/MkTextarea.vue';
import MkSelect from '@/components/MkSelect.vue';
import MkInput from '@/components/MkInput.vue';
import MkButton from '@/components/MkButton.vue';
import { getBuiltinThemesRef } from '@/theme.js';
import type { Theme } from '@/theme.js';
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
import * as os from '@/os.js';
import { getThemes, removeTheme } from '@/theme-store.js';
@ -63,7 +63,6 @@ const selectedThemeCode = computed(() => {
function copyThemeCode() {
copyToClipboard(selectedThemeCode.value);
os.success();
}
function uninstall() {