Update wish counter

This commit is contained in:
Made Baruna 2021-11-24 14:41:18 +07:00
parent 74f54f1e96
commit 3f27afd503
No known key found for this signature in database
GPG key ID: 5AA5DA16AA5DCEAD
14 changed files with 1146 additions and 32 deletions

View file

@ -12,6 +12,7 @@
export let placeholder = 'Select...';
export let multiselect = false;
export let image = false;
export let disabled = false;
export let selected = null;
export let selectedMulti = new Set();
@ -106,7 +107,10 @@
<div class={`select-none relative ${className}`} bind:this={container}>
<button
class={`flex w-full relative items-center px-4 bg-background rounded-2xl h-14 focus:outline-none focus:border-primary border-2 border-transparent ease-in duration-100 ${classes}`}
class="flex w-full relative items-center px-4 bg-background rounded-2xl h-14 focus:outline-none focus:border-primary border-2 border-transparent ease-in duration-100 {disabled
? 'cursor-not-allowed'
: 'cursor-pointer'} {classes}"
{disabled}
on:click={toggleOptions}
>
{#if icon}

View file

@ -231,6 +231,28 @@ export const banners = {
featured: ['hu_tao'],
featuredRare: ['thoma', 'diona', 'sayu'],
},
{
name: 'Secretum Secretorum',
image: 2,
shortName: 'Albedo',
start: '2021-11-24 06:00:00',
end: '2021-12-14 17:59:59',
color: '#FFFAF5',
featured: ['albedo', 'eula'],
featuredRare: ['rosaria', 'noelle', 'bennett'],
timezoneDependent: true,
},
// {
// name: 'Born of Ocean Swell',
// image: 2,
// shortName: 'Eula',
// start: '2021-11-24 06:00:00',
// end: '2021-12-14 17:59:59',
// color: '#E7F9FF',
// featured: ['eula'],
// featuredRare: ['rosaria', 'noelle', 'bennett'],
// timezoneDependent: true,
// },
],
weapons: [
{
@ -435,5 +457,16 @@ export const banners = {
featured: ['staff_of_homa', 'elegy_for_the_end'],
featuredRare: ['wavebreakers_fin', 'mouuns_moon', 'sacrificial_sword', 'rainslasher', 'the_widsith'],
},
{
name: 'Epitome Invocation',
image: 21,
start: '2021-11-24 06:00:00',
end: '2021-12-14 17:59:59',
shortName: 'Freedom',
color: '#b042f5',
featured: ['freedom-sworn', 'song_of_broken_pines'],
featuredRare: ['wine_and_song', 'alley_hunter', 'lions_roar', 'sacrificial_greatsword', 'dragons_bane'],
timezoneDependent: true,
},
],
};

View file

@ -100,7 +100,6 @@ export const eventsData = [
color: '#dfe9f2',
url: 'https://www.hoyolab.com/article/1432656',
showOnHome: true,
timezoneDependent: true,
},
],
[

View file

@ -143,6 +143,9 @@
"import": {
"title": "Import Wish History",
"faqsButton": "FAQ - READ FIRST",
"readFaq": "Read the FAQ",
"openFaq": "Open FAQ",
"choosePlatform": "Choose your platform",
"nonew": "No New Wishes",
"importNotice1": "Imported wishes will be appended or replaced accordingly to existing data",
"importNotice2": "If you don't have any data saved before, first wish will be counted as pity 1",
@ -162,9 +165,11 @@
"close": "Close",
"invalidLink": "Invalid link, please check it again",
"errorApi": "Error code returned from MiHoYo API, please try again later!",
"errorExpired": "Link expired, please try again!",
"timeout": "Connection timeout, please wait a moment and try again later",
"differentAccount": "This wish history is for another account, please separate your account first on Settings menu!",
"invalidData": "Invalid data returned from API, try again later",
"noNewData": "There is no new wish, please wait about 1 hour for the wish data to update!",
"success": "Import success 😀!",
"server": "Select your server:",
"wishTallyCheck": "Submit pity for global wish tally",
@ -212,6 +217,20 @@
"Copy & paste the link to the textbox below",
"Paste link here... https://webstatic..."
],
"pc2": [
"Open Genshin Impact in this PC",
"Then open the wish history and wait it to load",
"Open Start, then search for Powershell",
"Open Windows Powershell, then copy & paste the script below to the Powershell",
"iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/7eab70647f4ed902cfab84779588cc8dac5177f8/getlink_global.ps1'))",
"iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/7eab70647f4ed902cfab84779588cc8dac5177f8/getlink_china.ps1'))",
"You can review the script",
"here",
"https://gist.github.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235",
"Press ENTER then a link will copied to your clipboard",
"Paste the text to the textbox below",
"Paste the link here... https://webstatic..."
],
"android": [
"Open Wish (in the game)",
"Press History",
@ -235,6 +254,7 @@
"Paste link here... https://genshin.mihoyo..."
],
"ps": [
"The steps below might be not working, you can link your PS account with miHoYo account then use the pc/mobile instruction",
"You can only use this importer if you have an in-game mail with QR Code to open the web event",
"Open Genshin Impact on your PlayStation",
"Open the event mail that contains the QR Code",

View file

@ -36,6 +36,7 @@
{ label: 'Asia/TW/HK/MO', value: 'Asia' },
{ label: 'America', value: 'America' },
{ label: 'Europe', value: 'Europe' },
{ label: 'China', value: 'China' },
];
let mounted = false;

View file

@ -0,0 +1,51 @@
<script>
import { t } from 'svelte-i18n';
import Button from '../../components/Button.svelte';
export let close;
</script>
<h1 class="font-display text-white text-xl mb-2">{$t('wish.import.faqs.title')}</h1>
<div class="font-body">
<p class="text-white font-semibold">{$t('wish.import.faqs.q1')}</p>
<p class="text-gray-400">{$t('wish.import.faqs.a1')}</p>
<p class="text-white font-semibold mt-4">{$t('wish.import.faqs.q2')}</p>
<p class="text-gray-400">{$t('wish.import.faqs.a2')}</p>
<p class="text-white font-semibold mt-4">{$t('wish.import.faqs.q3')}</p>
<p class="text-gray-400">
{$t('wish.import.faqs.a3.0')}
<a class="text-primary hover:underline" target="_blank" href="https://github.com/MadeBaruna/paimon-moe">
Github
</a>{$t('wish.import.faqs.a3.1')}
</p>
<p class="text-white font-semibold mt-4">{$t('wish.import.faqs.q4')}</p>
<p class="text-gray-400">
{$t('wish.import.faqs.a4.0')}
<a
class="text-primary hover:underline"
href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"
target="_blank"
>
CORS
</a>{$t('wish.import.faqs.a4.1')}
<a class="text-primary hover:underline" href="https://github.com/MadeBaruna/paimon-moe-api" target="_blank">
{$t('wish.import.faqs.a4.2')}
</a>
</p>
<p class="text-white font-semibold mt-4">{$t('wish.import.faqs.q5')}</p>
<p class="text-gray-400">
{$t('wish.import.faqs.a5.0')}
<a class="text-primary hover:underline" href="/privacy-policy" target="_blank">{$t('wish.import.faqs.a5.1')}</a>
{$t('wish.import.faqs.a5.2')}
{$t('wish.import.faqs.a5.3')}
</p>
<p class="text-white font-semibold mt-4">{$t('wish.import.faqs.q6')}</p>
<p class="text-gray-400">{$t('wish.import.faqs.a6')}</p>
<p class="text-white font-semibold mt-4">{$t('wish.import.faqs.q7')}</p>
<p class="text-gray-400">{$t('wish.import.faqs.a7')}</p>
</div>
<div class="flex justify-end mt-4">
<Button on:click={close}>{$t('wish.import.close')}</Button>
</div>

View file

@ -36,7 +36,7 @@
openModal(
ExcelImportModal,
{
closeModal: closeImportModal
closeModal: closeImportModal,
},
{
closeButton: false,
@ -46,7 +46,6 @@
}
$: enableManual, toggleManual();
</script>
<div>

File diff suppressed because it is too large Load diff

View file

@ -25,7 +25,6 @@
let counter2;
let counter3;
let counter4;
let summary;
const path = 'wish-counter-setting';
@ -103,21 +102,6 @@
);
}
function openImport() {
openModal(
ImportModal,
{
closeModal: closeImportModal,
processFirstTimePopup,
},
{
closeButton: false,
closeOnOuterClick: false,
styleWindow: { background: '#25294A', width: '800px' },
},
);
}
function closeImportModal() {
closeModal();
counter1.readLocalData();
@ -143,10 +127,12 @@
<div class="flex flex-wrap">
<h1 class="font-display font-black text-5xl text-white text-center md:text-left md:mr-4">{$t('wish.title')}</h1>
<div class="flex items-center">
<Button className="mr-2 hidden md:block" on:click={openImport}>
<Icon size={0.8} path={mdiDatabaseImport} />
{$t('wish.autoImport')}
</Button>
<a href="/wish/import">
<Button className="mr-2 hidden md:block">
<Icon size={0.8} path={mdiDatabaseImport} />
{$t('wish.autoImport')}
</Button>
</a>
{#if settings.manualInput}
<Button on:click={openHowTo} className="mr-2 hidden md:block">
<Icon size={0.8} path={mdiHelpCircle} />
@ -163,10 +149,12 @@
<Ad type="desktop" variant="lb" id="1" />
</div>
<div class="md:hidden flex flex-wrap justify-center">
<Button className="m-1" on:click={openImport}>
<Icon size={0.8} path={mdiDatabaseImport} />
{$t('wish.autoImport')}
</Button>
<a href="/wish/import">
<Button className="m-1">
<Icon size={0.8} path={mdiDatabaseImport} />
{$t('wish.autoImport')}
</Button>
</a>
{#if settings.manualInput}
<Button className="m-1" on:click={openHowTo}>
<Icon size={0.8} path={mdiHelpCircle} />
@ -203,7 +191,7 @@
<Ad type="mobile" variant="mpu" id="1" />
</div>
</div>
<Summary bind:this={summary} bind:monthlyData />
<Summary bind:monthlyData />
</div>
<div class="hidden md:flex flex-1">
<Ad class="ml-4" type="desktop" variant="mpu" id="1" />

View file

@ -13,6 +13,7 @@ export const loading = writable(true);
const timeOffset = {
Asia: 8,
China: 8,
America: -5,
Europe: 1,
};

Binary file not shown.

After

(image error) Size: 868 KiB

Binary file not shown.

After

(image error) Size: 588 KiB

Binary file not shown.

After

(image error) Size: 837 KiB

View file

@ -1261,9 +1261,9 @@ camelcase-css@^2.0.1:
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001135, caniuse-lite@^1.0.30001137:
version "1.0.30001208"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz"
integrity sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==
version "1.0.30001282"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz"
integrity sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg==
chainsaw@~0.1.0:
version "0.1.0"