Skip to content

Commit

Permalink
version 0.50.8
Browse files Browse the repository at this point in the history
  • Loading branch information
FriendsOfGalaxy committed May 22, 2020
1 parent f8212fe commit ddc594d
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 105 deletions.
19 changes: 13 additions & 6 deletions src/custom_login/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ TO REDUCE SIZE. IF YOU HAVE ANY PROBLEMS WITH MISSING CHARS THEN INCLUDE ORIGINA

/* CONTAINERS */

html, body {
height: 100%;
}

body {
font-family: "LatoWeb", sans-serif;
font-size: 16px;
Expand All @@ -91,9 +95,14 @@ body {
}

.container {
position: absolute;
width: 450px;
height: 419px;
display: flex;
height: 100%;
width: 100%;
}

.content {
display: flex;
flex-flow: column;
background: #2c2b2e;
border-radius: 5px;
width: 100%;
Expand All @@ -118,12 +127,10 @@ body {
padding: 30px;
height: 269px;
display: flex;
flex-grow: 1;
}

.main-footer {
position: absolute;
bottom: 0;
width: 100%;
height: 76px;
display: flex;
justify-content: space-between;
Expand Down
194 changes: 98 additions & 96 deletions src/custom_login/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,103 +11,105 @@

<body>
<div class="container">
<header class="main-header">
<div class="main-header__container">
<img class="steam-logo-icon" src="img/icon-steam-logo.svg" alt="Steam logo">
<div class="main-header__title">
<h1 class="title">Connect with Steam</h1>
<p class="subtitle">To an existing Steam account</p>
</div>
</div>
<div class="main-header__container padlock-icon-container">
<svg class="padlock-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15">
<g fill-rule="evenodd">
<path d="M7.5 0c2 0 3.5 1.6 3.5 3.5V5h1a2 2 0 012 2v6a2 2 0 01-2 2H3a2 2 0 01-2-2V7c0-1.1.9-2 2-2h1V3.5C4 1.5 5.6 0 7.5 0zm0 8c-.2 0-.4.2-.5.4v3.1a.5.5 0 001 0v-3c0-.3-.2-.5-.5-.5zm0-7C6.2 1 5.1 2 5 3.3V5h5V3.5C10 2.2 9 1.1 7.7 1h-.2z"/>
</g>
</svg>
<span class="tooltip">GOG Galaxy does not hold your data. Your login and password will be sent as encrypted data to Steam servers.</span>
</div>
</header>
<section class="main-content">
<form id="main-form" class="main-form" action="/" method="GET">
<fieldset id="loginFieldset" style="display: none;">
<legend>Login with your Steam account below to access your Steam games and friends from GOG Galaxy.</legend>
<div class="field-group">
<label for="step-1-username">Steam username</label>
<input class="basic-input login-input" type="text" id="step-1-username" name="username" disabled="disabled">
</div>
<div class="field-group">
<label for="step-1-password">Password</label>
<input class="basic-input login-input" type="password" id="step-1-password" name="password" disabled="disabled">
</div>
</fieldset>
<fieldset id="loginErrorFieldset" style="display: none;">
<legend>Login with your Steam account below to access your Steam games and friends from GOG Galaxy.</legend>
<div class="field-group">
<label for="step-2-username">Steam username</label>
<input class="basic-input login-input errored" type="text" id="step-2-username" name="username" disabled="disabled">
</div>
<div class="field-group relative">
<label for="step-2-password-errored">Password</label>
<input class="basic-input login-input errored" type="password" id="step-2-password-errored" name="password" disabled="disabled">
<div class="show-password"></div>
</div>
<p class="error-message">
<img src="img/icon-error.svg" alt="" class="error-icon"> You have entered your password or account name incorrectly. Please check your password and account name and try again.
</p>
</fieldset>
<fieldset id="steamGuardFieldset" style="display: none;">
<legend>Enter a special access code (Steam Guard) that was sent to your email address from Steam Support.</legend>
<div class="field-group field-group--no-justify">
<label for="step-1-code">Steam Guard code</label>
<input class="basic-input steam-guard-input" type="text" id="step-1-code" name="code" disabled="disabled">
</div>
<p class="resend-code">Haven’t received the email from Steam Support?
<a href="/two_factor_mail_finished?resend=True" class="resend-button">Resend it.</a>
</p>
</fieldset>
<fieldset id="steamGuardErrorFieldset" style="display: none;">
<legend>Enter a special access code (Steam Guard) that was sent to your email address from Steam Support.</legend>
<div class="field-group field-group--no-justify">
<label for="step-2-code">Steam Guard code</label>
<input class="basic-input steam-guard-input errored" type="text" id="step-2-code" name="code" disabled="disabled">
<div class="content">
<header class="main-header">
<div class="main-header__container">
<img class="steam-logo-icon" src="img/icon-steam-logo.svg" alt="Steam logo">
<div class="main-header__title">
<h1 class="title">Connect with Steam</h1>
<p class="subtitle">To an existing Steam account</p>
</div>
<p class="resend-code">Haven’t received the email from Steam Support?
<a href="/two_factor_mail_finished?resend=True" class="resend-button">Resend it.</a>
</p>
<p class="error-message error-message--centered">
<img src="img/icon-error.svg" alt="" class="error-icon"> Invalid code
</p>
</fieldset>
<fieldset id="steamAuthenticatorFieldset" style="display: none;">
<legend>As an additional security measure, you’ll need to enter the current Steam Guard code from the Steam
Mobile Authenticator on your phone.</legend>
<div class="field-group field-group--no-justify">
<label for="step-3-code">Steam Guard code</label>
<input class="basic-input steam-guard-input" type="text" id="step-3-code" name="code" disabled="disabled">
</div>
</fieldset>
<fieldset id="steamAuthenticatorErrorFieldset" style="display: none;">
<legend>As an additional security measure, you’ll need to enter the current Steam Guard code from the Steam
Mobile Authenticator on your phone.</legend>
<div class="field-group field-group--no-justify">
<label for="step-4-code">Steam Guard code</label>
<input class="basic-input steam-guard-input errored" type="text" id="step-4-code" name="code" disabled="disabled">
</div>
<p class="error-message error-message--centered">
<img src="img/icon-error.svg" alt="" class="error-icon"> Invalid code
</p>
</fieldset>
</form>
</section>
<footer class="main-footer">
<div class="main-footer__container">
<a class="forgot-password" href="https://help.steampowered.com/en/wizard/HelpWithLogin" target="_blank">Forgot your password?</a>
</div>
<div class="main-footer__container">
<button class="basic-button main-footer__button main-footer__button--primary" type="submit" form="main-form">Continue</button>
</div>
</footer>
</div>
<div class="main-header__container padlock-icon-container">
<svg class="padlock-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15">
<g fill-rule="evenodd">
<path d="M7.5 0c2 0 3.5 1.6 3.5 3.5V5h1a2 2 0 012 2v6a2 2 0 01-2 2H3a2 2 0 01-2-2V7c0-1.1.9-2 2-2h1V3.5C4 1.5 5.6 0 7.5 0zm0 8c-.2 0-.4.2-.5.4v3.1a.5.5 0 001 0v-3c0-.3-.2-.5-.5-.5zm0-7C6.2 1 5.1 2 5 3.3V5h5V3.5C10 2.2 9 1.1 7.7 1h-.2z"/>
</g>
</svg>
<span class="tooltip">GOG Galaxy does not hold your data. Your login and password will be sent as encrypted data to Steam servers.</span>
</div>
</header>
<section class="main-content">
<form id="main-form" class="main-form" action="/" method="GET">
<fieldset id="loginFieldset" style="display: none;">
<legend>Login with your Steam account below to access your Steam games and friends from GOG Galaxy.</legend>
<div class="field-group">
<label for="step-1-username">Steam username</label>
<input class="basic-input login-input" type="text" id="step-1-username" name="username" disabled="disabled">
</div>
<div class="field-group">
<label for="step-1-password">Password</label>
<input class="basic-input login-input" type="password" id="step-1-password" name="password" disabled="disabled">
</div>
</fieldset>
<fieldset id="loginErrorFieldset" style="display: none;">
<legend>Login with your Steam account below to access your Steam games and friends from GOG Galaxy.</legend>
<div class="field-group">
<label for="step-2-username">Steam username</label>
<input class="basic-input login-input errored" type="text" id="step-2-username" name="username" disabled="disabled">
</div>
<div class="field-group relative">
<label for="step-2-password-errored">Password</label>
<input class="basic-input login-input errored" type="password" id="step-2-password-errored" name="password" disabled="disabled">
<div class="show-password"></div>
</div>
<p class="error-message">
<img src="img/icon-error.svg" alt="" class="error-icon"> You have entered your password or account name incorrectly. Please check your password and account name and try again.
</p>
</fieldset>
<fieldset id="steamGuardFieldset" style="display: none;">
<legend>Enter a special access code (Steam Guard) that was sent to your email address from Steam Support.</legend>
<div class="field-group field-group--no-justify">
<label for="step-1-code">Steam Guard code</label>
<input class="basic-input steam-guard-input" type="text" id="step-1-code" name="code" disabled="disabled">
</div>
<p class="resend-code">Haven’t received the email from Steam Support?
<a href="/two_factor_mail_finished?resend=True" class="resend-button">Resend it.</a>
</p>
</fieldset>
<fieldset id="steamGuardErrorFieldset" style="display: none;">
<legend>Enter a special access code (Steam Guard) that was sent to your email address from Steam Support.</legend>
<div class="field-group field-group--no-justify">
<label for="step-2-code">Steam Guard code</label>
<input class="basic-input steam-guard-input errored" type="text" id="step-2-code" name="code" disabled="disabled">
</div>
<p class="resend-code">Haven’t received the email from Steam Support?
<a href="/two_factor_mail_finished?resend=True" class="resend-button">Resend it.</a>
</p>
<p class="error-message error-message--centered">
<img src="img/icon-error.svg" alt="" class="error-icon"> Invalid code
</p>
</fieldset>
<fieldset id="steamAuthenticatorFieldset" style="display: none;">
<legend>As an additional security measure, you’ll need to enter the current Steam Guard code from the Steam
Mobile Authenticator on your phone.</legend>
<div class="field-group field-group--no-justify">
<label for="step-3-code">Steam Guard code</label>
<input class="basic-input steam-guard-input" type="text" id="step-3-code" name="code" disabled="disabled">
</div>
</fieldset>
<fieldset id="steamAuthenticatorErrorFieldset" style="display: none;">
<legend>As an additional security measure, you’ll need to enter the current Steam Guard code from the Steam
Mobile Authenticator on your phone.</legend>
<div class="field-group field-group--no-justify">
<label for="step-4-code">Steam Guard code</label>
<input class="basic-input steam-guard-input errored" type="text" id="step-4-code" name="code" disabled="disabled">
</div>
<p class="error-message error-message--centered">
<img src="img/icon-error.svg" alt="" class="error-icon"> Invalid code
</p>
</fieldset>
</form>
</section>
<footer class="main-footer">
<div class="main-footer__container">
<a class="forgot-password" href="https://help.steampowered.com/en/wizard/HelpWithLogin" target="_blank">Forgot your password?</a>
</div>
<div class="main-footer__container">
<button class="basic-button main-footer__button main-footer__button--primary" type="submit" form="main-form">Continue</button>
</div>
</footer>
</div>
</div>
<script>
// Toggling password visibility
Expand Down
12 changes: 11 additions & 1 deletion src/games_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ def get_package_ids(self):
def get_resolved_packages(self):
if not self._storing_map:
return []
return [package_id for package_id in self._storing_map['licenses'] if self._storing_map['licenses'][package_id]['apps']]
resolved_package_ids = []
for package_id in self._storing_map['licenses']:
all_apps_resolved = True
if not self._storing_map['licenses'][package_id]['apps']:
continue
for appid in self._storing_map['licenses'][package_id]['apps']:
if not self._storing_map['licenses'][package_id]['apps'][appid]:
all_apps_resolved = False
if all_apps_resolved:
resolved_package_ids.append(package_id)
return resolved_package_ids

def update_packages(self, package_id):
self._parsing_status['packages'] -= 1
Expand Down
9 changes: 8 additions & 1 deletion src/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def presence_from_user_info(user_info: ProtoUserInfo, translations_cache:

status = None
if user_info.rich_presence is not None:
logger.info(f"Attempting to resolve rich presence from {user_info}")
check_for_params = r"%.*%"
status = user_info.rich_presence.get("steam_display")
if not status:
Expand All @@ -49,7 +50,13 @@ async def presence_from_user_info(user_info: ProtoUserInfo, translations_cache:
async def translate_presence(user_info, status):
token_list = translations_cache[int(game_id)]
replaced = True
max_depth = 10
current_depth = 0
while replaced:
if current_depth >= max_depth:
logger.info(f"Unable to resolve rich presence translation for {user_info}")
return None
current_depth +=1
replaced = False

params = user_info.rich_presence.keys()
Expand All @@ -72,7 +79,7 @@ async def translate_presence(user_info, status):
return status

try:
status = await asyncio.wait_for(translate_presence(user_info,status), 1)
status = await asyncio.wait_for(translate_presence(user_info,status), timeout=1)
except asyncio.TimeoutError:
logger.info(f"Timed out translating presence {user_info.rich_presence} using {translations_cache[int(game_id)]}")
status = None
Expand Down
6 changes: 5 additions & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
__version__ = "0.50.7"
__version__ = "0.50.8"
__changelog__ = {
"0.50.8":'''
- Fix crash on potential looping rich presence translation
- Fix possible 0 owned games sent issue occuring if previous retrieval was stopped mid-way
''',
"0.50.7":'''
- Use LoginKeyAccepted message post auth
- Retry using servers from a different cellid (update login params to handle cell id)
Expand Down

0 comments on commit ddc594d

Please sign in to comment.