(design) delete min-height
This commit is contained in:
parent
67d24ab548
commit
e4762b4b85
|
@ -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() {
|
||||
|
|
|
@ -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%;
|
||||
|
|
|
@ -20,7 +20,7 @@ export function getEmbedCode(props: {
|
|||
|
||||
if (src !== undefined) {
|
||||
const id = uuid();
|
||||
return `<iframe src="${src}" title="Misskey Note" style="border:none; width:100%; max-width: 650px; min-height: 300px;" data-msky-embed="${id}"></iframe>
|
||||
return `<iframe src="${src}" title="Misskey Embed" style="border:none; width:100%; max-width: 650px; min-height: 300px;" data-msky-embed="${id}"></iframe>
|
||||
<script src="https://cdn.jsdelivr.net/npm/iframe-resizer@4.3.6/js/iframeResizer.min.js" integrity="sha256-86F9vrEnnd2apFWVo5sNxArab6T8L048fPPkYONBDHY=" crossorigin="anonymous"></script>
|
||||
<script>iFrameResize({}, 'iframe[data-msky-embed="${id}"]');</script>`;
|
||||
}
|
||||
|
|
|
@ -31,17 +31,12 @@ provideMetadataReceiver((info) => {
|
|||
|
||||
document.documentElement.style.backgroundColor = "transparent";
|
||||
document.documentElement.style.maxWidth = "650px";
|
||||
document.documentElement.style.minHeight = "300px";
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mk-app {
|
||||
max-width: 650px;
|
||||
min-width: 0;
|
||||
min-height: 300px;
|
||||
overflow: hidden;
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid var(--divider);
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue