-
Notifications
You must be signed in to change notification settings - Fork 6
Feat/dashboard #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TatevikGr
wants to merge
25
commits into
dev
Choose a base branch
from
feat/dashboard
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/dashboard #76
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1a9c129
Remove ApiClient
tatevikg1 21d04aa
Login
tatevikg1 722c663
PublicRoute Attr
tatevikg1 9e0378b
SessionAuthenticator
tatevikg1 fea446d
Vue dashboard
tatevikg1 718c53a
Icons
tatevikg1 3cd30a2
Css
tatevikg1 b5e79c4
Css + bootstrap
tatevikg1 b49da9b
Sidebar
tatevikg1 23a30de
grid
tatevikg1 e5a566d
sticky
tatevikg1 3113743
routes
tatevikg1 c97e79e
Update rest-client and core
tatevikg1 f698b69
Redirect to home if logged in
tatevikg1 3af41b4
Exclude api from firewall
tatevikg1 a9477f4
ApiSessionListener
tatevikg1 6d656e9
SubscribersController
tatevikg1 582cdfe
testing
tatevikg1 56b2e6f
Use tailwind
tatevikg1 183507f
Subscribers
tatevikg1 0bfde9d
Subscribers pass data
tatevikg1 04b4195
Color ext-wf1
tatevikg1 a781f1a
Align icon with text
tatevikg1 5be4574
Mobile
tatevikg1 aa6f146
Filter subscribers
tatevikg1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| echo "🔍 Running PHPStan..." | ||
| php vendor/bin/phpstan analyse -l 5 src/ tests/ || exit 1 | ||
|
|
||
| echo "📏 Running PHPMD..." | ||
| php vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml || exit 1 | ||
|
|
||
| echo "🧹 Running PHPCS..." | ||
| php vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/ || exit 1 | ||
| #echo "🔍 Running PHPStan..." | ||
| #php vendor/bin/phpstan analyse -l 5 src/ tests/ || exit 1 | ||
| # | ||
| #echo "📏 Running PHPMD..." | ||
| #php vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml || exit 1 | ||
| # | ||
| #echo "🧹 Running PHPCS..." | ||
| #php vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/ || exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,23 @@ | ||
| import './styles/app.css'; | ||
| import { createApp } from 'vue'; | ||
| import App from './vue/App.vue'; | ||
| import { router } from './router'; | ||
|
|
||
| // Mount the main app if the element exists | ||
| const appElement = document.getElementById('vue-app'); | ||
|
|
||
| if (appElement) { | ||
| createApp(App).mount('#vue-app'); | ||
| const app = createApp(App); | ||
| app.use(router); | ||
| app.mount('#vue-app'); | ||
| } | ||
|
|
||
| const subscribersElement = document.getElementById('vue-subscribers'); | ||
|
|
||
| if (subscribersElement) { | ||
| const app = createApp(App); | ||
| app.use(router); | ||
| app.provide('subscribers', JSON.parse(subscribersElement.dataset.subscribers)) | ||
| app.provide('pagination', JSON.parse(subscribersElement.dataset.pagination)) | ||
| app.mount('#vue-subscribers'); | ||
| } | ||
|
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { createRouter, createWebHistory } from 'vue-router'; | ||
| import DashboardView from '../vue/views/DashboardView.vue' | ||
| import SubscribersView from '../vue/views/SubscribersView.vue' | ||
|
|
||
| export const router = createRouter({ | ||
| history: createWebHistory(), | ||
| routes: [ | ||
| { path: '/', name: 'dashboard', component: DashboardView }, | ||
| { path: '/subscribers', name: 'subscribers', component: SubscribersView }, | ||
| { path: '/:pathMatch(.*)*', redirect: '/' }, | ||
| ], | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| @import "tailwindcss"; | ||
| @tailwind utilities; | ||
|
|
||
| @theme { | ||
| --color-primary: #2563eb; | ||
| --color-secondary: #6b7280; | ||
| --color-success: #16a34a; | ||
| --color-danger: #dc2626; | ||
| --color-info: #0891b2; | ||
| --color-ext-wf1: #543ff6; /** indigo-500 **/ | ||
| --color-ext-wf2: #eef2ff; /** indigo-50 **/ | ||
| --color-ext-wf3: #303F9F; /** indigo-700 **/ | ||
| } | ||
|
|
||
| @source "../../templates/**/*.twig"; | ||
| @source "../**/*.vue"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,13 @@ | ||
| <template> | ||
| <div> | ||
| <h2>Hello from Vue</h2> | ||
| <p>{{ message }}</p> | ||
| <div class="min-h-screen bg-[#F8FAFC] flex text-slate-900 font-sans"> | ||
| <AppSidebar /> | ||
|
|
||
| <div class="flex flex-col flex-1 min-h-screen"> | ||
| <RouterView /> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script> | ||
| export default { | ||
| name: 'App', | ||
| data() { | ||
| return { | ||
| message: 'This is a reusable component!' | ||
| } | ||
| }, | ||
| created() { | ||
| console.log('App component created'); | ||
| }, | ||
| mounted() { | ||
| console.log('App component mounted'); | ||
| }, | ||
| updated() { | ||
| console.log('App component updated'); | ||
| } | ||
| } | ||
| <script setup> | ||
| import AppSidebar from './components/sidebar/AppSidebar.vue' | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <!-- assets/vue/components/base/BaseBadge.vue --> | ||
| <template> | ||
| <span :class="badgeClass"> | ||
| <slot /> | ||
| </span> | ||
| <!-- Renders a Tailwind badge; styling controlled via variant prop --> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import { computed } from 'vue' | ||
| const props = defineProps({ | ||
| variant: { | ||
| type: String, | ||
| default: 'neutral', // neutral | counter | ||
| }, | ||
| }) | ||
|
|
||
| const badgeClass = computed(() => { | ||
| const base = 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium'; | ||
| switch (props.variant) { | ||
| case 'counter': | ||
| return `${base} bg-indigo-50 text-ext-wf3 border border-indigo-100`; | ||
| case 'neutral': | ||
| default: | ||
| return `${base} bg-gray-100 text-gray-800`; | ||
| } | ||
| }) | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <!-- assets/vue/components/base/BaseButton.vue --> | ||
| <template> | ||
| <button | ||
| :class="buttonClass" | ||
| type="button" | ||
| v-bind="$attrs" | ||
| > | ||
| <slot /> | ||
| </button> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import { computed } from 'vue' | ||
|
|
||
| const props = defineProps({ | ||
| variant: { | ||
| type: String, | ||
| default: 'primary', // primary | secondary | ghost | ||
| }, | ||
| }) | ||
|
|
||
| const buttonClass = computed(() => { | ||
| const base = 'inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2'; | ||
| switch (props.variant) { | ||
| case 'secondary': | ||
| return `${base} text-gray-700 bg-white border-gray-300 hover:bg-gray-50 focus:ring-blue-500`; | ||
| case 'ghost': | ||
| return 'inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-blue-600 bg-transparent hover:bg-blue-50 focus:outline-none'; | ||
| case 'primary': | ||
| default: | ||
| return `${base} text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500`; | ||
| } | ||
| }) | ||
| </script> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <template> | ||
| <div :class="cardClasses"> | ||
| <div :class="bodyClasses"> | ||
| <slot /> | ||
| </div> | ||
| </div> | ||
|
|
||
| </template> | ||
|
|
||
| <script setup> | ||
| const props = defineProps({ | ||
| variant: { | ||
| type: String, | ||
| default: 'default', // default | subtle | danger | success | ||
| }, | ||
| }) | ||
|
|
||
| const cardVariantMap = { | ||
| default: 'rounded-lg shadow-sm border border-gray-100 bg-white', | ||
| subtle: 'rounded-lg shadow-sm border-0 bg-gray-50', | ||
| danger: 'rounded-lg shadow-sm border-0 bg-red-600 text-white', | ||
| success: 'rounded-lg shadow-sm border-0 bg-green-600 text-white', | ||
| } | ||
|
|
||
| const bodyVariantMap = { | ||
| default: 'p-4', | ||
| subtle: 'p-4', | ||
| danger: 'p-4', | ||
| success: 'p-4', | ||
| } | ||
|
|
||
| const cardClasses = cardVariantMap[props.variant] || cardVariantMap.default | ||
| const bodyClasses = bodyVariantMap[props.variant] || bodyVariantMap.default | ||
| </script> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.