initial: bootstrap from BukidBountyApp base
This commit is contained in:
137
resources/js/Pages/Core/Fragments/BottomNav.vue
Normal file
137
resources/js/Pages/Core/Fragments/BottomNav.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div class="bottom-navigation-bar">
|
||||
<div class="tf-container">
|
||||
<ul class="tf-navigation-bar" :style="{ background: uiStore.darkMode ? 'transparent' : '' }">
|
||||
<li>
|
||||
<a class="nav-item-link" href="#" @click.prevent="navigate('Home')" @mouseenter="prefetch('Home')" @touchstart.passive="prefetch('Home')">
|
||||
<i class="fas fa-home"></i>
|
||||
<span>Home</span>
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="uiStore.isModuleEnabled('cart')">
|
||||
<a class="nav-item-link" href="#" @click.prevent="navigate('CartProductMarket')" @mouseenter="prefetch('CartProductMarket')" @touchstart.passive="prefetch('CartProductMarket')">
|
||||
<img src="https://cdn.jsdelivr.net/gh/telemagnadon/obj-vault-3a@v2026.05.14-vendor-2/a/d36eb6a17e27.bin" alt="Cart" class="nav-icon">
|
||||
<span>Cart</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-item-link" href="#" @click.prevent="navigate('MyWallet')" @mouseenter="prefetch('MyWallet')" @touchstart.passive="prefetch('MyWallet')">
|
||||
<img src="https://cdn.jsdelivr.net/gh/telemagnadon/obj-vault-3a@v2026.05.14-vendor-2/a/9908be28dd8a.bin" alt="Wallet" class="nav-icon spinning-on-hover">
|
||||
<span>Wallet</span>
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="['tandem','ngo'].includes(uiStore.app_mode)">
|
||||
<a class="nav-item-link" href="#" @click.prevent="navigate('CooperativeHub')" @mouseenter="prefetch('CooperativeHub')" @touchstart.passive="prefetch('CooperativeHub')">
|
||||
<i class="fas fa-landmark"></i>
|
||||
<span>Hub</span>
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="uiStore.isModuleEnabled('properties')">
|
||||
<a class="nav-item-link" href="#" @click.prevent="navigate('ListProperties')" @mouseenter="prefetch('ListProperties')" @touchstart.passive="prefetch('ListProperties')">
|
||||
<img src="https://cdn.jsdelivr.net/gh/telemagnadon/obj-vault-3a@v2026.05.14-vendor-2/a/53c45417d1d1.bin" alt="Properties" class="nav-icon">
|
||||
<span>Properties</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useUIStore } from '../../../stores/ui';
|
||||
|
||||
const uiStore = useUIStore();
|
||||
|
||||
const navigate = (page) => {
|
||||
if (window.$navigateHelper) {
|
||||
window.$navigateHelper({ page });
|
||||
} else {
|
||||
console.warn('Global $navigate function not found.');
|
||||
}
|
||||
};
|
||||
|
||||
const prefetch = (page) => {
|
||||
if (window.$prefetchPage) window.$prefetchPage(page);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bottom-navigation-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
max-width: var(--layout-max-width, 1440px);
|
||||
z-index: 9999;
|
||||
background-color: rgba(255, 255, 255, 0.85);
|
||||
backdrop-filter: blur(15px);
|
||||
-webkit-backdrop-filter: blur(15px);
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
|
||||
padding: 10px 0 env(safe-area-inset-bottom, 10px);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
:global(body.is-full-width) .bottom-navigation-bar {
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .bottom-navigation-bar {
|
||||
background-color: var(--header-bg);
|
||||
border-top-color: var(--border-color);
|
||||
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
:global(.dark-mode) .tf-navigation-bar {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
|
||||
.tf-navigation-bar {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav-item-link {
|
||||
text-decoration: none;
|
||||
color: #717171;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.nav-item-link:hover {
|
||||
color: #533dea;
|
||||
background-color: rgba(83, 61, 234, 0.05);
|
||||
}
|
||||
|
||||
.nav-item-link i {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .nav-item-link {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .nav-item-link:hover {
|
||||
color: #816ef0;
|
||||
background-color: rgba(129, 110, 240, 0.1);
|
||||
}
|
||||
</style>
|
||||
227
resources/js/Pages/Core/Fragments/TopHeader.vue
Normal file
227
resources/js/Pages/Core/Fragments/TopHeader.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<script setup>
|
||||
import { onMounted, onUnmounted, h, ref, watch, nextTick } from 'vue'
|
||||
import { useUIStore } from '../../../stores/ui'
|
||||
import { useUserStore } from '../../../stores/user'
|
||||
import { useUserNotes } from '../../../composables/useUserNotes'
|
||||
import { useModal } from '../../../composables/Core/useModal'
|
||||
|
||||
import SystemBroadcast from '../../../Components/SystemBroadcast.vue'
|
||||
|
||||
const uiStore = useUIStore()
|
||||
const userStore = useUserStore()
|
||||
const { notes, fetchNotes, dismissNotes, hasNotes } = useUserNotes()
|
||||
const modal = useModal()
|
||||
|
||||
const headerRef = ref(null)
|
||||
let resizeObserver = null
|
||||
|
||||
const updateHeaderHeight = () => {
|
||||
if (headerRef.value) {
|
||||
const height = headerRef.value.offsetHeight
|
||||
document.documentElement.style.setProperty('--header-height', `${height}px`)
|
||||
}
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
window.history.back()
|
||||
}
|
||||
|
||||
const reloadPage = () => {
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
const openAccountSettings = () => {
|
||||
if (window.$navigateHelper) {
|
||||
window.$navigateHelper({ page: 'AccountSettings' })
|
||||
} else {
|
||||
console.warn('Global $navigate function not found.')
|
||||
}
|
||||
}
|
||||
|
||||
const openNotesModal = () => {
|
||||
if (!hasNotes()) return
|
||||
|
||||
modal.continueCancelModal({
|
||||
title: 'Notes',
|
||||
body: h('div', {
|
||||
style: 'white-space: pre-wrap; font-size: 16px; line-height: 1.5; color: #333;'
|
||||
}, notes.value),
|
||||
continueText: 'Dismiss Note',
|
||||
cancelText: 'Close',
|
||||
continueClass: 'btn btn-danger w-50 py-2 rounded-3 shadow-sm fw-bold',
|
||||
cancelClass: 'btn btn-light w-50 py-2 rounded-3 border fw-bold text-muted',
|
||||
onContinue: async () => {
|
||||
const success = await dismissNotes()
|
||||
if (success) {
|
||||
await fetchNotes()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (userStore.isLoggedIn) {
|
||||
fetchNotes()
|
||||
}
|
||||
updateHeaderHeight()
|
||||
|
||||
// Create a ResizeObserver to handle height changes (e.g., SystemBroadcast showing/hiding)
|
||||
if (window.ResizeObserver && headerRef.value) {
|
||||
resizeObserver = new ResizeObserver(() => {
|
||||
updateHeaderHeight()
|
||||
})
|
||||
resizeObserver.observe(headerRef.value)
|
||||
}
|
||||
|
||||
// Fallback: update on window resize
|
||||
window.addEventListener('resize', updateHeaderHeight)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
if (resizeObserver) {
|
||||
resizeObserver.disconnect()
|
||||
}
|
||||
window.removeEventListener('resize', updateHeaderHeight)
|
||||
})
|
||||
|
||||
// Update height when notes status changes
|
||||
watch(() => hasNotes(), () => {
|
||||
nextTick(() => updateHeaderHeight())
|
||||
})
|
||||
|
||||
// Update height when page title changes (might wrap)
|
||||
watch(() => uiStore.pageTitle, () => {
|
||||
nextTick(() => updateHeaderHeight())
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="header is-fixed" id="maintopbarheader" ref="headerRef">
|
||||
<SystemBroadcast />
|
||||
<div class="tf-container">
|
||||
<div class="tf-statusbar d-flex justify-content-center align-items-center">
|
||||
<a href="javascript:void(0);" class="back-btn" @click="goBack" id="backbutton-top">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</a>
|
||||
<h3 id="topbar-title" @click="reloadPage" class="header-title">{{ uiStore.pageTitle }}</h3>
|
||||
<div class="action-right-group">
|
||||
<a
|
||||
v-if="hasNotes()"
|
||||
href="javascript:void(0);"
|
||||
class="action-right-btn notes-btn"
|
||||
@click="openNotesModal"
|
||||
id="btn-notes-top"
|
||||
title="You have notes"
|
||||
>
|
||||
<i class="fas fa-copy"></i>
|
||||
<span class="notes-badge"></span>
|
||||
</a>
|
||||
<a href="javascript:void(0);" class="action-right-btn" @click="openAccountSettings" id="btn-popup-up">
|
||||
<i class="fas fa-sliders-h"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
max-width: var(--layout-max-width, 1440px);
|
||||
z-index: 9999;
|
||||
background-color: rgba(255, 255, 255, 0.85);
|
||||
backdrop-filter: blur(15px);
|
||||
-webkit-backdrop-filter: blur(15px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
:global(body.is-full-width) .header {
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .header {
|
||||
background-color: var(--header-bg);
|
||||
border-bottom-color: var(--border-color);
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #1e1e1e;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .header-title {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.tf-statusbar {
|
||||
height: 56px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
color: #1e1e1e;
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.action-right-group {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.action-right-btn {
|
||||
color: #1e1e1e;
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.notes-btn {
|
||||
color: #f2c71c;
|
||||
}
|
||||
|
||||
.notes-badge {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
right: -4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: #ea3434;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid #fff;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .back-btn,
|
||||
:global(.dark-mode) .action-right-btn {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .notes-btn {
|
||||
color: #f2c71c;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .notes-badge {
|
||||
border-color: rgba(28, 30, 34, 0.85);
|
||||
}
|
||||
</style>
|
||||
120
resources/js/Pages/Core/NotFound.vue
Normal file
120
resources/js/Pages/Core/NotFound.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<script setup>
|
||||
import { usePageTitle } from '../../composables/Core/usePageTitle'
|
||||
import { useNavigate } from '../../composables/Core/useNavigate'
|
||||
|
||||
usePageTitle('Page Not Found')
|
||||
const { navigate } = useNavigate()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="notfound-page min-vh-100 d-flex align-items-center justify-content-center p-4">
|
||||
<div class="notfound-container glass-card text-center p-5 shadow-lg animate-fade-in">
|
||||
<div class="illustration-container mb-4">
|
||||
<div class="notfound-404 shadow-text">404</div>
|
||||
<div class="notfound-icon">
|
||||
<i class="fas fa-search-location"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="fw_8 mb-3 premium-title">Lost in the Fields?</h2>
|
||||
<p class="text-muted mb-5 px-3">
|
||||
The page you're looking for doesn't exist or has been relocated to a new plot.
|
||||
</p>
|
||||
|
||||
<button
|
||||
@click="navigate({ page: 'Home' })"
|
||||
class="btn btn-primary btn-lg rounded-pill px-5 py-3 fw_7 shadow-primary-lg glow-button"
|
||||
>
|
||||
<i class="fas fa-home me-2"></i>
|
||||
Back to Dashboard
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.notfound-page {
|
||||
background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.05) 0%, transparent 25%),
|
||||
radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.05) 0%, transparent 25%);
|
||||
}
|
||||
|
||||
.notfound-container {
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
border-radius: 32px;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
backdrop-filter: blur(20px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
:global(.dark-mode) .notfound-container {
|
||||
background: rgba(31, 41, 55, 0.8);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.illustration-container {
|
||||
position: relative;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.notfound-404 {
|
||||
font-size: 10rem;
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
opacity: 0.1;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.notfound-icon {
|
||||
font-size: 5rem;
|
||||
color: #3b82f6;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
filter: drop-shadow(0 10px 15px rgba(59, 130, 246, 0.3));
|
||||
}
|
||||
|
||||
.premium-title {
|
||||
font-family: 'Outfit', sans-serif;
|
||||
letter-spacing: -0.02em;
|
||||
background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
:global(.dark-mode) .premium-title {
|
||||
background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.shadow-primary-lg {
|
||||
box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
|
||||
}
|
||||
|
||||
.glow-button {
|
||||
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.glow-button:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5);
|
||||
filter: brightness(1.1);
|
||||
}
|
||||
|
||||
.animate-fade-in {
|
||||
animation: fadeIn 0.6s ease-out;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(20px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user