forked from noxious/client
Optimization, small tailwind tweaks
This commit is contained in:
@ -31,4 +31,4 @@ const backspaceDelete = (event) => {
|
||||
modelValue.value = modelValue.value.slice(0, -1)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<div class="chat-wrapper w-full h-full flex justify-start items-center">
|
||||
<input class="max-w-[750px] w-full h-[51px] rounded-lg text-xl px-[24px] py-0 bg-white bg-opacity-85 border-2 border-solid border-white text-gray-200 bg-[url('/assets/icons/submit-icon.svg')] bg-no-repeat bg-30px" placeholder="Type something..." />
|
||||
<input class="bg-[calc(100%_-_25px)_center] max-w-[750px] w-full h-[51px] rounded-lg text-xl px-[24px] py-0 bg-white bg-opacity-85 border-2 border-solid border-white text-gray-200 bg-[url('/assets/icons/submit-icon.svg')] bg-no-repeat bg-30px" placeholder="Type something..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.chat-wrapper {
|
||||
input {
|
||||
// @TODO: find Tailwind alternative as calc() doesnt work
|
||||
background-position: calc(100% - 25px) center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<!-- TODO: Replace socket.character with other (selected) player's -->
|
||||
<div class="hud-wrapper other-player relative right-0 w-[310px] h-[84px]">
|
||||
<div class="absolute w-[54px] h-[54px] bg-white bg-opacity-80 rounded-full border-3 border-solid border-white top-1/2 translate-y-[-50%] right-0 z-20">
|
||||
<img class="w-[28px] absolute left-1/2 top-1/2 translate-x-[-50%] translate-y-[-50%] scale-x-[-1]"draggable="false" src="/assets/avatar/default/head.png" />
|
||||
<img class="w-[28px] absolute left-1/2 top-1/2 translate-x-[-50%] translate-y-[-50%] scale-x-[-1]" draggable="false" src="/assets/avatar/default/head.png" />
|
||||
</div>
|
||||
<div class="hud-bg absolute top-0 right-[30px] w-[280px] h-[84px] z-10 bg-[url('/assets/bg-hud-2.png')] bg-center bg-[length:cover] bg-no-repeat mask-[url('/assets/shapes/hud-image-shape.svg')] mask-center mask-[length:cover] mask-no-repeat"></div>
|
||||
<div class="absolute top-0 right-[30px] w-[280px] h-[84px] z-10 scale-x-[-1] bg-[url('/assets/shapes/hud-shape-empty.svg')] bg-center bg-[length:cover] bg-no-repeat">
|
||||
|
@ -19,4 +19,3 @@ import { useGmPanelStore } from '@/stores/gmPanel'
|
||||
const zoneEditorStore = useZoneEditorStore()
|
||||
const gmPanelStore = useGmPanelStore()
|
||||
</script>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<span>Tiles</span>
|
||||
<div class="absolute left-0 bottom-0 w-full h-[1px] bg-cyan-200"></div>
|
||||
</a>
|
||||
<a class="relative p-2.5 hover:cursor-pointer" :class="{ selected: selectedCategory === 'objects' }" @click="() => (selectedCategory = 'objects')">
|
||||
<a class="relative p-2.5 hover:cursor-pointer" :class="{ selected: selectedCategory === 'objects' }" @click="() => (selectedCategory = 'objects')">
|
||||
<span>Objects</span>
|
||||
<div class="absolute left-0 bottom-0 w-full h-[1px] bg-cyan-200"></div>
|
||||
</a>
|
||||
|
@ -5,10 +5,10 @@
|
||||
<h3 class="text-lg">Objects</h3>
|
||||
<div class="flex">
|
||||
<div class="w-full flex gap-1.5 flex-row">
|
||||
<div>
|
||||
<label class="mb-1.5 font-titles hidden" for="search">Search...</label>
|
||||
<input @mousedown.stop class="input-cyan" type="text" name="search" placeholder="Search" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-1.5 font-titles hidden" for="search">Search...</label>
|
||||
<input @mousedown.stop class="input-cyan" type="text" name="search" placeholder="Search" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-1.5 font-titles hidden" for="z-index">Z-index</label>
|
||||
<input @mousedown.stop class="input-cyan" type="number" name="z-index" placeholder="Z-index" />
|
||||
@ -56,4 +56,4 @@ onMounted(async () => {
|
||||
zoneEditorStore.setObjectList(response)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<Modal v-if="isModalOpen" @modal:close="() => zoneEditorStore.setTool('move')" :isModalOpen="true" :modal-width="645" :modal-height="260">
|
||||
<Modal v-if="isModalOpen" @modal:close="() => zoneEditorStore.setTool('move')" :isModalOpen="true" :modal-width="645" :modal-height="260">
|
||||
<template #modalHeader>
|
||||
<h3 class="m-0 font-medium shrink-0">Tiles</h3>
|
||||
<div class="flex">
|
||||
@ -15,8 +15,22 @@
|
||||
<template #modalBody>
|
||||
<div class="m-[15px]">
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<img class="w-[64px] h-[32px] cursor-pointer border-2 border-solid border-transparent transition ease duration-300" src="/assets/zone/blank_tile.png" alt="Blank tile" @click="zoneEditorStore.setSelectedTile('blank_tile')" :class="{ selected: zoneEditorStore.selectedTile && zoneEditorStore.selectedTile === 'blank_tile' }" />
|
||||
<img class="w-[64px] h-[32px] cursor-pointer border-2 border-solid border-transparent transition ease duration-300" v-for="(tile, index) in zoneEditorStore.tileList" :key="index" :src="`${config.server_endpoint}/assets/tiles/${tile}.png`" alt="Tile" @click="zoneEditorStore.setSelectedTile(tile)" :class="{ selected: zoneEditorStore.selectedTile && zoneEditorStore.selectedTile === tile }" />
|
||||
<img
|
||||
class="w-[64px] h-[32px] cursor-pointer border-2 border-solid border-transparent transition ease duration-300"
|
||||
src="/assets/zone/blank_tile.png"
|
||||
alt="Blank tile"
|
||||
@click="zoneEditorStore.setSelectedTile('blank_tile')"
|
||||
:class="{ selected: zoneEditorStore.selectedTile && zoneEditorStore.selectedTile === 'blank_tile' }"
|
||||
/>
|
||||
<img
|
||||
class="w-[64px] h-[32px] cursor-pointer border-2 border-solid border-transparent transition ease duration-300"
|
||||
v-for="(tile, index) in zoneEditorStore.tileList"
|
||||
:key="index"
|
||||
:src="`${config.server_endpoint}/assets/tiles/${tile}.png`"
|
||||
alt="Tile"
|
||||
@click="zoneEditorStore.setSelectedTile(tile)"
|
||||
:class="{ selected: zoneEditorStore.selectedTile && zoneEditorStore.selectedTile === tile }"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -133,7 +133,7 @@ watch(objectList, (newObjects) => {
|
||||
object: newObject
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
onBeforeMount(() => {
|
||||
exampleTilesArray.forEach((row, y) => row.forEach((tile, x) => placeTile(zone, tiles, x, y, 'blank_tile')))
|
||||
|
@ -53,4 +53,4 @@ watch(width, (value) => {
|
||||
watch(height, (value) => {
|
||||
zoneEditorStore.setHeight(parseInt(value))
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user