@mundogamernetwork/shared-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +283 -0
  2. package/components/PressKit/AssetGallery.vue +349 -0
  3. package/components/PressKit/Awards.vue +100 -0
  4. package/components/PressKit/Credits.vue +78 -0
  5. package/components/PressKit/FactSheet.vue +204 -0
  6. package/components/PressKit/Hero.vue +143 -0
  7. package/components/PressKit/Quotes.vue +80 -0
  8. package/components/PressKit/VideoPlayer.vue +134 -0
  9. package/components/checkout/MgCartItemList.vue +214 -0
  10. package/components/checkout/MgCartSummary.vue +204 -0
  11. package/components/checkout/MgCheckoutSidebar.vue +230 -0
  12. package/components/checkout/MgGuestEmailForm.vue +97 -0
  13. package/components/checkout/MgPaymentMethodSelector.vue +162 -0
  14. package/components/checkout/MgPixQRCode.vue +222 -0
  15. package/components/indie-wall/IndieWallLeaderboard.vue +208 -0
  16. package/components/indie-wall/MuralCanvas.vue +481 -0
  17. package/components/indie-wall/StepBlock.vue +314 -0
  18. package/components/indie-wall/StepCustomize.vue +530 -0
  19. package/components/indie-wall/StepGoal.vue +169 -0
  20. package/components/indie-wall/StepPackage.vue +145 -0
  21. package/components/indie-wall/StepPay.vue +209 -0
  22. package/components/indie-wall/SupportStepper.vue +372 -0
  23. package/components/invoices/MgInvoiceDownload.vue +50 -0
  24. package/components/pricing/MgBillingToggle.vue +74 -0
  25. package/components/pricing/MgPricingCard.vue +245 -0
  26. package/components/ui/Header/MgMessageCard.vue +147 -0
  27. package/components/ui/Header/MgMessageModal.vue +414 -0
  28. package/components/ui/Header/MgNotificationCard.vue +200 -0
  29. package/components/ui/Header/MgNotificationsModal.vue +125 -0
  30. package/components/ui/MgAnnouncementBanner.vue +147 -0
  31. package/components/ui/MgBanners.vue +23 -0
  32. package/components/ui/MgHeaderComponent.vue +283 -0
  33. package/components/ui/MgHeaderUIConfig.vue +225 -0
  34. package/components/ui/MgHeaderUIUser.vue +301 -0
  35. package/components/ui/MgLoginModal.vue +156 -0
  36. package/components/ui/MgPromotionBanner.vue +185 -0
  37. package/composables/useLogout.ts +42 -0
  38. package/composables/useMgCheckout.ts +287 -0
  39. package/composables/useMgUserNotifications.ts +122 -0
  40. package/composables/usePaymentMethods.ts +75 -0
  41. package/composables/useSubscription.ts +163 -0
  42. package/middleware/auth.global.ts +40 -0
  43. package/nuxt.config.ts +31 -0
  44. package/package.json +40 -0
  45. package/pages/[slug]/index.vue +112 -0
  46. package/pages/about.vue +133 -0
  47. package/pages/blog.vue +430 -0
  48. package/pages/careers.vue +329 -0
  49. package/pages/contact.vue +339 -0
  50. package/pages/faq.vue +317 -0
  51. package/pages/health-check.vue +20 -0
  52. package/pages/icons.vue +58 -0
  53. package/pages/magazine/[slug].vue +209 -0
  54. package/pages/magazine/index.vue +267 -0
  55. package/pages/media-kit/[slug].vue +625 -0
  56. package/pages/mural/[slug].vue +1058 -0
  57. package/pages/partners.vue +290 -0
  58. package/pages/press.vue +237 -0
  59. package/pages/presskit/[slug].vue +191 -0
  60. package/pages/roadmap.vue +355 -0
  61. package/pages/status.vue +199 -0
  62. package/pages/team.vue +266 -0
  63. package/pages/wall/[slug].vue +11 -0
  64. package/plugins/auth.client.ts +17 -0
  65. package/plugins/echo.client.ts +132 -0
  66. package/services/authService.ts +95 -0
  67. package/services/chatService.ts +53 -0
  68. package/services/contactService.ts +35 -0
  69. package/services/documentService.ts +16 -0
  70. package/services/httpService.ts +95 -0
  71. package/services/indieWallService.ts +174 -0
  72. package/services/institutionalService.ts +248 -0
  73. package/services/mediaKitService.ts +51 -0
  74. package/services/notificationsService.ts +20 -0
  75. package/services/pressKitService.ts +55 -0
  76. package/stores/announcement.ts +129 -0
  77. package/stores/auth.ts +86 -0
  78. package/stores/chat.ts +150 -0
  79. package/stores/contact.ts +28 -0
  80. package/stores/document.ts +27 -0
  81. package/stores/index.ts +34 -0
  82. package/stores/institutional.ts +231 -0
  83. package/stores/login.ts +27 -0
  84. package/stores/notifications.ts +133 -0
  85. package/stores/promotion.ts +154 -0
  86. package/types/index.ts +135 -0
  87. package/utils/serialize.ts +29 -0
@@ -0,0 +1,267 @@
1
+ <script setup lang="ts">
2
+ import { storeToRefs } from "pinia";
3
+
4
+ definePageMeta({ layout: "default" });
5
+
6
+ const institutionalStore = useInstitutionalStore();
7
+ const { magazine } = storeToRefs(institutionalStore);
8
+ const authStore = useAuthStore();
9
+ const { signedIn } = storeToRefs(authStore);
10
+
11
+ const config = useRuntimeConfig();
12
+ const systemId = config.public.mgSharedUi?.systemId || import.meta.env.VITE_SYSTEM_ID;
13
+
14
+ const currentPage = ref(1);
15
+ const perPage = 12;
16
+ const selectedLanguage = ref("");
17
+
18
+ async function fetchMagazines() {
19
+ try {
20
+ const params: any = {
21
+ filter: {
22
+ status: 1,
23
+ platform_id: systemId,
24
+ },
25
+ sort: "created_at",
26
+ order: "desc",
27
+ per_page: perPage,
28
+ page: currentPage.value,
29
+ };
30
+ if (selectedLanguage.value) params.filter.language = selectedLanguage.value;
31
+
32
+ await institutionalStore.fetchLatestMagazine(params);
33
+ } catch {
34
+ // silent
35
+ }
36
+ }
37
+
38
+ function loadMore() {
39
+ currentPage.value++;
40
+ const params: any = {
41
+ filter: {
42
+ status: 1,
43
+ platform_id: systemId,
44
+ },
45
+ sort: "created_at",
46
+ order: "desc",
47
+ per_page: perPage,
48
+ page: currentPage.value,
49
+ };
50
+ if (selectedLanguage.value) params.filter.language = selectedLanguage.value;
51
+ institutionalStore.fetchMoreLatestMagazine(params);
52
+ }
53
+
54
+ function changeLanguage() {
55
+ currentPage.value = 1;
56
+ fetchMagazines();
57
+ }
58
+
59
+ onMounted(() => {
60
+ fetchMagazines();
61
+ institutionalStore.fetchLanguage({ per_page: "all" });
62
+ });
63
+
64
+ const locale = useNuxtApp().$i18n.locale;
65
+ </script>
66
+
67
+ <template>
68
+ <div id="magazine" class="container magazine">
69
+ <section>
70
+ <div class="header">
71
+ <div>
72
+ <h1 class="title-4">{{ $t("more.magazine.title") }}</h1>
73
+ <p>{{ $t("more.magazine.subtitle") }}</p>
74
+ </div>
75
+ </div>
76
+ <div class="container">
77
+ <div class="row">
78
+ <div class="col-8 offset-2">
79
+ <div class="filters">
80
+ <select v-model="selectedLanguage" @change="changeLanguage">
81
+ <option value="">{{ $t("more.magazine.all_languages") }}</option>
82
+ <option
83
+ v-for="lang in institutionalStore.language.data"
84
+ :key="lang.id"
85
+ :value="lang.slug"
86
+ >
87
+ {{ lang.name }}
88
+ </option>
89
+ </select>
90
+ </div>
91
+
92
+ <div v-if="magazine.status === 'pending' && (!magazine.data || magazine.data.length === 0)" class="loading">
93
+ <p>{{ $t("components.loading") }}</p>
94
+ </div>
95
+
96
+ <div v-else-if="magazine.data && magazine.data.length > 0">
97
+ <div class="magazine-grid">
98
+ <div
99
+ v-for="item in magazine.data"
100
+ :key="item.id"
101
+ class="magazine-card"
102
+ >
103
+ <NuxtLink :to="`/${locale}/magazine/${item.slug}`" class="magazine-card__link">
104
+ <div class="magazine-card__cover">
105
+ <img
106
+ :src="item.cover_image_url || '/imgs/default.jpg'"
107
+ :alt="item.title"
108
+ />
109
+ <span v-if="item.is_premium" class="premium-badge">Premium</span>
110
+ </div>
111
+ <div class="magazine-card__info">
112
+ <h3>{{ item.title }}</h3>
113
+ <span class="edition" v-if="item.edition_number">
114
+ {{ $t("more.magazine.edition") }} #{{ item.edition_number }}
115
+ </span>
116
+ <span class="date">{{ item.release_date || item.created_at }}</span>
117
+ </div>
118
+ </NuxtLink>
119
+ </div>
120
+ </div>
121
+
122
+ <div
123
+ v-if="magazine.data.meta && magazine.data.length < magazine.data.meta.total"
124
+ class="load-more"
125
+ >
126
+ <button @click="loadMore" :disabled="magazine.status === 'pending'">
127
+ {{ $t("components.load_more") }}
128
+ </button>
129
+ </div>
130
+ </div>
131
+
132
+ <div v-else class="no-data">
133
+ {{ $t("more.magazine.no_data") }}
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ </section>
139
+ </div>
140
+ </template>
141
+
142
+ <style lang="scss" scoped>
143
+ .magazine {
144
+ color: var(--inactive);
145
+ font-size: 0.875rem;
146
+
147
+ .header {
148
+ position: relative;
149
+ height: 200px;
150
+ display: flex;
151
+ justify-content: center;
152
+ align-items: center;
153
+ margin-bottom: 2rem;
154
+
155
+ & > div {
156
+ width: 480px;
157
+ text-align: center;
158
+ }
159
+
160
+ &:before {
161
+ content: " ";
162
+ display: block;
163
+ position: absolute;
164
+ background: url("@/assets/images/bg-magazine.png") no-repeat center center / cover;
165
+ width: 100%;
166
+ height: 100%;
167
+ top: 50%;
168
+ transform: translateY(-50%);
169
+ z-index: -1;
170
+ }
171
+ }
172
+
173
+ .filters {
174
+ margin-bottom: 24px;
175
+
176
+ select {
177
+ height: 40px;
178
+ padding: 0 12px;
179
+ border: 1px solid var(--search-bar-border-color);
180
+ background: var(--search-bar-bg);
181
+ color: var(--search-bar-fg);
182
+ font-size: 14px;
183
+ min-width: 200px;
184
+ }
185
+ }
186
+
187
+ .magazine-grid {
188
+ display: grid;
189
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
190
+ gap: 24px;
191
+ }
192
+
193
+ .magazine-card {
194
+ &__link {
195
+ text-decoration: none;
196
+ color: inherit;
197
+ }
198
+
199
+ &__cover {
200
+ position: relative;
201
+ margin-bottom: 8px;
202
+
203
+ img {
204
+ width: 100%;
205
+ aspect-ratio: 3/4;
206
+ object-fit: cover;
207
+ }
208
+
209
+ .premium-badge {
210
+ position: absolute;
211
+ top: 8px;
212
+ right: 8px;
213
+ padding: 2px 8px;
214
+ background: var(--chip-text);
215
+ color: var(--chip-background-2);
216
+ font-size: 11px;
217
+ font-weight: 600;
218
+ }
219
+ }
220
+
221
+ &__info {
222
+ h3 {
223
+ font-size: 14px;
224
+ font-weight: 600;
225
+ color: var(--card-cover-title);
226
+ margin-bottom: 4px;
227
+ }
228
+
229
+ .edition {
230
+ display: block;
231
+ font-size: 12px;
232
+ color: var(--chip-text);
233
+ margin-bottom: 2px;
234
+ }
235
+
236
+ .date {
237
+ font-size: 12px;
238
+ color: var(--secondary-info-fg);
239
+ }
240
+ }
241
+ }
242
+
243
+ .load-more {
244
+ text-align: center;
245
+ margin-top: 24px;
246
+
247
+ button {
248
+ padding: 8px 24px;
249
+ border: 1px solid var(--chip-text);
250
+ background: transparent;
251
+ color: var(--chip-text);
252
+ cursor: pointer;
253
+ font-size: 14px;
254
+
255
+ &:disabled {
256
+ opacity: 0.5;
257
+ }
258
+ }
259
+ }
260
+
261
+ .no-data {
262
+ text-align: center;
263
+ padding: 32px;
264
+ color: var(--secondary-info-fg);
265
+ }
266
+ }
267
+ </style>