diff --git a/src/App.vue b/src/App.vue index 28eafaa..db25e50 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,10 +11,10 @@ import { useZoneEditorStore } from '@/stores/zoneEditorStore' import Notifications from '@/components/utilities/Notifications.vue' import GmTools from '@/components/gameMaster/GmTools.vue' import GmPanel from '@/components/gameMaster/GmPanel.vue' -import Login from '@/screens/Login.vue' -import Characters from '@/screens/Characters.vue' -import Game from '@/screens/Game.vue' -import ZoneEditor from '@/screens/ZoneEditor.vue' +import Login from '@/components/screens/Login.vue' +import Characters from '@/components/screens/Characters.vue' +import Game from '@/components/screens/Game.vue' +import ZoneEditor from '@/components/screens/ZoneEditor.vue' import { computed, watch } from 'vue' const gameStore = useGameStore() diff --git a/src/components/gui/CharacterProfile.vue b/src/components/gui/CharacterProfile.vue index 3704430..14e52a2 100644 --- a/src/components/gui/CharacterProfile.vue +++ b/src/components/gui/CharacterProfile.vue @@ -168,8 +168,8 @@ function stopDrag() { } function adjustPosition() { - x.value = Math.max(0, Math.min(x.value, window.innerWidth - width.value)) - y.value = Math.max(0, Math.min(y.value, window.innerHeight - height.value)) + x.value = Math.min(x.value, window.innerWidth - width.value) + y.value = Math.min(y.value, window.innerHeight - height.value) } function initializePosition() { @@ -236,6 +236,7 @@ onMounted(() => { }) onUnmounted(() => { + removeEventListener('keydown', keyPress) removeEventListener('mousemove', drag) removeEventListener('mouseup', stopDrag) }) diff --git a/src/screens/Characters.vue b/src/components/screens/Characters.vue similarity index 97% rename from src/screens/Characters.vue rename to src/components/screens/Characters.vue index c2ab3e8..36d94f6 100644 --- a/src/screens/Characters.vue +++ b/src/components/screens/Characters.vue @@ -1,159 +1,159 @@ - - - - - - - - - - - - {{ character.name }} - - { - deletingCharacter = character - } - " - > - - - - - - - Lvl. {{ character.level }} - - - - - - - - Create new - - - - - - - - - - - - - PLAY - - - - - - - - - - Create your character - - - - - - - Nickname - - - - Cancel - Create - - - - - - - - - - Delete character? - - - - Do you want to permanently delete {{ deletingCharacter.name }}? - - - - - - + + + + + + + + + + + + {{ character.name }} + + { + deletingCharacter = character + } + " + > + + + + + + + Lvl. {{ character.level }} + + + + + + + + Create new + + + + + + + + + + + + + PLAY + + + + + + + + + + Create your character + + + + + + + Nickname + + + + Cancel + Create + + + + + + + + + + Delete character? + + + + Do you want to permanently delete {{ deletingCharacter.name }}? + + + + + + diff --git a/src/screens/Game.vue b/src/components/screens/Game.vue similarity index 96% rename from src/screens/Game.vue rename to src/components/screens/Game.vue index 4bbbad7..ef10b82 100644 --- a/src/screens/Game.vue +++ b/src/components/screens/Game.vue @@ -1,82 +1,82 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/screens/Loading.vue b/src/components/screens/Loading.vue similarity index 97% rename from src/screens/Loading.vue rename to src/components/screens/Loading.vue index 68165e9..0433a87 100644 --- a/src/screens/Loading.vue +++ b/src/components/screens/Loading.vue @@ -1,25 +1,25 @@ - - - - Play - - - - - - - - + + + + Play + + + + + + + + diff --git a/src/components/screens/Login.vue b/src/components/screens/Login.vue new file mode 100644 index 0000000..17a6e3a --- /dev/null +++ b/src/components/screens/Login.vue @@ -0,0 +1,46 @@ + + + + isPasswordResetFormShown = false" /> + + + + + + + + + + + isPasswordResetFormShown = true" @switchToRegister="currentForm = 'register'" /> + + + + + + + + + + diff --git a/src/screens/ZoneEditor.vue b/src/components/screens/ZoneEditor.vue similarity index 96% rename from src/screens/ZoneEditor.vue rename to src/components/screens/ZoneEditor.vue index b2f69f9..e682867 100644 --- a/src/screens/ZoneEditor.vue +++ b/src/components/screens/ZoneEditor.vue @@ -1,85 +1,85 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/src/components/screens/partials/LoginForm.vue b/src/components/screens/partials/LoginForm.vue new file mode 100644 index 0000000..e813d98 --- /dev/null +++ b/src/components/screens/partials/LoginForm.vue @@ -0,0 +1,69 @@ + + + + + + + + + + {{ loginError }} + + emit('openResetPasswordModal')" type="button" class="inline-flex self-end p-0 text-cyan-300 text-base">Forgot password? + Play now + + + + + + + + + + Don't have an account? emit('switchToRegister')">Sign up + + + + + \ No newline at end of file diff --git a/src/components/screens/partials/NewPasswordForm.vue b/src/components/screens/partials/NewPasswordForm.vue new file mode 100644 index 0000000..2d9d05a --- /dev/null +++ b/src/components/screens/partials/NewPasswordForm.vue @@ -0,0 +1,67 @@ + + + + + + + + + + + {{ newPasswordError }} + + Register now + + + + + + + + + + emit('switchToLogin')">Back to login + + + + + \ No newline at end of file diff --git a/src/components/screens/partials/RegisterForm.vue b/src/components/screens/partials/RegisterForm.vue new file mode 100644 index 0000000..5619b80 --- /dev/null +++ b/src/components/screens/partials/RegisterForm.vue @@ -0,0 +1,97 @@ + + + + + + + + + + + {{ loginError }} + + Register now + + + + + + + + + + Already have an account? emit('switchToLogin')">Log in + + + + + \ No newline at end of file diff --git a/src/components/utilities/Modal.vue b/src/components/utilities/Modal.vue index 81792a7..0cd7b8f 100644 --- a/src/components/utilities/Modal.vue +++ b/src/components/utilities/Modal.vue @@ -146,8 +146,8 @@ function stopDrag() { function adjustPosition() { if (isFullScreen.value) return - x.value = Math.max(0, Math.min(x.value, window.innerWidth - width.value)) - y.value = Math.max(0, Math.min(y.value, window.innerHeight - height.value)) + x.value = Math.min(x.value, window.innerWidth - width.value) + y.value = Math.min(y.value, window.innerHeight - height.value) } function handleResize() { diff --git a/src/components/utilities/ResetPassword.vue b/src/components/utilities/ResetPassword.vue index 3a7f037..68cb084 100644 --- a/src/components/utilities/ResetPassword.vue +++ b/src/components/utilities/ResetPassword.vue @@ -1,51 +1,53 @@ - - isPasswordResetOpen = !isPasswordResetOpen" :modal-width="400" :modal-height="300" :is-resizable="false"> - - Reset Password - - - - - - - Fill in your email to receive a password reset request. - - {{ resetPasswordError }} - - - Cancel - Send mail - - - - - - - - \ No newline at end of file diff --git a/src/screens/Login.vue b/src/screens/Login.vue deleted file mode 100644 index cdfa67d..0000000 --- a/src/screens/Login.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - {{ loginError }} - - Forgot password? - Play now - - - - - - - - - - Don't have an account? Sign up - - - - - - - - - - - - - - {{ loginError }} - - Register now - - - - - - - - - - Already have an account? Log in - - - - - - - - -
- Do you want to permanently delete {{ deletingCharacter.name }}? -
+ Do you want to permanently delete {{ deletingCharacter.name }}? +
Don't have an account? emit('switchToRegister')">Sign up
emit('switchToLogin')">Back to login
Already have an account? emit('switchToLogin')">Log in
Fill in your email to receive a password reset request.
Don't have an account? Sign up
Already have an account? Log in