Skip to content

Commit

Permalink
Adult games (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsgj committed Jan 3, 2022
1 parent ed74a1d commit f713715
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 20 deletions.
5 changes: 5 additions & 0 deletions src/_common/game/game.model.ts
Expand Up @@ -51,6 +51,10 @@ export class Game extends Collaboratable(Model) implements ContentContainerModel
static readonly DEVELOPMENT_STATUS_CANCELED = 3;
static readonly DEVELOPMENT_STATUS_DEVLOG = 4;

static readonly LOCKED_STATUS_UNLOCKED = 0;
static readonly LOCKED_STATUS_DMCA = 1;
static readonly LOCKED_STATUS_ADULT = 3;

developer!: User;
thumbnail_media_item?: MediaItem;
header_media_item?: MediaItem;
Expand Down Expand Up @@ -119,6 +123,7 @@ export class Game extends Collaboratable(Model) implements ContentContainerModel
has_active_builds?: boolean;
is_listable?: boolean;
is_locked?: boolean;
locked_status?: number;

// Sites settings
site?: Site;
Expand Down
6 changes: 6 additions & 0 deletions src/_common/report/form/form.ts
Expand Up @@ -60,6 +60,12 @@ export default class AppReportForm extends BaseForm<FormModel> implements FormOn
'Incorrect maturity rating for the content in the game'
),
},
{
radioValue: 'explicit',
text: this.$gettext(
'It is pornographic or contains sexually explicit material'
),
},
{
radioValue: 'stolen',
text: this.$gettext('Game does not belong to this developer'),
Expand Down
Binary file removed src/app/components/tag/images/adult-social.png
Binary file not shown.
Binary file removed src/app/components/tag/images/adult.png
Binary file not shown.
1 change: 0 additions & 1 deletion src/app/components/tag/list/list.ts
Expand Up @@ -28,7 +28,6 @@ const FeaturedTags = [
'puzzle',
'strategy',
'sports',
'adult',
];

@Component({
Expand Down
6 changes: 0 additions & 6 deletions src/app/components/tag/tags-info.service.ts
Expand Up @@ -139,12 +139,6 @@ export class TagsInfo {
image: require('./images/strategysim.png'),
imageSocial: require('./images/strategysim-social.png'),
},
{
id: 'adult',
label: '#adult',
image: require('./images/adult.png'),
imageSocial: require('./images/adult-social.png'),
},
{
id: 'other',
label: '#other',
Expand Down
2 changes: 2 additions & 0 deletions src/app/views/dashboard/games/manage/manage.ts
Expand Up @@ -64,6 +64,8 @@ export default class RouteDashGamesManage extends BaseRouteComponent {
populate!: RouteStore['populate'];

readonly Game = Game;
readonly GAME_LOCKED_STATUS_DMCA = Game.LOCKED_STATUS_DMCA;
readonly GAME_LOCKED_STATUS_ADULT = Game.LOCKED_STATUS_ADULT;

routeResolved() {
this.setPageTheme();
Expand Down
37 changes: 28 additions & 9 deletions src/app/views/dashboard/games/manage/manage.vue
Expand Up @@ -8,15 +8,33 @@
<p>
<app-jolticon icon="notice" big />
</p>
<p>
<b><translate>This game was removed from the site.</translate></b>
</p>
<p>
<translate>
We have received a DMCA takedown notice and were required to remove it
from the site. Only you are able to view it.
</translate>
</p>
<template v-if="game.locked_status === GAME_LOCKED_STATUS_DMCA">
<div key="locked-reason-dmca">
<p>
<b><translate>This game was removed from the site.</translate></b>
</p>
<p>
<translate>
We have received a DMCA takedown notice and were required to
remove it from the site. Only you are able to view it.
</translate>
</p>
</div>
</template>
<template v-else-if="game.locked_status === GAME_LOCKED_STATUS_ADULT">
<div key="locked-reason-adult">
<p>
<b><translate>This page is made private.</translate></b>
</p>
<p>
<translate>
The game page has been removed from Game Jolt's public listings.
You have access to this page and its contents until December 31,
2022.
</translate>
</p>
</div>
</template>
</div>
</div>
</section>
Expand Down Expand Up @@ -162,6 +180,7 @@
</router-link>
</app-game-perms>
<app-game-perms
v-if="!game.is_locked"
v-app-tooltip.bottom="
$gettext(`Manage your game keys and give access to users.`)
"
Expand Down
2 changes: 0 additions & 2 deletions src/app/views/discover/games/list/list.ts
Expand Up @@ -186,8 +186,6 @@ export default class RouteDiscoverGamesList extends BaseRouteComponent {
return this.$gettext('alt games');
case 'roguelike':
return this.$gettext('roguelike games');
case 'adult':
return this.$gettext('adult / porn games');
default:
return this.$gettextInterpolate(`%{ category } games`, {
category: this.tag,
Expand Down
2 changes: 2 additions & 0 deletions src/claim/views/key/_game/game.ts
Expand Up @@ -43,6 +43,7 @@ export default class AppKeyGame extends Vue {
bundle: GameBundle | null = null;
keyGroup: KeyGroup | null = null;
packagePayload: GamePackagePayloadModel | null = null;
gameIsLocked = false;

canToggleDescription = false;
showingFullDescription = false;
Expand All @@ -57,6 +58,7 @@ export default class AppKeyGame extends Vue {
this.game = new Game(this.payload.game);
this.bundle = this.payload.bundle ? new GameBundle(this.payload.bundle) : null;
this.keyGroup = this.payload.keyGroup ? new KeyGroup(this.payload.keyGroup) : null;
this.gameIsLocked = this.payload.gameIsLocked ?? false;
this.setPageTheme();

if (
Expand Down
2 changes: 1 addition & 1 deletion src/claim/views/key/_game/game.vue
Expand Up @@ -44,7 +44,7 @@
<p>~ Warm thanks from both {{ game.developer.display_name }} and the Game Jolt team.</p>
</div>

<template v-if="!bundle">
<template v-if="!bundle && !gameIsLocked">
<div v-if="!app.user" class="alert full-bleed full-bleed-xs text-center">
<p>
<a :href="loginUrl">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/doc-help
Submodule doc-help updated 1 files
+31 −17 src/guidelines/index.md

0 comments on commit f713715

Please sign in to comment.