Skip to content

Commit

Permalink
changed UI labels, and optimized list filters
Browse files Browse the repository at this point in the history
  • Loading branch information
u-Kuro committed Jul 14, 2024
1 parent ac8efa5 commit e848992
Show file tree
Hide file tree
Showing 25 changed files with 91 additions and 84 deletions.
Binary file modified Kanshi.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.example.kanshi"
minSdk 21
targetSdk 34
versionCode 433
versionName "9.0.3"
versionCode 434
versionName "9.0.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Binary file modified android/app/release/Kanshi.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions android/app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 433,
"versionName": "9.0.3",
"versionCode": 434,
"versionName": "9.0.4",
"outputFile": "app-release.apk"
}
],
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/assets/build/bundle.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/app/src/main/assets/build/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/app/src/main/assets/build/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/app/src/main/assets/webapi/worker/animeLoader.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/app/src/main/assets/webapi/worker/animeManager.js

Large diffs are not rendered by default.

Binary file modified docs/Kanshi.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/bundle.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
433
434
2 changes: 1 addition & 1 deletion docs/webapi/worker/animeLoader.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/webapi/worker/animeManager.js

Large diffs are not rendered by default.

Binary file modified public/Kanshi.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion public/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
433
434
2 changes: 1 addition & 1 deletion public/webapi/worker/animeLoader.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/webapi/worker/animeManager.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/components/Anime/AnimeGrid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,11 @@
bottom: unset !important;
top: 50% !important;
left: 8px !important;
transform: translateY(-100%) translateZ(0) !important;
-webkit-transform: translateY(-100%) translateZ(0) !important;
-ms-transform: translateY(-100%) translateZ(0) !important;
-moz-transform: translateY(-100%) translateZ(0) !important;
-o-transform: translateY(-100%) translateZ(0) !important;
transform: translateY(-50%) translateZ(0) !important;
-webkit-transform: translateY(-50%) translateZ(0) !important;
-ms-transform: translateY(-50%) translateZ(0) !important;
-moz-transform: translateY(-50%) translateZ(0) !important;
-o-transform: translateY(-50%) translateZ(0) !important;
width: 44px !important;
height: 44px !important;
}
Expand Down
31 changes: 9 additions & 22 deletions src/components/Anime/Fixed/AnimePopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1653,12 +1653,6 @@
on:scroll="{popupScroll}"
>
{#if $loadedAnimeLists}
{@const COOs = {
jp: "Japan",
kr: "South Korea",
cn: "China",
tw: "Taiwan",
}}
{@const animeList = $loadedAnimeLists[$selectedCategory]?.animeList}
{#each animeList || [] as anime, animeIndex ((anime?.id != null ? anime.id + " " + animeIndex : {}) ?? {})}
<div class="popup-content" bind:this="{anime.popupContent}">
Expand Down Expand Up @@ -1944,8 +1938,7 @@
) > 0
? anime.formattedAverageScore
: "?"}</b
>
{"/10"}
>{"/10"}
{/if}
{#if anime.formattedPopularity != null && anime.formattedPopularity}
{" · " +
Expand Down Expand Up @@ -1982,12 +1975,10 @@
: ""
: anime?.formattedDuration) ||
""}
{@const loweredCountryOfOrigin =
anime?.countryOfOrigin?.toLowerCase?.()}
<h4>
{(anime?.format || "N/A") +
(loweredCountryOfOrigin
? ` (${COOs[loweredCountryOfOrigin] && $windowWidth >= 377 && (isManga || isNovel || $windowWidth >= 427) ? COOs[loweredCountryOfOrigin] : anime?.countryOfOrigin})`
(anime?.countryOfOrigin
? ` (${anime.countryOfOrigin})`
: "")}
{#if formattedAnimeFormat}
{#key $earlisetReleaseDate || 1}
Expand All @@ -2013,12 +2004,10 @@
: ""
: anime?.formattedDuration) ||
""}
{@const loweredCountryOfOrigin =
anime?.countryOfOrigin?.toLowerCase?.()}
<h4>
{(anime?.format || "N/A") +
(loweredCountryOfOrigin
? ` (${COOs[loweredCountryOfOrigin] && $windowWidth >= 377 && (isManga || isNovel || $windowWidth >= 427) ? COOs[loweredCountryOfOrigin] : anime?.countryOfOrigin})`
(anime?.countryOfOrigin
? ` (${anime.countryOfOrigin})`
: "")}
{#if formattedAnimeFormat}
{@html formattedAnimeFormat}
Expand Down Expand Up @@ -2059,8 +2048,9 @@
href="{anime.animeUrl ||
'javascript:void(0)'}"
><span
class="{anime.userStatusColor +
'-color'}"
class="{
anime?.userStatusColor
? anime.userStatusColor+'-color' : ''}"
>{anime.userStatus ||
"N/A"}</span
>
Expand Down Expand Up @@ -2955,6 +2945,7 @@

.info-rating-wrapper b {
font-size: 15px;
padding-right: 2px;
}

:global(.general-rating-icon) {
Expand Down Expand Up @@ -3302,10 +3293,6 @@
max-height: 32px !important;
}

.info > a {
color: hsl(var(--ac-color));
}

.info a::-webkit-scrollbar,
.info span::-webkit-scrollbar {
display: none;
Expand Down
92 changes: 56 additions & 36 deletions src/components/Others/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
documentScrollTop,
} from "../../js/globalValues.js";

const COOs = {
JP: "Japan",
KR: "South Korea",
CN: "China",
TW: "Taiwan",
}
let selectedCategoryAnimeFilters,
selectedSortName,
selectedSortType,
Expand Down Expand Up @@ -2280,7 +2286,15 @@
: ' display-none')}"
>
<div class="filter-name">
<h2>{filterSelectionName || ""}</h2>
<h2>
{#if filterSelectionName==="airing status"}
{"Release Status"}
{:else if filterSelectionName==="shown score"}
{"Shown Metric"}
{:else}
{filterSelectionName || ""}
{/if}
</h2>
</div>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div
Expand Down Expand Up @@ -2378,7 +2392,13 @@
>
<div class="header">
<div class="filter-title">
{filterSelectionName}
{#if filterSelectionName==="airing status"}
{"Release Status"}
{:else if filterSelectionName==="shown score"}
{"Shown Metric"}
{:else}
{filterSelectionName || ""}
{/if}
</div>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<svg
Expand Down Expand Up @@ -2431,14 +2451,25 @@
on:wheel|stopPropagation="{() => {}}"
>
{#if filterSelectionIsSelected}
{@const isCOO = filterSelectionName === "country of origin"}
{#await filterSelectionOptionsLoaded ?
(filterSelectionsSearch[filterSelectionKey] ?
$orderedFilters?.[filterSelectionName]?.filter?.( (option) => hasPartialMatch(option, filterSelectionsSearch[filterSelectionKey]), )
: $orderedFilters?.[filterSelectionName])
$orderedFilters?.[filterSelectionName]?.filter?.((option) => {
let hasMatch
if (isCOO) {
hasMatch = hasPartialMatch(COOs[option?.toUpperCase?.()], filterSelectionsSearch[filterSelectionKey])
}
return hasMatch || hasPartialMatch(option, filterSelectionsSearch[filterSelectionKey])
}) : $orderedFilters?.[filterSelectionName])
: new Promise( (resolve) =>
resolve(filterSelectionsSearch[filterSelectionKey] ?
$orderedFilters?.[filterSelectionName]?.filter?.( (option) => hasPartialMatch(option, filterSelectionsSearch[filterSelectionKey]), )
: $orderedFilters?.[filterSelectionName]
$orderedFilters?.[filterSelectionName]?.filter?.((option) => {
let hasMatch
if (isCOO) {
hasMatch = hasPartialMatch(COOs[option?.toUpperCase?.()], filterSelectionsSearch[filterSelectionKey])
}
return hasMatch || hasPartialMatch(option, filterSelectionsSearch[filterSelectionKey])
}) : $orderedFilters?.[filterSelectionName]
),
)
}{""}{:then selectionOptions}
Expand All @@ -2454,9 +2485,6 @@
? $animeCautions
: []}
{#if selectionOptions?.length}
{@const isCOO =
filterSelectionName ===
"country of origin"}
{@const isReadOnly =
filterCategoryName ===
"Anime Filter" &&
Expand Down Expand Up @@ -2520,21 +2548,15 @@
>
<h3>
{#if isCOO}
{@const COOs =
{
jp: "Japan",
kr: "South Korea",
cn: "China",
tw: "Taiwan",
}}
{COOs[
optionName
] ||
optionName ||
""}
{@const upperCaseCC = optionName?.toUpperCase?.()}
{@const fullCountryName = COOs[upperCaseCC]}
{#if fullCountryName}
{`${fullCountryName} (${upperCaseCC})`}
{:else}
{upperCaseCC || optionName || ""}
{/if}
{:else}
{optionName ||
""}
{optionName || ""}
{/if}
</h3>
{#if status === "included" || (status === "excluded" && !isReadOnly)}
Expand Down Expand Up @@ -2900,23 +2922,21 @@
</h3>
{:else if optionCategory}
{#if optionCategory === "country of origin"}
{@const COOs = {
jp: "Japan",
kr: "South Korea",
cn: "China",
tw: "Taiwan",
}}
{@const COOName =
COOs[optionName?.trim()?.toLowerCase?.()] ??
optionName?.toUpperCase?.()}
{@const upperCaseCC = optionName?.toUpperCase?.()}
{@const fullCountryName = COOs[upperCaseCC]}
<h3>
{optionCategory + " : " + (COOName || "")}
{`${optionCategory} : ${fullCountryName || upperCaseCC || ''}`}
</h3>
{:else}
{@const categoryName =
optionCategory==="airing status"
? "Release Status"
: optionCategory==="shown score"
? "Shown Metric"
: optionCategory
}
<h3>
{optionCategory +
" : " +
(optionName || "")}
{`${categoryName} : ${optionName || ''}`}
</h3>
{/if}
{:else}
Expand Down
4 changes: 2 additions & 2 deletions src/js/workerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function getAnimeLoaderWorker() {
if (animeLoaderWorker) return animeLoaderWorker
if (animeLoaderWorkerPromise) return animeLoaderWorkerPromise
animeLoaderWorkerPromise = new Promise(async (resolve) => {
resolve(new Worker(await cacheRequest("./webapi/worker/animeLoader.js", 19921, "Checking existing List")))
resolve(new Worker(await cacheRequest("./webapi/worker/animeLoader.js", 19860, "Checking existing List")))
animeLoaderWorkerPromise = null
})
return animeLoaderWorkerPromise
Expand Down Expand Up @@ -243,7 +243,7 @@ function getAnimeManagerWorker() {
if (animeManagerWorker) return animeManagerWorker
if (animeManagerWorkerPromise) return animeManagerWorkerPromise
animeManagerWorkerPromise = new Promise(async (resolve) => {
resolve(new Worker(await cacheRequest("./webapi/worker/animeManager.js", 58868, "Updating the List")))
resolve(new Worker(await cacheRequest("./webapi/worker/animeManager.js", 60115, "Updating the List")))
animeManagerWorkerPromise = null
})
return animeManagerWorkerPromise
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = 433;
const version = 434;
let webVersionPromise
export default async function getWebVersion() {
if (webVersionPromise) return webVersionPromise
Expand Down

0 comments on commit e848992

Please sign in to comment.