Merge pull request #145 from PretendoNetwork/feature-profile-edit-stub

Made it more clear which account features work currently
This commit is contained in:
Jonathan Barrow 2022-09-18 08:58:17 -04:00 committed by GitHub
commit 4452ff6fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 3 deletions

View File

@ -1,5 +1,4 @@
/* Removing until it's done */
.setting-card a.edit,
.sign-in-history a {
display: none;
}
@ -173,6 +172,9 @@
background: var(--bg-shade-3);
color: var(--text-shade-3);
}
.setting-card .edit svg {
pointer-events: none;
}
.setting-card .header {
color: var(--text-shade-3);
@ -339,4 +341,4 @@ footer {
.setting-card .setting-list {
grid-template-columns: auto;
}
}
}

View File

@ -26,6 +26,9 @@ const onlineFilesModalButtonConfirm = document.getElementById('onlineFilesConfir
const onlineFilesModalButtonClose = document.getElementById('onlineFilesCloseButton');
const onlineFilesModalPasswordInput = document.getElementById('password');
const editSettingsModal = document.querySelector('.modal-wrapper#edit-settings');
const editSettingsModalButtonClose = document.getElementById('editSettingsCloseButton');
document.getElementById('download-cemu-files')?.addEventListener('click', event => {
event.preventDefault();
@ -59,3 +62,15 @@ onlineFilesModalButtonConfirm?.addEventListener('click', () => {
onlineFilesModalButtonClose?.addEventListener('click', () => {
onlineFilesModal.classList.add('hidden');
});
editSettingsModalButtonClose?.addEventListener('click', () => {
editSettingsModal.classList.add('hidden');
});
document.addEventListener('click', event => {
if (event.target.classList.contains('edit')) {
event.preventDefault();
editSettingsModal.classList.remove('hidden');
}
});

View File

@ -125,6 +125,7 @@
<div class="setting-card sign-in-history">
<h2 class="header">{{ localeHelper locale "account.settings.settingCards.signInHistory" }}</h2>
<p>Sign in history not currently tracked. Check back again later</p>
<ul class="setting-list">
{{#each account.devices }}
<li>
@ -151,17 +152,19 @@
<div class="setting-card">
<h2 class="header">{{ localeHelper locale "account.settings.settingCards.newsletter" }}</h2>
<p>Newsletter not currently available. Check back again later</p>
<!--
<form id="other">
<input type="checkbox" id="marketing" name="marketing" {{#if account.flags.marketing}}checked{{/if}}>
<label for="marketing">{{ localeHelper locale "account.settings.settingCards.newsletterPrompt" }}</label>
</form>
-->
</div>
</div>
</div>
{{> footer }}
</div>
{{#if success_message}}
<div class="banner-notice success">
<div>
@ -190,4 +193,15 @@
</div>
</div>
<!-- TODO: Localize this -->
<div class="modal-wrapper hidden" id="edit-settings">
<div class="modal">
<h1 class="title dot">Unavailable</h1>
<p class="modal-caption">Editing PNID settings from user dashboard is currently unavailable. Please update user settings from your linked game console</p>
<div class="modal-button-wrapper">
<button class="button primary confirm" id="editSettingsCloseButton">Close</button>
</div>
</div>
</div>
<script src="/assets/js/account.js"></script>