@mundogamernetwork/shared-ui 1.1.66 → 1.1.68

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.
@@ -0,0 +1,190 @@
1
+ <script lang="ts" setup>
2
+ import { ref, onMounted, inject } from "vue"
3
+ import { fetchCampaigns } from "../../services/campaignService"
4
+
5
+ const props = defineProps<{
6
+ excludeId?: number | null
7
+ mgPlatform?: string
8
+ }>()
9
+
10
+ const mgPlatform = props.mgPlatform || (inject<string>("mgPlatform", "MGTV"))
11
+
12
+ const items = ref<any[]>([])
13
+ const loading = ref(true)
14
+
15
+ onMounted(async () => {
16
+ try {
17
+ const res = await fetchCampaigns(
18
+ {
19
+ filter: { is_open: 1 },
20
+ per_page: 10,
21
+ sort: "id",
22
+ order: "desc",
23
+ },
24
+ mgPlatform,
25
+ )
26
+ const data: any[] = res?.data?.data || res?.data || []
27
+ items.value = props.excludeId
28
+ ? data.filter((c: any) => c.id !== props.excludeId)
29
+ : data
30
+ } catch {
31
+ // silently ignore — carousel is non-critical
32
+ } finally {
33
+ loading.value = false
34
+ }
35
+ })
36
+ </script>
37
+
38
+ <template>
39
+ <div v-if="loading || items.length > 0" class="kc-carousel">
40
+ <div class="kc-carousel__header">
41
+ <span class="kc-carousel__title">{{ $t("keys.campaigns.other_campaigns") }}</span>
42
+ </div>
43
+
44
+ <div v-if="loading" class="kc-carousel__track">
45
+ <div v-for="i in 4" :key="i" class="kc-carousel__skeleton" />
46
+ </div>
47
+
48
+ <div v-else class="kc-carousel__track">
49
+ <NuxtLink
50
+ v-for="item in items"
51
+ :key="item.id"
52
+ :to="`/key-campaigns/${item.slug}`"
53
+ class="kc-carousel__card"
54
+ >
55
+ <div class="kc-carousel__thumb">
56
+ <img
57
+ v-if="item.cover_src || item.cover"
58
+ :src="item.cover_src || item.cover"
59
+ :alt="item.name"
60
+ />
61
+ <div v-else class="kc-carousel__thumb-placeholder">
62
+ <i class="mg-icon mg-icon-game-key" />
63
+ </div>
64
+ <span v-if="!item.is_open" class="kc-carousel__closed">{{ $t("keys.campaigns.closed") }}</span>
65
+ </div>
66
+ <div class="kc-carousel__info">
67
+ <div class="kc-carousel__name">{{ item.name }}</div>
68
+ <div class="kc-carousel__avail">
69
+ {{ item.available_count ?? 0 }}/{{ item.total_count ?? item.quantity ?? "?" }}
70
+ {{ $t("keys.campaigns.available") }}
71
+ </div>
72
+ </div>
73
+ </NuxtLink>
74
+ </div>
75
+ </div>
76
+ </template>
77
+
78
+ <style scoped lang="scss">
79
+ .kc-carousel {
80
+ margin-top: 40px;
81
+ padding-top: 24px;
82
+ border-top: 1px solid var(--button-secondary-default-bg);
83
+
84
+ &__header {
85
+ margin-bottom: 16px;
86
+ }
87
+
88
+ &__title {
89
+ font-size: 16px;
90
+ font-weight: 700;
91
+ color: var(--card-article-title);
92
+ }
93
+
94
+ &__track {
95
+ display: flex;
96
+ gap: 12px;
97
+ overflow-x: auto;
98
+ padding-bottom: 8px;
99
+ scrollbar-width: thin;
100
+ scrollbar-color: var(--button-secondary-default-bg) transparent;
101
+
102
+ &::-webkit-scrollbar { height: 4px; }
103
+ &::-webkit-scrollbar-track { background: transparent; }
104
+ &::-webkit-scrollbar-thumb { background: var(--button-secondary-default-bg); }
105
+ }
106
+
107
+ &__skeleton {
108
+ flex: 0 0 180px;
109
+ height: 140px;
110
+ background: var(--bg-app-badge);
111
+ animation: pulse 1.4s ease-in-out infinite;
112
+ }
113
+
114
+ &__card {
115
+ flex: 0 0 180px;
116
+ display: flex;
117
+ flex-direction: column;
118
+ text-decoration: none;
119
+ color: inherit;
120
+ border: 1px solid var(--button-secondary-default-bg);
121
+ transition: border-color 0.15s;
122
+
123
+ &:hover { border-color: var(--key-accent, var(--primary, #D297FF)); }
124
+ }
125
+
126
+ &__thumb {
127
+ position: relative;
128
+ width: 100%;
129
+ height: 101px;
130
+ overflow: hidden;
131
+ background: var(--bg-app-badge);
132
+
133
+ img {
134
+ width: 100%;
135
+ height: 100%;
136
+ object-fit: cover;
137
+ }
138
+ }
139
+
140
+ &__thumb-placeholder {
141
+ width: 100%;
142
+ height: 100%;
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ color: var(--secondary-info-fg);
147
+ font-size: 24px;
148
+ }
149
+
150
+ &__closed {
151
+ position: absolute;
152
+ inset: 0;
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: center;
156
+ background: rgba(0, 0, 0, 0.55);
157
+ font-size: 11px;
158
+ font-weight: 700;
159
+ color: #fff;
160
+ letter-spacing: 0.5px;
161
+ text-transform: uppercase;
162
+ }
163
+
164
+ &__info {
165
+ padding: 8px 10px;
166
+ display: flex;
167
+ flex-direction: column;
168
+ gap: 4px;
169
+ }
170
+
171
+ &__name {
172
+ font-size: 12px;
173
+ font-weight: 600;
174
+ color: var(--card-article-title);
175
+ overflow: hidden;
176
+ text-overflow: ellipsis;
177
+ white-space: nowrap;
178
+ }
179
+
180
+ &__avail {
181
+ font-size: 11px;
182
+ color: var(--secondary-info-fg);
183
+ }
184
+ }
185
+
186
+ @keyframes pulse {
187
+ 0%, 100% { opacity: 1; }
188
+ 50% { opacity: 0.4; }
189
+ }
190
+ </style>
@@ -0,0 +1,181 @@
1
+ {
2
+ "keys": {
3
+ "notif_prompt_title": "Benachrichtigungen für neue Key-Kampagnen erhalten?",
4
+ "notif_prompt_desc": "Wir benachrichtigen Sie per E-Mail und Push, wenn eine neue Key-Kampagne startet.",
5
+ "notif_prompt_enable": "Aktivieren",
6
+ "notif_prompt_dismiss": "Jetzt nicht",
7
+ "browser": {
8
+ "tab_available": "Verfügbar",
9
+ "tab_mine": "Meine Anfragen",
10
+ "select_platform": "Plattform auswählen",
11
+ "description_label": "Warum verdienen Sie diesen Key?",
12
+ "description_placeholder": "z.B. Ich betreibe einen YouTube-Kanal mit 5.000 Abonnenten, der sich auf Spielerezensionen spezialisiert. Ich möchte eine vollständige Rezension für mein Publikum veröffentlichen.",
13
+ "request_btn": "Key anfordern",
14
+ "already_requested": "Anfrage gesendet",
15
+ "reveal_btn": "Key anzeigen",
16
+ "revealed": "Key angezeigt",
17
+ "pending_approval": "Wartet auf Genehmigung",
18
+ "login_required": "Anmelden, um diesen Key anzufordern",
19
+ "login_btn": "Anmelden",
20
+ "no_keys": "Derzeit keine Keys verfügbar",
21
+ "no_pools": "Keine aktiven Kampagnen",
22
+ "no_requests": "Sie haben noch keine Keys angefordert"
23
+ },
24
+ "campaigns": {
25
+ "title": "Key Campaigns",
26
+ "my_requests": "My Requests",
27
+ "all": "All",
28
+ "details": "Details",
29
+ "see_campaign": "See campaign",
30
+ "see_content": "See content",
31
+ "redeem": "Redeem",
32
+ "load_more": "Load more",
33
+ "no_results": "No campaigns found",
34
+ "days": "days",
35
+ "creators": "creators",
36
+ "upgrade_plan": "Upgrade plan",
37
+ "exclusive": "Exclusive",
38
+ "exclusive_upgrade": "Upgrade to access",
39
+ "exclusive_upgrade_cta": "Upgrade your plan to request this key",
40
+ "exclusive_lock_title": "Exclusive campaign",
41
+ "early_access": "Early access",
42
+ "early_access_lock_title": "Early access",
43
+ "early_access_opens_in": "Opens in",
44
+ "unavailable": "Unavailable",
45
+ "upcoming": "Coming soon",
46
+ "back": "Back",
47
+ "search_placeholder": "Search campaigns...",
48
+ "seo": {
49
+ "title_generic": "Key Campaigns"
50
+ },
51
+ "restriction": {
52
+ "exclusive_official": "Official streamers only",
53
+ "level_official": "Official",
54
+ "level_affiliate": "Affiliate"
55
+ },
56
+ "status_key": {
57
+ "see_key": "View key",
58
+ "of": "of",
59
+ "title_0": "Campaign",
60
+ "title_span_0": "ended",
61
+ "obs_0": "The redemption period for the key has expired.",
62
+ "title_1": "Now you need to",
63
+ "title_span_1": "redeem the key",
64
+ "obs_1": "Check the campaign requirements before requesting your key(s)",
65
+ "title_2": "Now just",
66
+ "title_span_2": "wait",
67
+ "obs_2": "Your request is being reviewed. After approval, you will receive a confirmation email.",
68
+ "title_approved": "Your request has been ",
69
+ "title_span_approved": "approved!",
70
+ "obs_approved": "Your key is ready. Click to reveal it.",
71
+ "reveal_key": "Reveal key",
72
+ "view_code": "View code",
73
+ "title_3": "Now you just need to",
74
+ "title_span_3": "send the material",
75
+ "title_3_2": "developed",
76
+ "obs_3": "You have 14 days to send the developed material",
77
+ "complete": "Completed",
78
+ "title_span_4": "Nice!",
79
+ "title_4": "If you have more materials, feel free to add them",
80
+ "obs_4": "If you want to add more, you still have 6 days to send it.",
81
+ "title_5": "Your request was",
82
+ "title_span_5": "rejected",
83
+ "obs_5": "Unfortunately, your key request was not approved. Please check the campaign requirements and try again in the future.",
84
+ "title_6": "Request",
85
+ "title_span_6": "cancelled",
86
+ "obs_6": "You canceled this request. If you want to try again, just start a new request according to the campaign rules.",
87
+ "title_7": "Request",
88
+ "title_span_7": "expired",
89
+ "obs_7": "The deadline for submitting the material or using the key has expired. Keep an eye on deadlines in future campaigns!",
90
+ "title_8": "Key",
91
+ "title_span_8": "revoked",
92
+ "obs_8": "Your key has been revoked by the administration. If you have any questions, contact support or review the campaign rules.",
93
+ "title_exhausted": "Keys",
94
+ "title_span_exhausted": "exhausted",
95
+ "obs_exhausted": "All keys for this campaign have already been distributed.",
96
+ "title_locked": "This campaign is",
97
+ "title_span_locked": "exclusive",
98
+ "obs_locked_exclusive": "Available only to higher tiers. Upgrade to take part.",
99
+ "obs_locked_early": "Your plan doesn't have access to this campaign yet. Upgrade to unlock.",
100
+ "obs_locked_tier": "Available only to {tier} plan subscribers or higher. Upgrade to take part.",
101
+ "title_level": "This campaign is for",
102
+ "title_span_level_official": "official streamers",
103
+ "title_span_level_affiliate": "affiliates",
104
+ "obs_level_official": "Available only to official MG streamers.",
105
+ "obs_level_affiliate": "Available only to affiliate creators (casting). Join the casting to take part."
106
+ },
107
+ "campaign": {
108
+ "available": "available",
109
+ "keys": "keys",
110
+ "start": "Start",
111
+ "end": "End",
112
+ "launch": "Launch",
113
+ "status": "Status",
114
+ "status_active": "Active",
115
+ "status_closed": "Closed",
116
+ "status_ending": "Ending soon",
117
+ "status_exhausted": "Keys exhausted",
118
+ "days": "days",
119
+ "hours": "hours",
120
+ "minutes": "min",
121
+ "seconds": "sec",
122
+ "days_hours": "days and hours",
123
+ "redeem": "Redeem key",
124
+ "actions": "Complementary actions",
125
+ "no_actions": "No actions configured",
126
+ "requirements": "Requirements",
127
+ "requirement": {
128
+ "all": "Open to all",
129
+ "official": "Official streamers",
130
+ "affiliate": "Affiliate or above"
131
+ },
132
+ "rp_label": "Redeemed by",
133
+ "who_redeem": "Who redeemed",
134
+ "created_by": "Published by",
135
+ "no_data": "Campaign not found"
136
+ },
137
+ "other_campaigns": "Andere Kampagnen",
138
+ "available": "verfügbar",
139
+ "closed": "Beendet",
140
+ "platform": "Plattform",
141
+ "region": "Region",
142
+ "description_optional": "Beschreibung (optional)",
143
+ "description_placeholder": "Erzähl uns etwas über deinen Kanal...",
144
+ "sending": "Wird gesendet...",
145
+ "request_sent": "Anfrage gesendet! Weiterleitung...",
146
+ "error_loading": "Kampagnendaten konnten nicht geladen werden.",
147
+ "error_request": "Anfrage konnte nicht gesendet werden. Bitte erneut versuchen.",
148
+ "error_reveal": "Schlüssel konnte nicht enthüllt werden.",
149
+ "redeem_title": "Schlüssel anfordern",
150
+ "reveal_hint": "Klicke unten, um deinen Schlüsselcode zu enthüllen.",
151
+ "your_key": "Dein Schlüssel",
152
+ "copy": "Kopieren",
153
+ "copied": "Kopiert!",
154
+ "redeem_on_platform": "Löse diesen Schlüssel auf der entsprechenden Plattform ein.",
155
+ "revealing": "Enthülle...",
156
+ "status": "Status"
157
+ },
158
+ "materials": {
159
+ "title": "Submit material",
160
+ "subtitle": "Send the link to your content about this game",
161
+ "back": "Back",
162
+ "link": "Content link",
163
+ "description": "Description (optional)",
164
+ "date": "Publication date",
165
+ "type": "Content type",
166
+ "type_stream": "Live stream",
167
+ "type_video": "Video",
168
+ "type_article": "Article / Review",
169
+ "type_web": "Website / Blog",
170
+ "type_print": "Screenshot / Print",
171
+ "required_fields": "Fill in all required fields",
172
+ "url_error": "Invalid URL",
173
+ "submit_error": "Error submitting. Try again.",
174
+ "sending": "Sending...",
175
+ "finish": "Submit",
176
+ "submitted_title": "Material submitted!",
177
+ "success_message": "Your material was sent for review. Thank you!",
178
+ "success_close": "Close"
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,181 @@
1
+ {
2
+ "keys": {
3
+ "notif_prompt_title": "Get alerts for new key campaigns?",
4
+ "notif_prompt_desc": "We'll notify you by email and push whenever a new key campaign opens.",
5
+ "notif_prompt_enable": "Enable",
6
+ "notif_prompt_dismiss": "Not now",
7
+ "browser": {
8
+ "tab_available": "Available",
9
+ "tab_mine": "My requests",
10
+ "select_platform": "Select platform",
11
+ "description_label": "Why do you deserve this key?",
12
+ "description_placeholder": "E.g. I run a YouTube channel with 5k subscribers focused on game reviews. I'd like to publish a full review for my audience.",
13
+ "request_btn": "Request key",
14
+ "already_requested": "Request submitted",
15
+ "reveal_btn": "Reveal key",
16
+ "revealed": "Key revealed",
17
+ "pending_approval": "Awaiting approval",
18
+ "login_required": "Log in to request this key",
19
+ "login_btn": "Sign in",
20
+ "no_keys": "No keys available right now",
21
+ "no_pools": "No active campaigns",
22
+ "no_requests": "You haven't requested any keys yet"
23
+ },
24
+ "campaigns": {
25
+ "title": "Key Campaigns",
26
+ "my_requests": "My Requests",
27
+ "all": "All",
28
+ "details": "Details",
29
+ "see_campaign": "See campaign",
30
+ "see_content": "See content",
31
+ "redeem": "Redeem",
32
+ "load_more": "Load more",
33
+ "no_results": "No campaigns found",
34
+ "days": "days",
35
+ "creators": "creators",
36
+ "upgrade_plan": "Upgrade plan",
37
+ "exclusive": "Exclusive",
38
+ "exclusive_upgrade": "Upgrade to access",
39
+ "exclusive_upgrade_cta": "Upgrade your plan to request this key",
40
+ "exclusive_lock_title": "Exclusive campaign",
41
+ "early_access": "Early access",
42
+ "early_access_lock_title": "Early access",
43
+ "early_access_opens_in": "Opens in",
44
+ "unavailable": "Unavailable",
45
+ "upcoming": "Coming soon",
46
+ "back": "Back",
47
+ "search_placeholder": "Search campaigns...",
48
+ "seo": {
49
+ "title_generic": "Key Campaigns"
50
+ },
51
+ "restriction": {
52
+ "exclusive_official": "Official streamers only",
53
+ "level_official": "Official",
54
+ "level_affiliate": "Affiliate"
55
+ },
56
+ "status_key": {
57
+ "see_key": "View key",
58
+ "of": "of",
59
+ "title_0": "Campaign",
60
+ "title_span_0": "ended",
61
+ "obs_0": "The redemption period for the key has expired.",
62
+ "title_1": "Now you need to",
63
+ "title_span_1": "redeem the key",
64
+ "obs_1": "Check the campaign requirements before requesting your key(s)",
65
+ "title_2": "Now just",
66
+ "title_span_2": "wait",
67
+ "obs_2": "Your request is being reviewed. After approval, you will receive a confirmation email.",
68
+ "title_approved": "Your request has been ",
69
+ "title_span_approved": "approved!",
70
+ "obs_approved": "Your key is ready. Click to reveal it.",
71
+ "reveal_key": "Reveal key",
72
+ "view_code": "View code",
73
+ "title_3": "Now you just need to",
74
+ "title_span_3": "send the material",
75
+ "title_3_2": "developed",
76
+ "obs_3": "You have 14 days to send the developed material",
77
+ "complete": "Completed",
78
+ "title_span_4": "Nice!",
79
+ "title_4": "If you have more materials, feel free to add them",
80
+ "obs_4": "If you want to add more, you still have 6 days to send it.",
81
+ "title_5": "Your request was",
82
+ "title_span_5": "rejected",
83
+ "obs_5": "Unfortunately, your key request was not approved. Please check the campaign requirements and try again in the future.",
84
+ "title_6": "Request",
85
+ "title_span_6": "cancelled",
86
+ "obs_6": "You canceled this request. If you want to try again, just start a new request according to the campaign rules.",
87
+ "title_7": "Request",
88
+ "title_span_7": "expired",
89
+ "obs_7": "The deadline for submitting the material or using the key has expired. Keep an eye on deadlines in future campaigns!",
90
+ "title_8": "Key",
91
+ "title_span_8": "revoked",
92
+ "obs_8": "Your key has been revoked by the administration. If you have any questions, contact support or review the campaign rules.",
93
+ "title_exhausted": "Keys",
94
+ "title_span_exhausted": "exhausted",
95
+ "obs_exhausted": "All keys for this campaign have already been distributed.",
96
+ "title_locked": "This campaign is",
97
+ "title_span_locked": "exclusive",
98
+ "obs_locked_exclusive": "Available only to higher tiers. Upgrade to take part.",
99
+ "obs_locked_early": "Your plan doesn't have access to this campaign yet. Upgrade to unlock.",
100
+ "obs_locked_tier": "Available only to {tier} plan subscribers or higher. Upgrade to take part.",
101
+ "title_level": "This campaign is for",
102
+ "title_span_level_official": "official streamers",
103
+ "title_span_level_affiliate": "affiliates",
104
+ "obs_level_official": "Available only to official MG streamers.",
105
+ "obs_level_affiliate": "Available only to affiliate creators (casting). Join the casting to take part."
106
+ },
107
+ "campaign": {
108
+ "available": "available",
109
+ "keys": "keys",
110
+ "start": "Start",
111
+ "end": "End",
112
+ "launch": "Launch",
113
+ "status": "Status",
114
+ "status_active": "Active",
115
+ "status_closed": "Closed",
116
+ "status_ending": "Ending soon",
117
+ "status_exhausted": "Keys exhausted",
118
+ "days": "days",
119
+ "hours": "hours",
120
+ "minutes": "min",
121
+ "seconds": "sec",
122
+ "days_hours": "days and hours",
123
+ "redeem": "Redeem key",
124
+ "actions": "Complementary actions",
125
+ "no_actions": "No actions configured",
126
+ "requirements": "Requirements",
127
+ "requirement": {
128
+ "all": "Open to all",
129
+ "official": "Official streamers",
130
+ "affiliate": "Affiliate or above"
131
+ },
132
+ "rp_label": "Redeemed by",
133
+ "who_redeem": "Who redeemed",
134
+ "created_by": "Published by",
135
+ "no_data": "Campaign not found"
136
+ },
137
+ "other_campaigns": "Other campaigns",
138
+ "available": "available",
139
+ "closed": "Closed",
140
+ "platform": "Platform",
141
+ "region": "Region",
142
+ "description_optional": "Description (optional)",
143
+ "description_placeholder": "Tell us a bit about your channel or content plans...",
144
+ "sending": "Sending...",
145
+ "request_sent": "Request sent! Redirecting...",
146
+ "error_loading": "Failed to load campaign data.",
147
+ "error_request": "Could not submit request. Please try again.",
148
+ "error_reveal": "Could not reveal key. Please try again.",
149
+ "redeem_title": "Request a Key",
150
+ "reveal_hint": "Click the button below to reveal your key code.",
151
+ "your_key": "Your Key",
152
+ "copy": "Copy",
153
+ "copied": "Copied!",
154
+ "redeem_on_platform": "Redeem this key on the platform where you received it.",
155
+ "revealing": "Revealing...",
156
+ "status": "Status"
157
+ },
158
+ "materials": {
159
+ "title": "Submit material",
160
+ "subtitle": "Send the link to your content about this game",
161
+ "back": "Back",
162
+ "link": "Content link",
163
+ "description": "Description (optional)",
164
+ "date": "Publication date",
165
+ "type": "Content type",
166
+ "type_stream": "Live stream",
167
+ "type_video": "Video",
168
+ "type_article": "Article / Review",
169
+ "type_web": "Website / Blog",
170
+ "type_print": "Screenshot / Print",
171
+ "required_fields": "Fill in all required fields",
172
+ "url_error": "Invalid URL",
173
+ "submit_error": "Error submitting. Try again.",
174
+ "sending": "Sending...",
175
+ "finish": "Submit",
176
+ "submitted_title": "Material submitted!",
177
+ "success_message": "Your material was sent for review. Thank you!",
178
+ "success_close": "Close"
179
+ }
180
+ }
181
+ }