Skip to content

Commit cf5c969

Browse files
authored
Merge pull request #18 from myrunes/dev
main 1.9
2 parents 3586c99 + 1321514 commit cf5c969

15 files changed

+2321
-1947
lines changed

Diff for: package-lock.json

+1,988-1,803
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"request": "^2.88.0",
1515
"vue": "^2.6.10",
1616
"vue-async-computed": "^3.7.0",
17+
"vue-recaptcha": "^1.3.0",
1718
"vue-resource": "^1.5.1",
1819
"vue-router": "^3.0.6",
1920
"vue-tooltipster": "^1.2.0",

Diff for: public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<meta name="twitter:title" property="og:title" itemprop="name" content="MYRUNES" />
1616
<meta name="twitter:description" property="og:description" itemprop="description" content="MYRUNES | Save your League of Legends runes without wasting money." />
1717

18+
<script src="https://www.google.com/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit" async defer></script>
1819

19-
<!-- hide favicon until we have an icon for this -->
2020
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
2121
<title>MYRUNES</title>
2222
</head>

Diff for: src/App.vue

+14-7
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,25 @@
2020
target="_blank"
2121
class="main-link"
2222
>
23-
changed the password hashing
24-
algorithm to argon2.
23+
changed the password hashing algorithm to argon2.
2524
</a>
2625
<br />Please, go to your
27-
<router-link to="/settings" class="main-link">settings</router-link>&nbsp;and change your password
28-
in order to switch to the new algorithm.
26+
<router-link to="/settings" class="main-link">settings</router-link
27+
>&nbsp;and change your password in order to switch to the new algorithm.
2928
<br />
3029
</p>
3130
</InfoBubble>
3231

3332
<!-- INFO BETA WARN -->
34-
<InfoBubble ref="betawarn" color="red" @hides="onBetaWarnHides" style="z-index: 110;">
33+
<InfoBubble
34+
ref="betawarn"
35+
color="red"
36+
@hides="onBetaWarnHides"
37+
style="z-index: 110;"
38+
>
3539
<p class="text-center m-2">
3640
<b>ATTENTION:</b>&nbsp;This instance is running on a non-release canary
37-
build which is not fully tested yet!
38-
<br />Actions taken here may lead
41+
build which is not fully tested yet! <br />Actions taken here may lead
3942
to loss or corruption of data!
4043
</p>
4144
</InfoBubble>
@@ -93,6 +96,10 @@ export default {
9396
}
9497
});
9598
99+
Rest.getRecapctchaInfo().then((res) => {
100+
this.$store.commit('setReCaptchaSiteKey', res.body.sitekey);
101+
});
102+
96103
EventBus.$on('login', () => {
97104
this.checkLogin();
98105
});

Diff for: src/css/global.css

+7
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,11 @@ span.tb {
346346

347347
.w-100 {
348348
width: 100%;
349+
}
350+
351+
.viewlimit-width {
352+
width: 100%;
353+
max-width: 950px;
354+
margin-left: auto !important;
355+
margin-right: auto !important;
349356
}

Diff for: src/js/rest.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ function checkUsername(uname) {
2525
});
2626
}
2727

28-
function register(username, password, remember) {
28+
function register(username, password, remember, recaptcharesponse) {
2929
return _req({
3030
url: `${HOST}/users`,
3131
method: 'POST',
3232
json: {
3333
username,
3434
password,
3535
remember,
36+
recaptcharesponse,
3637
},
3738
});
3839
}
@@ -181,6 +182,13 @@ function getVersion() {
181182
});
182183
}
183184

185+
function getRecapctchaInfo() {
186+
return _req({
187+
url: `${HOST}/recaptchainfo`,
188+
method: 'GET',
189+
});
190+
}
191+
184192
function getAPIToken() {
185193
return _req({
186194
url: `${HOST}/apitoken`,
@@ -239,11 +247,11 @@ function resetPassword(mailaddress) {
239247
});
240248
}
241249

242-
function resetPasswordConfirm(token, new_password, page_names) {
250+
function resetPasswordConfirm(token, new_password, recaptcharesponse) {
243251
return _req({
244252
url: `${HOST}/users/me/passwordreset/confirm`,
245253
method: 'POST',
246-
json: { token, new_password, page_names },
254+
json: { token, new_password, recaptcharesponse },
247255
});
248256
}
249257

@@ -292,6 +300,7 @@ export default {
292300
updateShare,
293301
deleteShare,
294302
getVersion,
303+
getRecapctchaInfo,
295304
getAPIToken,
296305
generateAPIToken,
297306
deleteAPIToken,

Diff for: src/main.js

+4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ Vue.use(AsyncComputed);
1919
const store = new Vuex.Store({
2020
state: {
2121
loggedIn: null,
22+
reCaptchaSiteKey: null,
2223
},
2324

2425
mutations: {
2526
setLoggedIn(state, v) {
2627
state.loggedIn = v;
2728
},
29+
setReCaptchaSiteKey(state, v) {
30+
state.reCaptchaSiteKey = v;
31+
},
2832
},
2933
});
3034

Diff for: src/routes/About.vue

+25-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
<!-- @format -->
2+
13
<template>
2-
<div class="mw-container" :style="{ padding: $store.state.loggedIn === false ? '50px' : '0px' }">
4+
<div
5+
class="mw-container viewlimit-width"
6+
:style="{ padding: $store.state.loggedIn === false ? '50px' : '0px' }"
7+
>
38
<div class="logo mb-4"></div>
49
<p>Copyright © {{ new Date().getFullYear() }} MYRUNES</p>
510
<table class="mb-3">
@@ -19,47 +24,55 @@
1924
</tbody>
2025
</table>
2126
<p>
22-
This site is using image material and assets originally created by Riot Games, Inc. (Champion Avatars, Rune Assets).
23-
<br />We just want to clarify, that we (MYRUNES) are not the creators and credit holders of these assets.
27+
This site is using image material and assets originally created by Riot
28+
Games, Inc. (Champion Avatars, Rune Assets).
29+
<br />We just want to clarify, that we (MYRUNES) are not the creators and
30+
credit holders of these assets.
2431
</p>
2532

2633
<h2 class="mt-4 mb-3">Source Code</h2>
2734
<p>
28-
Yes, the whole project is completely open source. Below, there are some links
29-
to the official sources.
35+
Yes, the whole project is completely open source. Below, there are some
36+
links to the official sources.
3037
</p>
3138
<a
3239
class="icon-link github"
3340
href="https://github.com/myrunes"
3441
target="_blank"
35-
>GitHub Organization</a>
42+
>GitHub Organization</a
43+
>
3644
<a
3745
class="icon-link github"
3846
href="https://github.com/myrunes/backend"
3947
target="_blank"
40-
>Back End (REST API) Repository</a>
48+
>Back End (REST API) Repository</a
49+
>
4150
<a
4251
class="icon-link github"
4352
href="https://github.com/myrunes/frontend"
4453
target="_blank"
45-
>Front End Repository</a>
54+
>Front End Repository</a
55+
>
4656

4757
<h2 class="mt-4 mb-3">Information and Privacy</h2>
4858
<a
4959
class="icon-link info"
5060
href="https://github.com/myrunes/backend/blob/master/docs/imprint.txt"
5161
target="_blank"
52-
>Imprint</a>
62+
>Imprint</a
63+
>
5364
<a
5465
class="icon-link info"
5566
href="https://github.com/myrunes/backend/blob/master/docs/cookie-usage.md"
5667
target="_blank"
57-
>Cookie and Local Storage Usage</a>
68+
>Cookie and Local Storage Usage</a
69+
>
5870
<a
5971
class="icon-link info"
6072
href="https://github.com/myrunes/backend/blob/master/LICENSE"
6173
target="_blank"
62-
>Open Source Licence (MIT)</a>
74+
>Open Source Licence (MIT)</a
75+
>
6376
</div>
6477
</template>
6578

@@ -130,4 +143,4 @@ th {
130143
content: url('/assets/info.svg');
131144
transform: scale(1.15);
132145
}
133-
</style>
146+
</style>

Diff for: src/routes/Champ.vue

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- @format -->
22

33
<template>
4-
<div>
4+
<div class="viewlimit-width">
55
<div
66
v-if="isDragging"
77
class="hover-detector top"
@@ -23,7 +23,11 @@
2323
</InfoBubble>
2424

2525
<div v-if="champ" class="champ-header mb-3">
26-
<img :src="`${APIHOST}/assets/champions/avatars/${champ}.png`" width="42" height="42" />
26+
<img
27+
:src="`${APIHOST}/assets/champions/avatars/${champ}.png`"
28+
width="42"
29+
height="42"
30+
/>
2731
<h2>{{ champData.name.toUpperCase() }}</h2>
2832
</div>
2933

@@ -34,18 +38,23 @@
3438
placeholder="Search for page name"
3539
@input="onSearchInput"
3640
/>
37-
<b-dropdown :text="`Sorted by: ${sortByText}`" class="drop-down" toggle-class="drop-down-btn">
41+
<b-dropdown
42+
:text="`Sorted by: ${sortByText}`"
43+
class="drop-down"
44+
toggle-class="drop-down-btn"
45+
>
3846
<b-dropdown-item @click="onSortBy('custom')">Custom</b-dropdown-item>
39-
<b-dropdown-item @click="onSortBy('created')">Created Date</b-dropdown-item>
47+
<b-dropdown-item @click="onSortBy('created')"
48+
>Created Date</b-dropdown-item
49+
>
4050
<b-dropdown-item @click="onSortBy('title')">Title</b-dropdown-item>
4151
</b-dropdown>
4252
</div>
4353

4454
<div class="page-container">
45-
<h3
46-
v-if="pages !== null && pages.length < 1"
47-
class="no-pages"
48-
>There are no pages belonging to this champion. : (</h3>
55+
<h3 v-if="pages !== null && pages.length < 1" class="no-pages">
56+
There are no pages belonging to this champion. : (
57+
</h3>
4958

5059
<draggable
5160
:list="pages"
@@ -112,7 +121,7 @@ export default {
112121
Draggable,
113122
},
114123
115-
data: function () {
124+
data: function() {
116125
return {
117126
champ: null,
118127
favorite: false,
@@ -134,7 +143,7 @@ export default {
134143
},
135144
136145
computed: {
137-
sortByText: function () {
146+
sortByText: function() {
138147
switch (this.sortBy) {
139148
case 'created':
140149
return 'Created Date';
@@ -148,7 +157,7 @@ export default {
148157
},
149158
},
150159
151-
created: function () {
160+
created: function() {
152161
this.sortBy = this.$route.query.sortBy;
153162
154163
if (!this.sortBy) {
@@ -173,7 +182,7 @@ export default {
173182
}
174183
},
175184
176-
destroyed: function () {
185+
destroyed: function() {
177186
Utils.removeWindowListener('keydown', this.onSearchPress);
178187
},
179188

Diff for: src/routes/Contact.vue

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1+
<!-- @format -->
2+
13
<template>
2-
<div class="mw-container" :style="{ padding: $store.state.loggedIn === false ? '50px' : '0px' }">
4+
<div
5+
class="mw-container viewlimit-width"
6+
:style="{ padding: $store.state.loggedIn === false ? '50px' : '0px' }"
7+
>
38
<div class="logo mb-4"></div>
49

510
<h2 class="mt-4 mb-3">Contact</h2>
611
<p>
712
If you want to contact us, send an e-mail to
8-
<b>
9-
10-
</b>.
13+
<b> <a href="mailto:[email protected]">[email protected]</a> </b>.
1114
</p>
1215
<p>
1316
Alternatively, you can also contact us on our
14-
<a href="/discord" target="_blank">
15-
<b>Discord Server</b>
16-
</a>.
17-
<br />Of cousre, you can also leave some critics and suggestions there, if you want.
17+
<a href="/discord" target="_blank"> <b>Discord Server</b> </a>. <br />Of
18+
cousre, you can also leave some critics and suggestions there, if you
19+
want.
1820
</p>
1921

2022
<h2 class="mt-4 mb-3">Support Us</h2>
2123
<p>
22-
This service is (ad-)free and open source, so we don't earn any money with this page.
23-
Per year, we pay €20 (~ $22) for the myrunes.com domain and €60 (~ $66) for the root server.
24-
So, if you want to support us, you can do this via
25-
<a
26-
href="/paypal"
27-
target="_blank"
28-
>
29-
<b>PayPal</b>
30-
</a>, if you want.
24+
This service is (ad-)free and open source, so we don't earn any money with
25+
this page. Per year, we pay €20 (~ $22) for the myrunes.com domain and €60
26+
(~ $66) for the root server. So, if you want to support us, you can do
27+
this via
28+
<a href="/paypal" target="_blank"> <b>PayPal</b> </a>, if you want.
3129
</p>
3230
</div>
3331
</template>
@@ -62,4 +60,4 @@ th {
6260
.mw-container {
6361
max-width: 1000px;
6462
}
65-
</style>
63+
</style>

0 commit comments

Comments
 (0)