mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Remove Patreon functionality (#129)
* Remove Patreon links, supper status checking * Add warnings to admin panel and README
This commit is contained in:
@@ -13,30 +13,10 @@
|
||||
button.btn.btn-default.ml-1(type="button" (click)="resetFields()") Reset
|
||||
|
||||
.col-6
|
||||
.form
|
||||
.form-group
|
||||
h3 Patreon
|
||||
.form-group.d-flex
|
||||
button.btn.btn-default((click)="updatePatreon()")
|
||||
| Update Data
|
||||
.input-group.ml-1(style="width: 400px")
|
||||
input.form-control(#patreonToken placeholder="patreon token")
|
||||
.input-group-append
|
||||
button.btn.btn-warning((click)="updatePatreonToken(patreonToken.value); patreonToken.value = ''")
|
||||
| Update Token
|
||||
.form-group
|
||||
| To get new token, got to #[a(href="https://www.patreon.com/portal/registration/register-clients") My Clients],
|
||||
| refresh token and update patreon token field with "Creator's Access Token" from the site.
|
||||
.form-group
|
||||
button.btn.btn-default((click)="getLastPatreonData()")
|
||||
| Get last patreon data
|
||||
|
||||
.form
|
||||
.form-group
|
||||
h3 Other
|
||||
.form-group
|
||||
button.btn.btn-default((click)="updatePastSupporters()")
|
||||
| Update past supporters
|
||||
h2.text-danger PATREON WARNING:
|
||||
p.lead Code relating to Patreon syncing has been removed from the public pixel.horse codebase.
|
||||
p.lead
|
||||
| You <b>MUST</b> contact the Pony Town Team before opening a Patreon based off the Pony Town Custom Server source code. Not doing so is a violation of the <a href="https://creativecommons.org/licenses/by-nc/4.0/">CC-BY-NC 4.0</a> license applied to the art and music assets supplied with the game. Please submit a request for approval to <a href="mailto:[email protected]">[email protected]</a>.
|
||||
|
||||
.row
|
||||
.col-12
|
||||
|
||||
@@ -3,7 +3,6 @@ import { compact } from 'lodash';
|
||||
import { AdminModel } from '../../services/adminModel';
|
||||
import { Account, GeneralSettings } from '../../../common/adminInterfaces';
|
||||
import { Subscription } from '../../../common/interfaces';
|
||||
import { showTextInNewTab } from '../../../client/htmlUtils';
|
||||
|
||||
interface Field {
|
||||
key: keyof GeneralSettings;
|
||||
@@ -72,19 +71,4 @@ export class AdminOther implements OnInit, OnDestroy {
|
||||
resetSuspiciousPonies() {
|
||||
this.suspiciousPonies = this.model.state.loginServers[0].suspiciousPonies;
|
||||
}
|
||||
updatePatreon() {
|
||||
this.model.server.updatePatreon();
|
||||
}
|
||||
updatePatreonToken(patreonToken: string) {
|
||||
this.model.updateSettings({ patreonToken });
|
||||
}
|
||||
getLastPatreonData() {
|
||||
this.model.getLastPatreonData()
|
||||
.then(data => {
|
||||
showTextInNewTab(JSON.stringify(data, null, 2));
|
||||
});
|
||||
}
|
||||
updatePastSupporters() {
|
||||
this.model.updatePastSupporters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,23 +34,6 @@ h1(focusTitle) About
|
||||
|
||||
hr
|
||||
|
||||
div(*ngIf="patreonLink")
|
||||
h2 Support {{title}}
|
||||
|
||||
p.
|
||||
If you'd like to help keep {{title}} running, and support future development of the project,
|
||||
please consider #[a([href]="patreonLink" target="_blank" rel="noopener noreferrer") supporting us on Patreon].
|
||||
|
||||
support-button.d-block.mx-auto.my-4(style="max-width: 400px;")
|
||||
|
||||
p.
|
||||
Patreon supporter rewards include the following:
|
||||
ul
|
||||
li(*ngFor="let r of rewards")
|
||||
| {{r}}
|
||||
p.
|
||||
Note that in order to receive any patreon rewards you need to connect your Patreon to your {{title}} account.
|
||||
|
||||
h2 Technology
|
||||
|
||||
p.
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getUrl } from '../../../client/rev';
|
||||
import { CREDITS, CONTRIBUTORS, Credit } from '../../../client/credits';
|
||||
import { CHANGELOG } from '../../../generated/changelog';
|
||||
import { SUPPORTER_REWARDS_LIST } from '../../../common/constants';
|
||||
import { supporterLink, discordLink, contactEmail } from '../../../client/data';
|
||||
import { discordLink, contactEmail } from '../../../client/data';
|
||||
|
||||
function toCredit(credit: Credit) {
|
||||
return {
|
||||
@@ -26,7 +26,6 @@ export class About {
|
||||
readonly contributors = CONTRIBUTORS;
|
||||
readonly changelog = CHANGELOG;
|
||||
readonly rewards = SUPPORTER_REWARDS_LIST;
|
||||
readonly patreonLink = supporterLink;
|
||||
readonly discordLink = discordLink;
|
||||
readonly contactEmail = contactEmail;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
.text-nowrap
|
||||
a.text-muted.mr-2(*ngIf="twitterLink" [href]="twitterLink" target="_blank" title="Twitter")
|
||||
fa-icon([icon]="twitterIcon" [fixedWidth]="true")
|
||||
a.text-muted.mr-2(*ngIf="patreonLink" [href]="patreonLink" target="_blank" title="Patreon")
|
||||
fa-icon([icon]="patreonIcon" [fixedWidth]="true")
|
||||
a.text-muted.mr-2(*ngIf="contactEmail" href="mailto:{{contactEmail}}" target="_blank" title="Email")
|
||||
fa-icon([icon]="emailIcon" [fixedWidth]="true")
|
||||
div
|
||||
|
||||
@@ -6,7 +6,7 @@ import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { GameService } from '../services/gameService';
|
||||
import { Model, Friend } from '../services/model';
|
||||
import { version, host, contactEmail, supporterLink, twitterLink, discordLink, copyrightName } from '../../client/data';
|
||||
import { version, host, contactEmail, twitterLink, discordLink, copyrightName } from '../../client/data';
|
||||
import { PonyTownGame } from '../../client/game';
|
||||
import { faTwitter, faPatreon, faEnvelope, faCog, faHome, faGamepad, faInfoCircle, faHorseHead, faDiscord } from '../../client/icons';
|
||||
import { InstallService } from '../services/installService';
|
||||
@@ -54,7 +54,6 @@ export class App implements OnInit, OnDestroy {
|
||||
readonly aboutIcon = faInfoCircle;
|
||||
readonly charactersIcon = faHorseHead;
|
||||
readonly contactEmail = contactEmail;
|
||||
readonly patreonLink = supporterLink;
|
||||
readonly discordLink = discordLink;
|
||||
readonly twitterLink = twitterLink;
|
||||
readonly copyright = copyrightName;
|
||||
|
||||
@@ -13,7 +13,6 @@ page-loader(*ngIf="!playing")
|
||||
h1.sr-only(focusTitle) Characters
|
||||
h2.sr-only Character selection
|
||||
.mx-auto(style="max-width: 400px;")
|
||||
support-button.mb-3
|
||||
discord-button.mb-3
|
||||
install-button.mb-3
|
||||
character-select(
|
||||
|
||||
@@ -18,8 +18,6 @@ div(*ngIf="!playing")
|
||||
sign-in-box((signIn)="signIn($event)")
|
||||
|
||||
div(*ngIf="!!account")
|
||||
.form-group
|
||||
support-button
|
||||
.form-group
|
||||
discord-button
|
||||
.form-group(*ngIf="canInstall")
|
||||
|
||||
@@ -502,18 +502,6 @@ export class AdminModel {
|
||||
.then(() => this.updateState())
|
||||
.catch(this.handleError);
|
||||
}
|
||||
resetSupporter(accountId: string) {
|
||||
return this.server.resetSupporter(accountId)
|
||||
.catch(this.handleError);
|
||||
}
|
||||
getLastPatreonData() {
|
||||
return this.server.getLastPatreonData()
|
||||
.catch(this.handleError);
|
||||
}
|
||||
updatePastSupporters() {
|
||||
return this.server.updatePastSupporters()
|
||||
.catch(this.handleError);
|
||||
}
|
||||
// other
|
||||
getTimings(server: string) {
|
||||
return this.server.getTimings(server)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { supporterLink, discordLink } from '../../../client/data';
|
||||
import { discordLink } from '../../../client/data';
|
||||
import { GENERAL_RULES } from '../../../common/constants';
|
||||
|
||||
@Component({
|
||||
@@ -7,7 +7,6 @@ import { GENERAL_RULES } from '../../../common/constants';
|
||||
templateUrl: 'play-notice.pug',
|
||||
})
|
||||
export class PlayNotice {
|
||||
readonly patreonLink = supporterLink;
|
||||
readonly discordLink = discordLink;
|
||||
readonly rules = GENERAL_RULES;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import { EmoteBox } from './emote-box/emote-box';
|
||||
import { SliderBar } from './slider-bar/slider-bar';
|
||||
import { SpriteBox } from './sprite-box/sprite-box';
|
||||
import { SpriteSelection } from './sprite-selection/sprite-selection';
|
||||
import { SupportButton } from './support-button/support-button';
|
||||
import { SupporterPony } from './supporter-pony/supporter-pony';
|
||||
import { DiscordButton } from './discord-button/discord-button';
|
||||
import { DiscordPony } from './discord-pony/discord-pony';
|
||||
@@ -91,7 +90,6 @@ const declarations = [
|
||||
SliderBar,
|
||||
SpriteBox,
|
||||
SpriteSelection,
|
||||
SupportButton,
|
||||
SupporterPony,
|
||||
DiscordButton,
|
||||
DiscordPony,
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
a.btn.btn-lg.btn-outline-patreon.btn-block.mb-2(
|
||||
*ngIf="patreonLink" (mouseenter)="pony.excite()" (mouseout)="pony.reset()" [href]="patreonLink" target="_blank"
|
||||
rel="noopener noreferrer")
|
||||
| {{supporter ? 'Thank you for supporting us!' : 'Support us on Patreon!'}}
|
||||
svg.patreon-logo(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150")
|
||||
circle(fill="#f9685f" cx="75" cy="75" r="75")
|
||||
path(fill="#052d49" d="M31.729 27.659h17.578v95.888H31.729z")
|
||||
circle(fill="#fff" cy="63.565" cx="95.783" r="35.955")
|
||||
.supporter-pony
|
||||
supporter-pony(#pony [scale]="2")
|
||||
@@ -1,45 +0,0 @@
|
||||
@import '../../../../styles/partials/variables';
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: relative;
|
||||
|
||||
@media (max-width: 320px) {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.patreon-logo {
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
top: 5px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
||||
@media (max-width: 320px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.supporter-pony {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 70px;
|
||||
width: 100px;
|
||||
overflow: hidden;
|
||||
border-radius: $border-radius-lg - 2px;
|
||||
|
||||
> supporter-pony {
|
||||
position: absolute;
|
||||
bottom: -95px;
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
@media (max-width: 380px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Model } from '../../services/model';
|
||||
import { supporterLink } from '../../../client/data';
|
||||
|
||||
@Component({
|
||||
selector: 'support-button',
|
||||
templateUrl: 'support-button.pug',
|
||||
styleUrls: ['support-button.scss'],
|
||||
})
|
||||
export class SupportButton {
|
||||
readonly patreonLink = supporterLink;
|
||||
constructor(private model: Model) {
|
||||
}
|
||||
get supporter() {
|
||||
return this.model.supporter;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user