Skip to content

Commit

Permalink
✨ Remove toast
Browse files Browse the repository at this point in the history
  • Loading branch information
damianpumar committed Dec 5, 2024
1 parent f9d44ec commit ad54b9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div class="share">
<BaseButton
class="primary"
:title="$t('button.tooltip.copyToClipboard')"
@mouseover="openDialog"
@mouseleave="closeDialog"
@click.stop="copyOnClipboard"
>
{{ $t("share") }}
</BaseButton>
<div class="share" @click.stop="">
<BaseActionTooltip :tooltip="$t('copied')" @click.stop="copyOnClipboard">
<BaseButton
:title="$t('button.tooltip.copyToClipboard')"
@mouseover="openDialog"
@mouseleave="closeDialog"
>
Share
</BaseButton>
</BaseActionTooltip>
<transition name="fade" appear>
<dialog
v-if="isDialogOpen"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
import { ref } from "vue";
import {
useNotifications,
useTranslate,
useUser,
} from "~/v1/infrastructure/services";
import { useUser } from "~/v1/infrastructure/services";
import { useClipboard } from "~/v1/infrastructure/services/useClipboard";
import { useDataset } from "~/v1/infrastructure/storage/DatasetStorage";
import { useMetrics } from "~/v1/infrastructure/storage/MetricsStorage";
import { useTeamProgress } from "~/v1/infrastructure/storage/TeamProgressStorage";

export const useShareViewModel = () => {
const { t } = useTranslate();
const { copy } = useClipboard();
const { user } = useUser();
const { state: metrics } = useMetrics();
const { state: dataset } = useDataset();
const notification = useNotifications();
const { state: progress } = useTeamProgress();

const isDialogOpen = ref(false);
Expand All @@ -35,11 +29,6 @@ export const useShareViewModel = () => {
url.search = params.toString();

copy(url.toString());

notification.notify({
message: t("copiedToClipboard"),
type: "success",
});
};

const createImageLink = () => {
Expand Down

0 comments on commit ad54b9d

Please sign in to comment.