Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18 AS build
FROM node:22 AS build

ARG BUILD_MODE=production
ARG LAUNCH_MODE=production
Expand All @@ -9,7 +9,7 @@ ENV VITE_APP_VERSION=${APP_VERSION}

WORKDIR /app
ADD ./package.json ./pnpm-lock.yaml /app/
RUN npm i -g pnpm && pnpm install
RUN npm i -g pnpm@9.15.9 && pnpm install --frozen-lockfile
ADD . /app
RUN pnpm build --mode ${BUILD_MODE}

Expand Down
30 changes: 16 additions & 14 deletions src/views/apps/ApplicationFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,29 @@ onMounted(async () => {
appState.value = AppState.Error;
}
});

function addIframeStyles() {
const iframeDoc = ref();
const style = iframeDoc.value.createElement('style');
style.textContent = `
main, .container, #app > div {
min-height: 100vh;
}
`;
iframeDoc.value.head.appendChild(style);
}
</script>

<template>
<v-main class="application-frame">
<v-main>
<iframe
v-if="appState == AppState.Show && url"
ref="iframe"
:src="url.toString()"
frameborder="0"
class="iframe"
allow="camera; clipboard-write"
@load="addIframeStyles()"
/>
<FullscreenLoader v-else-if="appState == AppState.WaitLoad" />
<!-- Раскомментить, если появятся приложения от сторонних разработчиков -->
Expand All @@ -226,20 +239,9 @@ onMounted(async () => {
</template>

<style scoped>
.application-frame {
box-sizing: border-box;
height: 100vh;
min-height: 0;
}

@supports (height: 100dvh) {
.application-frame {
height: 100dvh;
}
}

v-main,
.iframe {
display: block;
flex: 1;
width: 100%;
height: 100%;
}
Expand Down
Loading