Skip to content

Commit 0e186e8

Browse files
committed
UI improvements (1)
1 parent 4606da9 commit 0e186e8

10 files changed

Lines changed: 155 additions & 48 deletions

File tree

5.55 KB
Loading

Synergism.css

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,6 +4236,21 @@ header #obtainiumDisplay { color: pink; }
42364236
}
42374237
}
42384238

4239+
.transcendedBallerGradient {
4240+
--gradient-start: orchid;
4241+
--gradient-end: rgb(167, 65, 167);
4242+
}
4243+
4244+
.reincarnatedBallerGradient {
4245+
--gradient-start: green;
4246+
--gradient-end: greenyellow;
4247+
}
4248+
4249+
.ascendedBallerGradient {
4250+
--gradient-start: orange;
4251+
--gradient-end: yellow;
4252+
}
4253+
42394254
.singularityGradient {
42404255
--gradient-start: gold;
42414256
--gradient-end: lightgoldenrodyellow;
@@ -4928,14 +4943,19 @@ form input:hover {
49284943
align-items: center;
49294944
}
49304945

4931-
.pseudoSubscriptionContainer > form {
4946+
#manage-subscription-holder {
4947+
display: flex;
4948+
flex: row;
4949+
}
4950+
4951+
#manage-subscription-holder > form {
49324952
display: flex;
49334953
flex-direction: column;
49344954
justify-content: center;
4935-
margin-top: 10px;
4955+
margin: 5px;
49364956
}
49374957

4938-
.pseudoSubscriptionContainer > form > input[type="submit"] {
4958+
#manage-subscription-holder > form > input[type="submit"] {
49394959
border: 2px solid gold;
49404960
width: 200px;
49414961
height: 40px;
@@ -4956,7 +4976,7 @@ form input:hover {
49564976
}
49574977

49584978
.subscriptionContainer {
4959-
margin: 10px 10px 0 0;
4979+
margin: 0;
49604980
border: 1px solid lightgoldenrodyellow;
49614981
border: 2px solid gold;
49624982
text-align: center;

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4491,6 +4491,7 @@ <h4 class="event-title" i18n="pseudoCoins.consumables.eventTitle"></h4>
44914491
<div id="productContainer" class="pseudoUpgradeContainer">
44924492
</div>
44934493
<div id="subscriptionsContainer" class="pseudoSubscriptionContainer">
4494+
<div id="manage-subscription-holder"></div>
44944495
<div id="sub-section-holder"></div>
44954496
</div>
44964497
<div id="upgradesContainer">

src/Login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ interface BonusTypes {
203203
quarks: number
204204
}
205205

206-
type SubscriptionMetadata = {
206+
export type SubscriptionMetadata = {
207207
provider: 'paypal' | 'stripe' | 'patreon'
208208
tier: number
209209
} | null

src/Synergism.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5518,6 +5518,9 @@ window.addEventListener('load', async () => {
55185518
url: './mockServiceWorker.js'
55195519
}
55205520
})
5521+
const response = await fetch('https://synergism.cc/api/v1/users/me')
5522+
const data = await response.json()
5523+
console.log(data)
55215524
}
55225525

55235526
const symbolsEnabled = localStorage.getItem('statSymbols')

src/Utility.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export const findInsertionIndex = (target: number, array: number[]): number => {
304304
/**
305305
* @license {MIT}
306306
* https://github.com/nodejs/undici/blob/6301265a20868d077faae6d51f5f6cf57ac2ebfe/lib/web/infra/index.js#L121
307-
*
307+
*
308308
* I'm stealing my own code, fuck off
309309
*/
310310
export function isomorphicDecode (input: Uint8Array) {

src/mock/browser.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { cloudSaveHandlers } from './handlers/CloudSaveHandlers'
44
import { messageHandlers } from './handlers/MessageHandlers'
55
import { paymentHandlers } from './handlers/PaymentHandlers'
66
import { consumeHandlers } from './websocket'
7+
import { paypalSubscriptionActive } from './handlers/SubscriptionHandlers'
78

89
const GETHandlers = [
910
http.get('https://synergism.cc/api/v1/quark-bonus', () => {
@@ -1170,8 +1171,8 @@ const PUTHandlers = [
11701171
export const worker = setupWorker(
11711172
http.get('https://synergism.cc/api/v1/users/me', () => {
11721173
return HttpResponse.json({
1173-
personalBonus: 0,
1174-
globalBonus: 100,
1174+
personalBonus: 5,
1175+
globalBonus: 50,
11751176
member: {
11761177
user: {
11771178
id: '267774648622645249',
@@ -1207,9 +1208,9 @@ export const worker = setupWorker(
12071208
},
12081209
accountType: 'discord',
12091210
bonus: {
1210-
quarkBonus: 0
1211+
quarkBonus: 5
12111212
},
1212-
subscription: null
1213+
subscription: paypalSubscriptionActive
12131214
})
12141215
}),
12151216
...GETHandlers,

src/mock/handlers/PaymentHandlers.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,63 @@ export const paymentHandlers: HttpHandler[] = [
55
return HttpResponse.json([
66
{
77
'id': 'omega-monthly-sub',
8-
'name': 'Tier 4 Subscription - The Omega Baller',
9-
'description': '+2,000 PseudoCoins per month and +14% Quarks as a personal bonus!',
8+
'name': 'The Omega Baller',
9+
'description': 'The final subscription, giving the best perks available!',
1010
'price': 2000,
1111
'coins': 2000,
1212
'tier': 4,
1313
'subscription': true,
1414
'quarkBonus': 2,
1515
'features': [
16-
'+2,000 PseudoCoins / month',
16+
'+2,000 PseudoCoins / month ($20 Value!)',
1717
'+14% Personal Quark Bonus',
1818
'+2% to the Global Quark Bonus',
1919
'+9 Save Slots (10 total)'
2020
]
2121
},
2222
{
2323
'id': 'ascended-monthly-sub',
24-
'name': 'Tier 3 Subscription - The Ascended Baller',
25-
'description': '+1,000 PseudoCoins per month and +9% Quarks as a personal bonus!',
24+
'name': 'The Ascended Baller',
25+
'description': 'Enjoy even more Quarks and Save Slots, on top of your monthly PseudoCoins!',
2626
'price': 1000,
2727
'coins': 1000,
2828
'tier': 3,
2929
'subscription': true,
3030
'quarkBonus': 1,
3131
'features': [
32-
'+1,000 PseudoCoins / month',
32+
'+1,000 PseudoCoins / month ($10 Value!)',
3333
'+9% Personal Quark Bonus',
3434
'+1% to the Global Quark Bonus',
3535
'+6 Save Slots (7 total)'
3636
]
3737
},
3838
{
3939
'id': 'reincarnated-monthly-sub',
40-
'name': 'Tier 2 Subscription - The Reincarnated Baller',
41-
'description': '+600 PseudoCoins / month and +5% Quarks as a personal bonus!',
40+
'name': 'The Reincarnated Baller',
41+
'description': 'Higher tier Subscriptions have stronger additional perks!',
4242
'price': 600,
4343
'coins': 600,
4444
'tier': 2,
4545
'subscription': true,
4646
'quarkBonus': 0.6,
4747
'features': [
48-
'+600 PseudoCoins / month',
48+
'+600 PseudoCoins / month ($6 Value!)',
4949
'+5% Personal Quark Bonus',
5050
'+0.6% to the Global Quark Bonus',
5151
'+3 Save Slots (4 total)'
5252
]
5353
},
5454
{
5555
'id': 'transcended-monthly-sub',
56-
'name': 'Tier 1 Subscription - The Transcended Baller',
57-
'description': 'Gain +300 PseudoCoins / month, and +2% Quarks as a personal bonus.',
56+
'name': 'The Transcended Baller',
57+
'description': 'Subscriptions give PseudoCoins equal to their dollar value, plus additional perks!',
5858
'price': 300,
5959
'coins': 300,
6060
'tier': 1,
6161
'subscription': true,
6262
'quarkBonus': 0.3,
6363
'features': [
64-
'+300 PseudoCoins / month',
64+
'+300 PseudoCoins / month ($3 Value!)',
6565
'+2% Personal Quark Bonus',
6666
'+0.3% to the Global Quark Bonus',
6767
'+1 Save Slot (2 total)'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
interface Subscription {
2+
provider: 'stripe' | 'patreon' | 'paypal'
3+
tier: 1 | 2 | 3 | 4
4+
}
5+
6+
export const paypalSubscriptionActive: Subscription = {
7+
provider: 'paypal',
8+
tier: 3
9+
}
10+
11+
export const patreonSubscriptionActive: Subscription = {
12+
provider: 'patreon',
13+
tier: 2
14+
}
15+
16+
export const stripeSubscriptionActive: Subscription = {
17+
provider: 'stripe',
18+
tier: 3
19+
}
20+
21+
// Add handlers here

0 commit comments

Comments
 (0)