Good
This commit is contained in:
@@ -4,13 +4,9 @@ import { windows, getComponent } from '@/services/Windows';
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="window-container">
|
|
||||||
<TransitionGroup name="window" tag="div">
|
<TransitionGroup name="window" tag="div">
|
||||||
<div v-for="win in windows" :key="win.id">
|
<component v-for="win in windows" :key="win.id" :is="getComponent(win.type)" :data="win" />
|
||||||
<component :is="getComponent(win.type)" :data="win" />
|
|
||||||
</div>
|
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -21,16 +17,18 @@ import { windows, getComponent } from '@/services/Windows';
|
|||||||
}
|
}
|
||||||
.window-enter-from,
|
.window-enter-from,
|
||||||
.window-leave-to {
|
.window-leave-to {
|
||||||
|
transition: all 0.15s ease;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(15px);
|
transform: translateY(15px);
|
||||||
}
|
}
|
||||||
|
.window-move {
|
||||||
|
transition: transform 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
.window-wrapper {
|
.window-wrapper {
|
||||||
background-color: var(--color-window-background);
|
background-color: var(--color-window-background);
|
||||||
|
|
||||||
/* backdrop-filter: blur(10px); */
|
/* backdrop-filter: blur(10px); */
|
||||||
position: fixed;
|
|
||||||
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
42
frontend/app/components/windows/CreateCampaignWindow.vue
Normal file
42
frontend/app/components/windows/CreateCampaignWindow.vue
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<script setup>
|
||||||
|
import { onMounted, ref } from 'vue';
|
||||||
|
import { SetupHandle, SetSize, ResetPosition, Top } from '@/services/Windows';
|
||||||
|
|
||||||
|
import WindowHandle from './partials/WindowHandle.vue';
|
||||||
|
|
||||||
|
const handle = ref(null);
|
||||||
|
const wrapper = ref(null);
|
||||||
|
|
||||||
|
const props = defineProps(['data']);
|
||||||
|
const data = props.data;
|
||||||
|
|
||||||
|
let id = data.id;
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
Top(wrapper);
|
||||||
|
SetupHandle(id, handle);
|
||||||
|
SetSize(id, {width: 500, height: 380});
|
||||||
|
ResetPosition(id, "center");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="window-wrapper" :id="'window-wrapper-' + id" ref="wrapper">
|
||||||
|
<WindowHandle :window="id" ref="handle"></WindowHandle>
|
||||||
|
|
||||||
|
<!-- Body -->
|
||||||
|
<div ref="test"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.window-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { SetupHandle, SetSize, ResetPosition, Top } from '@/services/Windows';
|
import { SetupHandle, SetSize, ResetPosition, Top, CreateChildWindow, GetFirstWindowId } from '@/services/Windows';
|
||||||
|
|
||||||
import WindowHandle from './partials/WindowHandle.vue';
|
import WindowHandle from './partials/WindowHandle.vue';
|
||||||
import VersionRender from '../partials/VersionRender.vue';
|
import VersionRender from '../partials/VersionRender.vue';
|
||||||
@@ -14,6 +14,11 @@ const data = props.data;
|
|||||||
|
|
||||||
let id = data.id;
|
let id = data.id;
|
||||||
|
|
||||||
|
function CreateCampaignWindow(){
|
||||||
|
CreateChildWindow(GetFirstWindowId('main_menu'), 'create_campaign', {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
Top(wrapper);
|
Top(wrapper);
|
||||||
SetupHandle(id, handle);
|
SetupHandle(id, handle);
|
||||||
@@ -29,13 +34,19 @@ onMounted(() => {
|
|||||||
|
|
||||||
<EditUserPartial></EditUserPartial>
|
<EditUserPartial></EditUserPartial>
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
|
<div class="vert-expand">
|
||||||
|
<div class="vert top">
|
||||||
<h1>{{ $t("main-menu.main-menu")}}</h1>
|
<h1>{{ $t("main-menu.main-menu")}}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="vert bot">
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button class="btn-primary button-expand sound-click" v-on:click="OpenCampaigns" ref="campaignButton">{{ $t("main-menu.campaigns") }}</button>
|
<button class="btn-primary button-expand sound-click" v-on:click="CreateCampaignWindow" ref="campaignButton">{{ $t("main-menu.create-campaign") }}</button>
|
||||||
</div>
|
</div>
|
||||||
<VersionRender></VersionRender>
|
<VersionRender></VersionRender>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -45,6 +56,25 @@ h1 {
|
|||||||
font-family: MrEavesRemake;
|
font-family: MrEavesRemake;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.expand {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
> * {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.vert-expand {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.button-expand {
|
.button-expand {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ const defWindows = {
|
|||||||
main_menu: {
|
main_menu: {
|
||||||
title: 'windows.main-menu',
|
title: 'windows.main-menu',
|
||||||
component: () => import('~/components/windows/MainMenuWindow.vue'),
|
component: () => import('~/components/windows/MainMenuWindow.vue'),
|
||||||
|
movable: true
|
||||||
},
|
},
|
||||||
edit_profile: {
|
edit_profile: {
|
||||||
title: "windows.edit-profile",
|
title: "windows.edit-profile",
|
||||||
@@ -33,6 +34,12 @@ const defWindows = {
|
|||||||
component: () => import('~/components/windows/SettingsWindow.vue'),
|
component: () => import('~/components/windows/SettingsWindow.vue'),
|
||||||
close: () => ClearWindow({type: 'settings'}),
|
close: () => ClearWindow({type: 'settings'}),
|
||||||
movable: true
|
movable: true
|
||||||
|
},
|
||||||
|
create_campaign: {
|
||||||
|
title: "windows.create-campaign",
|
||||||
|
component: () => import('~/components/windows/CreateCampaignWindow.vue'),
|
||||||
|
close: () => ClearWindow({type: 'create_campaign'}),
|
||||||
|
movable: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
"register": "Registra't",
|
"register": "Registra't",
|
||||||
"main-menu": "Dragonroll",
|
"main-menu": "Dragonroll",
|
||||||
"example": "Finestra d'exemple",
|
"example": "Finestra d'exemple",
|
||||||
"edit-profile": "Edita el perfil",
|
"edit-profile": "Editar perfil",
|
||||||
"settings": "Configuració"
|
"settings": "Configuració",
|
||||||
|
"create-campaign": "Crear campanya"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"username": "Usuari o correu electrònic",
|
"username": "Usuari o correu electrònic",
|
||||||
@@ -53,8 +54,8 @@
|
|||||||
},
|
},
|
||||||
"main-menu": {
|
"main-menu": {
|
||||||
"main-menu": "Menú principal",
|
"main-menu": "Menú principal",
|
||||||
"edit-profile": "Edita el perfil",
|
"edit-profile": "Editar perfil",
|
||||||
"campaigns": "Campanyes",
|
"create-campaign": "Crear campanya",
|
||||||
"log-out": "Tanca la sessió",
|
"log-out": "Tanca la sessió",
|
||||||
"settings": "Configuració"
|
"settings": "Configuració"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
"main-menu": "Dragonroll",
|
"main-menu": "Dragonroll",
|
||||||
"example": "Example Window",
|
"example": "Example Window",
|
||||||
"edit-profile": "Edit Profile",
|
"edit-profile": "Edit Profile",
|
||||||
"settings": "Settings"
|
"settings": "Settings",
|
||||||
|
"create-campaign": "Create Campaign"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"username": "Username or email",
|
"username": "Username or email",
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
"main-menu": {
|
"main-menu": {
|
||||||
"main-menu": "Main menu",
|
"main-menu": "Main menu",
|
||||||
"edit-profile": "Edit profile",
|
"edit-profile": "Edit profile",
|
||||||
"campaigns": "Campaigns",
|
"create-campaign": "Create Campaign",
|
||||||
"log-out": "Log out",
|
"log-out": "Log out",
|
||||||
"settings": "Settings"
|
"settings": "Settings"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
"main-menu": "Dragonroll",
|
"main-menu": "Dragonroll",
|
||||||
"example": "Ventana de ejemplo",
|
"example": "Ventana de ejemplo",
|
||||||
"edit-profile": "Editar perfil",
|
"edit-profile": "Editar perfil",
|
||||||
"settings": "Configuración"
|
"settings": "Configuración",
|
||||||
|
"create-campaign": "Crear campanya"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"username": "Usuario o correo electrónico",
|
"username": "Usuario o correo electrónico",
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
"main-menu": {
|
"main-menu": {
|
||||||
"main-menu": "Menú principal",
|
"main-menu": "Menú principal",
|
||||||
"edit-profile": "Editar perfil",
|
"edit-profile": "Editar perfil",
|
||||||
"campaigns": "Campañas",
|
"create-campaign": "Crear campanya",
|
||||||
"log-out": "Cerrar sesión",
|
"log-out": "Cerrar sesión",
|
||||||
"settings": "Configuración"
|
"settings": "Configuración"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user