From 9cd5dcff4b832d9c9af857d6ec87c94bd775d770 Mon Sep 17 00:00:00 2001
From: Beautiful Mim <156966699+beautifulmim@users.noreply.github.com>
Date: Thu, 5 Sep 2024 12:12:24 -0400
Subject: [PATCH] Only show primary fittings on doctrines list and other
improvements (#693)
* Only show primary fittings on doctrines list and other improvements
* Console log cleanup
---
.../components/blocks/CharacterFinder.astro | 1 -
.../components/blocks/CorporationInfo.astro | 1 -
.../components/blocks/DoctrineDetails.astro | 31 ++++++++++++-------
.../src/components/blocks/DoctrineItem.astro | 20 +++++++-----
.../src/components/blocks/DoctrineTier.astro | 2 --
.../components/blocks/GroupRequestItem.astro | 4 +--
.../src/components/blocks/MoneyInput.astro | 1 -
.../src/components/blocks/PageFinder.astro | 1 -
.../components/blocks/PushNotifications.astro | 2 --
.../src/components/blocks/StationAssets.astro | 2 --
.../blocks/StructureTimerList.astro | 2 --
.../blocks/StructureTimerListItem.astro | 2 --
.../components/partials/FooterScripts.astro | 4 +--
.../components/partials/HomepageRenders.astro | 2 --
frontend/app/src/helpers/fit_parser.ts | 1 -
frontend/app/src/i18n/ui.ts | 1 +
.../alliance/corporations/applications.astro | 1 -
.../corporations/applications/records.astro | 1 -
.../pages/alliance/corporations/members.astro | 1 -
.../alliance/corporations/members/mains.astro | 1 -
.../corporations/members/unregistered.astro | 1 -
.../src/pages/market/freight/contract.astro | 1 -
...orporation_slide_request_status_item.astro | 2 --
.../pages/partials/group_item_component.astro | 2 --
.../partials/groups_members_component.astro | 2 --
.../app/src/pages/ships/doctrines/list.astro | 6 ++--
.../ships/doctrines/list/[doctrine_id].astro | 10 +++---
27 files changed, 45 insertions(+), 60 deletions(-)
diff --git a/frontend/app/src/components/blocks/CharacterFinder.astro b/frontend/app/src/components/blocks/CharacterFinder.astro
index 33078924..9b001cc1 100644
--- a/frontend/app/src/components/blocks/CharacterFinder.astro
+++ b/frontend/app/src/components/blocks/CharacterFinder.astro
@@ -66,7 +66,6 @@ import MagnifierIcon from '@components/icons/buttons/MagnifierIcon.astro';
e.preventDefault()
show_characters_finder().then( (character_id) => {
- console.log(character_id)
if (!character_id)
return
diff --git a/frontend/app/src/components/blocks/CorporationInfo.astro b/frontend/app/src/components/blocks/CorporationInfo.astro
index 18dd44bc..cba258e8 100644
--- a/frontend/app/src/components/blocks/CorporationInfo.astro
+++ b/frontend/app/src/components/blocks/CorporationInfo.astro
@@ -23,7 +23,6 @@ let get_corporation_info_error:string | false = false
try {
corporation = await get_corporation_info(corporation_id)
- console.log(corporation)
} catch (error) {
get_corporation_info_error = (prod_error_messages() ? t('get_corporation_info_error') : error.message)
}
diff --git a/frontend/app/src/components/blocks/DoctrineDetails.astro b/frontend/app/src/components/blocks/DoctrineDetails.astro
index 447f49b0..9db92fb2 100644
--- a/frontend/app/src/components/blocks/DoctrineDetails.astro
+++ b/frontend/app/src/components/blocks/DoctrineDetails.astro
@@ -102,17 +102,24 @@ import ArmorIcon from '@components/icons/ArmorIcon.astro';
}
-
-
-
- {t('recently_flied')}
-
- {recently_fleets.length} {recently_fleets.length != 1 ? t('fleets').toLowerCase() : t('fleet').toLowerCase()} {t('in_past_30_days').toLowerCase()}
-
-
-
-
-
-
+ {recently_fleets &&
+
+
+
+ {t('recently_flied')}
+
+ {recently_fleets.length} {recently_fleets.length != 1 ? t('fleets').toLowerCase() : t('fleet').toLowerCase()} {t('in_past_30_days').toLowerCase()}
+
+
+
+ {recently_fleets.length > 0 ?
+
+ :
+
+ {t('no_recent_fleets')}
+
+ }
+
+ }
\ No newline at end of file
diff --git a/frontend/app/src/components/blocks/DoctrineItem.astro b/frontend/app/src/components/blocks/DoctrineItem.astro
index fd2aea65..7ae2b893 100644
--- a/frontend/app/src/components/blocks/DoctrineItem.astro
+++ b/frontend/app/src/components/blocks/DoctrineItem.astro
@@ -28,6 +28,12 @@ const {
doctrine,
...attributes
} = Astro.props
+
+const show_primary_fittings = true
+const show_secondary_fittings = false
+const show_support_fittings = false
+
+const show_subtitles = ((show_primary_fittings ? 1 : 0) + (show_secondary_fittings ? 1 : 0) + (show_support_fittings ? 1 : 0)) > 1
---
- {doctrine.primary_fittings.map((fitting) =>
+ {show_primary_fittings && doctrine.primary_fittings.map((fitting) =>
)}
- {doctrine.secondary_fittings.map((fitting) =>
+ {show_secondary_fittings && doctrine.secondary_fittings.map((fitting) =>
)}
- {doctrine.support_fittings.map((fitting) =>
+ {show_support_fittings && doctrine.support_fittings.map((fitting) =>
diff --git a/frontend/app/src/components/blocks/DoctrineTier.astro b/frontend/app/src/components/blocks/DoctrineTier.astro
index 8afbd6cf..d285ebc6 100644
--- a/frontend/app/src/components/blocks/DoctrineTier.astro
+++ b/frontend/app/src/components/blocks/DoctrineTier.astro
@@ -15,8 +15,6 @@ const {
ideal_composition = {},
} = Astro.props
-console.log(ideal_composition)
-
import Grid from '@components/compositions/Grid.astro';
import Badge from '@components/blocks/Badge.astro';
---
diff --git a/frontend/app/src/components/blocks/GroupRequestItem.astro b/frontend/app/src/components/blocks/GroupRequestItem.astro
index 498abba7..d17c0dbc 100644
--- a/frontend/app/src/components/blocks/GroupRequestItem.astro
+++ b/frontend/app/src/components/blocks/GroupRequestItem.astro
@@ -99,7 +99,7 @@ import StylessButton from './StylessButton.astro';
target: '${`#group-request-list-${group_request.group_id}`}',
swap: 'outerHTML transition:true'
}
- }).then( (group_id) => console.log(group_id) )
+ })
}
}`}
x-on:click="show_accept_group_request_dialog()"
@@ -139,7 +139,7 @@ import StylessButton from './StylessButton.astro';
target: '${`#group-request-list-${group_request.group_id}`}',
swap: 'outerHTML transition:true'
}
- }).then( (group_id) => console.log(group_id) )
+ })
}
}`}
x-on:click="show_deny_group_request_dialog()"
diff --git a/frontend/app/src/components/blocks/MoneyInput.astro b/frontend/app/src/components/blocks/MoneyInput.astro
index 61b4b0c1..f434c570 100644
--- a/frontend/app/src/components/blocks/MoneyInput.astro
+++ b/frontend/app/src/components/blocks/MoneyInput.astro
@@ -28,7 +28,6 @@ import Input from '@components/blocks/Input.astro';
clamp(num, min, max) { return Math.min(Math.max(num, min), max); },
updateValue(value, mult, min, max) {
const num = value.replace(/[^-0-9\.]/g, '');
- console.log({value,num});
return clamp(num * mult, min, max);
},
}`}
diff --git a/frontend/app/src/components/blocks/PageFinder.astro b/frontend/app/src/components/blocks/PageFinder.astro
index 1a469b1c..8399e9e3 100644
--- a/frontend/app/src/components/blocks/PageFinder.astro
+++ b/frontend/app/src/components/blocks/PageFinder.astro
@@ -74,7 +74,6 @@ import MagnifierIcon from '@components/icons/buttons/MagnifierIcon.astro';
filtered_pages: [ false ],
pages: ${JSON.stringify(filter_pages)},
page_filter() {
- console.log('asd')
if (this.search === '') {
this.filtered_pages = ${JSON.stringify(filter_pages.map( (i) => i.slug ))}
return
diff --git a/frontend/app/src/components/blocks/PushNotifications.astro b/frontend/app/src/components/blocks/PushNotifications.astro
index 0fe83d7f..b61919ad 100644
--- a/frontend/app/src/components/blocks/PushNotifications.astro
+++ b/frontend/app/src/components/blocks/PushNotifications.astro
@@ -28,10 +28,8 @@ import RifterIcon from '@components/icons/RifterIcon.astro';
this.unregister_sw()
const registration = await navigator.serviceWorker.register('/js/notifications_sw.js?endpoint=${SUBSCRIPTION_URL}')
- console.log(registration)
},
unregister_sw() {
- console.log('registering/./')
navigator.serviceWorker.getRegistrations().then(registrations => {
for (const registration of registrations) {
registration.unregister()
diff --git a/frontend/app/src/components/blocks/StationAssets.astro b/frontend/app/src/components/blocks/StationAssets.astro
index 7e9fe933..9d528ed6 100644
--- a/frontend/app/src/components/blocks/StationAssets.astro
+++ b/frontend/app/src/components/blocks/StationAssets.astro
@@ -49,14 +49,12 @@ import StylessButton from './StylessButton.astro';
asset_name_filter: '',
assets_style: 'icons',
filter () {
- console.log('filter')
if (this.asset_name_filter === '') {
this.assets_filtered = this.station_assets
return
}
this.assets_filtered = this.station_assets.filter( (asset) => asset.name.toLowerCase().includes(this.asset_name_filter.toLowerCase()) )
- console.log(this.assets_filtered)
}
}`}
@keydown.escape.prevent.stop="close()"
diff --git a/frontend/app/src/components/blocks/StructureTimerList.astro b/frontend/app/src/components/blocks/StructureTimerList.astro
index 925fa8c5..0f654944 100644
--- a/frontend/app/src/components/blocks/StructureTimerList.astro
+++ b/frontend/app/src/components/blocks/StructureTimerList.astro
@@ -16,8 +16,6 @@ const {
create_fleet = false,
} = Astro.props
-console.log(create_fleet)
-
import BlockList from '@components/compositions/BlockList.astro';
import StructureTimerListItem from '@components/blocks/StructureTimerListItem.astro';
diff --git a/frontend/app/src/components/blocks/StructureTimerListItem.astro b/frontend/app/src/components/blocks/StructureTimerListItem.astro
index 4df6e215..4ad238e5 100644
--- a/frontend/app/src/components/blocks/StructureTimerListItem.astro
+++ b/frontend/app/src/components/blocks/StructureTimerListItem.astro
@@ -19,8 +19,6 @@ const {
...attributes
} = Astro.props
-console.log(create_fleet)
-
import { get_item_icon, get_alliance_logo } from '@helpers/eve_image_server'
import Flexblock from '@components/compositions/Flexblock.astro';
diff --git a/frontend/app/src/components/partials/FooterScripts.astro b/frontend/app/src/components/partials/FooterScripts.astro
index aef20af9..054792a8 100644
--- a/frontend/app/src/components/partials/FooterScripts.astro
+++ b/frontend/app/src/components/partials/FooterScripts.astro
@@ -81,10 +81,8 @@
document.querySelector('.loader').classList.remove('active')
htmx.process(document.body)
- if (ccpwgl_context) {
- console.log('Removing context')
+ if (ccpwgl_context)
ccpwgl_context = null
- }
})
diff --git a/frontend/app/src/components/partials/HomepageRenders.astro b/frontend/app/src/components/partials/HomepageRenders.astro
index 8adef713..32666353 100644
--- a/frontend/app/src/components/partials/HomepageRenders.astro
+++ b/frontend/app/src/components/partials/HomepageRenders.astro
@@ -56,7 +56,6 @@ export const WatermelonXData = `init_ccpwgl() {
scene.loadSun('res:/fisfx/lensflare/pink_hazy.red', function () {
scene.wrappedScene.lensflares.forEach(lensflare=> {
- console.log(lensflare)
lensflare._transform = mat4.fromValues(
100, 0, 0, 0,
0, 100, 0, 0,
@@ -388,7 +387,6 @@ export const OurzadCameraXData = `
resize_canvas: null,
rotation_angle: 0,
resizeCanvasToDisplaySize(canvas, ccpwgl_context) {
- console.log('recalculate')
// Lookup the size the browser is displaying the canvas in CSS pixels.
const displayWidth = canvas.clientWidth;
const displayHeight = canvas.clientHeight;
diff --git a/frontend/app/src/helpers/fit_parser.ts b/frontend/app/src/helpers/fit_parser.ts
index 95a3970f..896401d2 100644
--- a/frontend/app/src/helpers/fit_parser.ts
+++ b/frontend/app/src/helpers/fit_parser.ts
@@ -129,7 +129,6 @@ export async function parse_eft(fitting_eft: string) {
}
}
- console.log('Done parsing eft')
return ship_fitting
}
diff --git a/frontend/app/src/i18n/ui.ts b/frontend/app/src/i18n/ui.ts
index 1a4c6000..7edf6ac4 100644
--- a/frontend/app/src/i18n/ui.ts
+++ b/frontend/app/src/i18n/ui.ts
@@ -941,5 +941,6 @@ export const ui = {
'edit': 'Edit',
'status': 'Status',
'default': 'Default',
+ 'no_recent_fleets': 'No recent fleets using this doctrine.',
},
} as const;
\ No newline at end of file
diff --git a/frontend/app/src/pages/alliance/corporations/applications.astro b/frontend/app/src/pages/alliance/corporations/applications.astro
index 8c784a14..fd60d57d 100644
--- a/frontend/app/src/pages/alliance/corporations/applications.astro
+++ b/frontend/app/src/pages/alliance/corporations/applications.astro
@@ -89,7 +89,6 @@ const page_title = t('corporations.applications.page_title')
character_name: '',
corporation_filter: '-1',
filter() {
- console.log(this.character_name)
if (this.character_name === '' && this.corporation_filter === '-1') {
this.corporations_filtered = this.corporations_unfiltered
this.corporations_filtered_applicationss_count = ${JSON.stringify(corporations_applications_count)}
diff --git a/frontend/app/src/pages/alliance/corporations/applications/records.astro b/frontend/app/src/pages/alliance/corporations/applications/records.astro
index ff0d0e07..4e8e41d1 100644
--- a/frontend/app/src/pages/alliance/corporations/applications/records.astro
+++ b/frontend/app/src/pages/alliance/corporations/applications/records.astro
@@ -88,7 +88,6 @@ const page_title = t('corporations.applications.records.page_title')
character_name: '',
corporation_filter: '-1',
filter() {
- console.log(this.character_name)
if (this.character_name === '' && this.corporation_filter === '-1') {
this.corporations_filtered = this.corporations_unfiltered
this.corporations_filtered_applicationss_count = ${JSON.stringify(corporations_applications_count)}
diff --git a/frontend/app/src/pages/alliance/corporations/members.astro b/frontend/app/src/pages/alliance/corporations/members.astro
index 658ac8ba..752c5781 100644
--- a/frontend/app/src/pages/alliance/corporations/members.astro
+++ b/frontend/app/src/pages/alliance/corporations/members.astro
@@ -96,7 +96,6 @@ const page_title = t('corporations.members.page_title')
character_name: '',
corporation_filter: '-1',
filter() {
- console.log(this.character_name)
if (this.character_name === '' && this.corporation_filter === '-1') {
this.corporations_filtered = this.corporations_unfiltered
this.corporations_filtered_memberss_count = ${JSON.stringify(corporations_members_count)}
diff --git a/frontend/app/src/pages/alliance/corporations/members/mains.astro b/frontend/app/src/pages/alliance/corporations/members/mains.astro
index 13235671..72acda9f 100644
--- a/frontend/app/src/pages/alliance/corporations/members/mains.astro
+++ b/frontend/app/src/pages/alliance/corporations/members/mains.astro
@@ -95,7 +95,6 @@ const page_title = t('corporations.members.mains.page_title')
character_name: '',
main_filter: '-1',
filter() {
- console.log(this.character_name)
if (this.character_name === '') {
this.mains_filtered = this.mains_unfiltered
this.mains_filtered_alts_count = ${JSON.stringify(mains_alts_count)}
diff --git a/frontend/app/src/pages/alliance/corporations/members/unregistered.astro b/frontend/app/src/pages/alliance/corporations/members/unregistered.astro
index df1c55c1..23534aab 100644
--- a/frontend/app/src/pages/alliance/corporations/members/unregistered.astro
+++ b/frontend/app/src/pages/alliance/corporations/members/unregistered.astro
@@ -96,7 +96,6 @@ const page_title = t('corporations.members.unregistered.page_title')
character_name: '',
corporation_filter: '-1',
filter() {
- console.log(this.character_name)
if (this.character_name === '' && this.corporation_filter === '-1') {
this.corporations_filtered = this.corporations_unfiltered
this.corporations_filtered_memberss_count = ${JSON.stringify(corporations_members_count)}
diff --git a/frontend/app/src/pages/market/freight/contract.astro b/frontend/app/src/pages/market/freight/contract.astro
index 4d497483..27b00f34 100644
--- a/frontend/app/src/pages/market/freight/contract.astro
+++ b/frontend/app/src/pages/market/freight/contract.astro
@@ -31,7 +31,6 @@ try {
const route_id = freight_routes_data.route_translation[route]
const route_cost = await get_route_cost(route_id, contract_size, collateral)
- console.log(route_cost)
cost = route_cost.cost
origin = freight_routes_data.stations[route][0]
diff --git a/frontend/app/src/pages/partials/corporation_slide_request_status_item.astro b/frontend/app/src/pages/partials/corporation_slide_request_status_item.astro
index 4ca06f3f..1a7969d5 100644
--- a/frontend/app/src/pages/partials/corporation_slide_request_status_item.astro
+++ b/frontend/app/src/pages/partials/corporation_slide_request_status_item.astro
@@ -34,9 +34,7 @@ if (Astro.request.method === "POST") {
throw new Error(t('invalid_description'));
application = await create_corporation_application(auth_token, corporation.corporation_id, description)
- console.log(application)
corporation.status = application.status as CorporationStatusType
- console.log(corporation.status)
} catch (error) {
create_corporation_application_error = prod_error_messages() ? t('create_corporation_application_error') : error.message
}
diff --git a/frontend/app/src/pages/partials/group_item_component.astro b/frontend/app/src/pages/partials/group_item_component.astro
index 9b57ec55..35cb9d43 100644
--- a/frontend/app/src/pages/partials/group_item_component.astro
+++ b/frontend/app/src/pages/partials/group_item_component.astro
@@ -98,8 +98,6 @@ if (delete_member_error) {
content: delete_member_error,
}
- console.log(alert)
-
if (group) {
const params = query_string({
name: group.name,
diff --git a/frontend/app/src/pages/partials/groups_members_component.astro b/frontend/app/src/pages/partials/groups_members_component.astro
index 19f1c59c..9ba84822 100644
--- a/frontend/app/src/pages/partials/groups_members_component.astro
+++ b/frontend/app/src/pages/partials/groups_members_component.astro
@@ -96,8 +96,6 @@ try {
get_groups_members_error = prod_error_messages() ? t('get_groups_members_error') : error.message
}
-console.log(groups_members)
-
const GROUPS_MEMBERS_PARTIAL_URL = translatePath('/partials/groups_members_component')
const delay = parseInt(Astro.url.searchParams.get('delay') ?? '0')
diff --git a/frontend/app/src/pages/ships/doctrines/list.astro b/frontend/app/src/pages/ships/doctrines/list.astro
index 9e154880..b38fffa5 100644
--- a/frontend/app/src/pages/ships/doctrines/list.astro
+++ b/frontend/app/src/pages/ships/doctrines/list.astro
@@ -24,7 +24,7 @@ import { marked } from 'marked';
import Viewport from '@layouts/Viewport.astro';
-import PageWide from '@components/page/PageWide.astro';
+import PageDefault from '@components/page/PageDefault.astro';
import PageTitle from '@components/page/PageTitle.astro';
import TextBox from '@components/layout/TextBox.astro';
@@ -44,7 +44,7 @@ const page_title = t('doctrines.page_title');
title={page_title}
meta_description={t('doctrines.alliance.meta_description')}
>
-
}
-
+
\ No newline at end of file
diff --git a/frontend/app/src/pages/ships/doctrines/list/[doctrine_id].astro b/frontend/app/src/pages/ships/doctrines/list/[doctrine_id].astro
index 860c7d32..fe738e1e 100644
--- a/frontend/app/src/pages/ships/doctrines/list/[doctrine_id].astro
+++ b/frontend/app/src/pages/ships/doctrines/list/[doctrine_id].astro
@@ -14,12 +14,14 @@ import { fetch_fleets_auth, fetch_fleets } from '@helpers/fetching/fleets'
let doctrine:DoctrineType
let fetch_doctrine_error:string | false = false
-let recently_fleets:FleetItem[] = []
+let recently_fleets:FleetItem[] = null
try {
doctrine = await fetch_doctrine_by_id(parseInt(doctrine_id))
- recently_fleets = auth_token ? await fetch_fleets_auth(auth_token as string, false) : await fetch_fleets(false)
- recently_fleets = recently_fleets.filter((fleet) => fleet.doctrine_id === parseInt(doctrine_id))
+ if (auth_token) {
+ recently_fleets = auth_token ? await fetch_fleets_auth(auth_token as string, false) : null
+ recently_fleets = recently_fleets.filter((fleet) => fleet.doctrine_id === parseInt(doctrine_id))
+ }
} catch (error) {
fetch_doctrine_error = prod_error_messages() ? t('fetch_doctrine_error') : error.message
}
@@ -53,7 +55,7 @@ const page_title = `${doctrine?.name} ${t('doctrine')}`;
}}
x-data={`{
ideal_fleet_size: ${doctrine?.ideal_composition?.ideal_fleet_size ?? 0},
- recently_fleets_count: ${recently_fleets.length},
+ recently_fleets_count: ${recently_fleets?.length},
}`}
>