Merge branch 'addsuccess' into 'develop'

[UX]fix: add os.success for all copyToClipboard

Co-authored-by: Lhcfl <Lhcfl@outlook.com>

See merge request firefish/firefish!10777
This commit is contained in:
naskya 2024-04-27 13:23:50 +00:00
commit a44e9f3e38
6 changed files with 11 additions and 0 deletions

View file

@ -126,6 +126,7 @@ const contextmenu = computed((): MenuItem[] => {
text: i18n.ts.copyLink,
action: () => {
copyToClipboard(pageUrl.value);
os.success();
},
},
];

View file

@ -546,6 +546,7 @@ function onContextmenu(ev: MouseEvent): void {
text: i18n.ts.copyLink,
action: () => {
copyToClipboard(`${url}${notePage(appearNote.value)}`);
os.success();
},
},
appearNote.value.user.host != null

View file

@ -500,6 +500,7 @@ function onContextmenu(ev: MouseEvent): void {
text: i18n.ts.copyLink,
action: () => {
copyToClipboard(`${url}${notePage(appearNote.value)}`);
os.success();
},
},
note.value.user.host != null

View file

@ -43,6 +43,7 @@ import { i18n } from "@/i18n";
import type { PageMetadata } from "@/scripts/page-metadata";
import { provideMetadataReceiver } from "@/scripts/page-metadata";
import icon from "@/scripts/icon";
import * as os from "@/os";
const props = defineProps<{
initialPath: string;
@ -121,6 +122,7 @@ const contextmenu = computed(() => [
text: i18n.ts.copyLink,
action: () => {
copyToClipboard(url + router.getCurrentPath());
os.success();
},
},
]);

View file

@ -80,6 +80,7 @@ function onContextmenu(ev) {
text: i18n.ts.copyLink,
action: () => {
copyToClipboard(`${url}${props.to}`);
os.success();
},
},
],

View file

@ -246,6 +246,7 @@ export function getUserMenu(user, router: Router = mainRouter) {
text: i18n.ts.copyUsername,
action: () => {
copyToClipboard(`@${user.username}@${user.host || host}`);
os.success();
},
},
{
@ -272,6 +273,7 @@ export function getUserMenu(user, router: Router = mainRouter) {
text: i18n.ts.copyRemoteFollowUrl,
action: () => {
copyToClipboard(`https://${host}/follow-me?acct=${user.username}`);
os.success();
},
},
],
@ -286,6 +288,7 @@ export function getUserMenu(user, router: Router = mainRouter) {
text: i18n.ts._feeds.rss,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.rss`);
os.success();
},
},
{
@ -293,6 +296,7 @@ export function getUserMenu(user, router: Router = mainRouter) {
text: i18n.ts._feeds.atom,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.atom`);
os.success();
},
},
{
@ -300,6 +304,7 @@ export function getUserMenu(user, router: Router = mainRouter) {
text: i18n.ts._feeds.jsonFeed,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.json`);
os.success();
},
},
],