-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1325 from unleashurgeek/main_ui_fixes
Various main UI minor changes
- Loading branch information
Showing
11 changed files
with
141 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"/api": { | ||
"target": "http://localhost:3030" | ||
"target": "https://gcsim.app", | ||
"changeOrigin": true, | ||
"autoRewrite": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { Callout } from "@blueprintjs/core"; | ||
import { useTranslation } from "react-i18next"; | ||
//@ts-ignore | ||
import DiscordLogo from "./Footer/discord-icon.svg"; | ||
import { SimResults } from "./Viewer/DataType"; | ||
|
||
|
||
export const AnnouncementBanner = ({}) => { | ||
const { t } = useTranslation(); | ||
|
||
const link = ( | ||
<a href="https://discord.gg/m7jvjdxx7q" target="_blank"> | ||
<img | ||
src={DiscordLogo} | ||
alt="Discord Logo" | ||
className="inline object-contain h-[18px]" | ||
/> | ||
{' '} discord | ||
</a> | ||
); | ||
|
||
const title = t("game:character_names.dehya") + " and " + t("game:character_names.mika") + " now available!" | ||
|
||
return ( | ||
<Callout intent="primary" title={title} className="mt-4"> | ||
<div> | ||
Visit the {link} for detailed release notes | ||
</div> | ||
</Callout> | ||
); | ||
} | ||
|
||
export const EarlyReleaseBanner = ({ data }: { data: SimResults }) => { | ||
const { t } = useTranslation(); | ||
|
||
if (data.incomplete_chars == null || data.incomplete_chars.length == 0) { | ||
return null; | ||
} | ||
|
||
const link = ( | ||
<a href="https://discord.gg/m7jvjdxx7q" target="_blank"> | ||
<img | ||
src={DiscordLogo} | ||
alt="Discord Logo" | ||
className="inline object-contain h-[18px]" | ||
/> | ||
{' '} gcsim discord! | ||
</a> | ||
); | ||
|
||
return ( | ||
<div className="flex flex-col items-center"> | ||
<Callout intent="warning" title="Early Release Characters" className="mb-4 max-w-2xl"> | ||
<p> | ||
This simulation contains early release characters! These characters are fully implemented, | ||
but may not have optimal frame data aligned with in-game animations. We are actively | ||
collecting data to improve their implementation. If you wish to help, | ||
please reach out in the {link} | ||
</p> | ||
<div className="flex flex-col justify-start gap-1 text-xs font-mono text-gray-400"> | ||
<span className="font-bold text-sm font-sans "> | ||
DB submissions for these characters will be disabled until frames are updated: | ||
</span> | ||
<ul className="list-disc pl-4 grid grid-cols-1 gap-x-3 justify-start"> | ||
{data.incomplete_chars?.map((c) => ( | ||
<div className="list-item">{t('game:character_names.' + c)}</div> | ||
))} | ||
</ul> | ||
</div> | ||
</Callout> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package result | ||
|
||
import ( | ||
"github.com/genshinsim/gcsim/pkg/core/keys" | ||
) | ||
|
||
// adding a character to this list will make the "incomplete warning" appear on the viewer | ||
var incompleteCharacters = []keys.Char{ | ||
keys.TestCharDoNotUse, | ||
} | ||
|
||
func IsCharacterComplete(char keys.Char) bool { | ||
for _, v := range incompleteCharacters { | ||
if v == char { | ||
return false | ||
} | ||
} | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters