diff --git a/packages/frontend/src/components/global/MkA.vue b/packages/frontend/src/components/global/MkA.vue
index a4e2cc4e54..901454021d 100644
--- a/packages/frontend/src/components/global/MkA.vue
+++ b/packages/frontend/src/components/global/MkA.vue
@@ -11,6 +11,7 @@ import { url } from '@/config';
import { popout as popout_ } from '@/scripts/popout';
import { i18n } from '@/i18n';
import { useRouter } from '@/router';
+import { MenuItem } from '@/types/menu';
const props = withDefaults(defineProps<{
to: string;
@@ -33,37 +34,60 @@ const active = $computed(() => {
return resolved.route.name === router.currentRoute.value.name;
});
-function onContextmenu(ev) {
+function onContextmenu(ev : Event) {
const selection = window.getSelection();
- if (selection && selection.toString() !== '') return;
- os.contextMenu([{
- type: 'label',
- text: props.to,
- }, {
- icon: 'ti ti-app-window',
- text: i18n.ts.openInWindow,
- action: () => {
- os.pageWindow(props.to);
- },
- }, {
- icon: 'ti ti-player-eject',
- text: i18n.ts.showInPage,
- action: () => {
- router.push(props.to, 'forcePage');
- },
- }, null, {
- icon: 'ti ti-external-link',
- text: i18n.ts.openInNewTab,
- action: () => {
- window.open(props.to, '_blank');
- },
- }, {
- icon: 'ti ti-link',
- text: i18n.ts.copyLink,
- action: () => {
- copyToClipboard(`${url}${props.to}`);
- },
- }], ev);
+ if ((selection && selection.toString() !== '')) return;
+
+ let contextMenuItem: MenuItem[] = [];
+
+ if (router.currentRoute.value.name?.toLowerCase().includes("embed")) {
+ contextMenuItem = [{
+ type: 'label',
+ text: props.to,
+ }, {
+ icon: 'ti ti-external-link',
+ text: i18n.ts.openInNewTab,
+ action: () => {
+ window.open(props.to, '_blank');
+ },
+ }, {
+ icon: 'ti ti-link',
+ text: i18n.ts.copyLink,
+ action: () => {
+ copyToClipboard(`${url}${props.to}`);
+ },
+ }];
+ } else {
+ contextMenuItem = [{
+ type: 'label',
+ text: props.to,
+ }, {
+ icon: 'ti ti-app-window',
+ text: i18n.ts.openInWindow,
+ action: () => {
+ os.pageWindow(props.to);
+ },
+ }, {
+ icon: 'ti ti-player-eject',
+ text: i18n.ts.showInPage,
+ action: () => {
+ router.push(props.to, 'forcePage');
+ },
+ }, null, {
+ icon: 'ti ti-external-link',
+ text: i18n.ts.openInNewTab,
+ action: () => {
+ window.open(props.to, '_blank');
+ },
+ }, {
+ icon: 'ti ti-link',
+ text: i18n.ts.copyLink,
+ action: () => {
+ copyToClipboard(`${url}${props.to}`);
+ },
+ }];
+ }
+ os.contextMenu(contextMenuItem, ev);
}
function openWindow() {
diff --git a/packages/frontend/src/pages/note-embed.vue b/packages/frontend/src/pages/note-embed.vue
index b823d3fad1..e80425a3e9 100644
--- a/packages/frontend/src/pages/note-embed.vue
+++ b/packages/frontend/src/pages/note-embed.vue
@@ -93,7 +93,9 @@ definePageMetadata(computed(() => note ? {
}
.fcuexfpr {
- background: var(--bg);
+ border-radius: var(--radius);
+ border: 1px solid var(--divider);
+ background: var(--panel);
> .note {
height: 100%;
diff --git a/packages/frontend/src/scripts/get-embed-code.ts b/packages/frontend/src/scripts/get-embed-code.ts
index 4338dc14a4..b5492b6cc6 100644
--- a/packages/frontend/src/scripts/get-embed-code.ts
+++ b/packages/frontend/src/scripts/get-embed-code.ts
@@ -20,7 +20,7 @@ export function getEmbedCode(props: {
if (src !== undefined) {
const id = uuid();
- return `
+ return `
`;
}
diff --git a/packages/frontend/src/ui/embed.vue b/packages/frontend/src/ui/embed.vue
index dffc56715f..df65333719 100644
--- a/packages/frontend/src/ui/embed.vue
+++ b/packages/frontend/src/ui/embed.vue
@@ -31,17 +31,12 @@ provideMetadataReceiver((info) => {
document.documentElement.style.backgroundColor = "transparent";
document.documentElement.style.maxWidth = "650px";
-document.documentElement.style.minHeight = "300px";