Good
This commit is contained in:
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>
|
||||
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 VersionRender from '../partials/VersionRender.vue';
|
||||
@@ -14,6 +14,11 @@ const data = props.data;
|
||||
|
||||
let id = data.id;
|
||||
|
||||
function CreateCampaignWindow(){
|
||||
CreateChildWindow(GetFirstWindowId('main_menu'), 'create_campaign', {
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
Top(wrapper);
|
||||
SetupHandle(id, handle);
|
||||
@@ -29,12 +34,18 @@ onMounted(() => {
|
||||
|
||||
<EditUserPartial></EditUserPartial>
|
||||
<!-- Body -->
|
||||
<h1>{{ $t("main-menu.main-menu")}}</h1>
|
||||
|
||||
<div class="button-container">
|
||||
<button class="btn-primary button-expand sound-click" v-on:click="OpenCampaigns" ref="campaignButton">{{ $t("main-menu.campaigns") }}</button>
|
||||
<div class="vert-expand">
|
||||
<div class="vert top">
|
||||
<h1>{{ $t("main-menu.main-menu")}}</h1>
|
||||
</div>
|
||||
|
||||
<div class="vert bot">
|
||||
<div class="button-container">
|
||||
<button class="btn-primary button-expand sound-click" v-on:click="CreateCampaignWindow" ref="campaignButton">{{ $t("main-menu.create-campaign") }}</button>
|
||||
</div>
|
||||
<VersionRender></VersionRender>
|
||||
</div>
|
||||
</div>
|
||||
<VersionRender></VersionRender>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -45,6 +56,25 @@ h1 {
|
||||
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 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user