mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-30 14:18:22 -05:00
Added support for changing the PNID country on Wii U
This commit is contained in:
@@ -22,6 +22,7 @@ const accountSettingsSchema = z.object({
|
||||
gender: z.enum(['M', 'F']),
|
||||
tz_name: z.string(),
|
||||
region: z.coerce.number(),
|
||||
country: z.string(),
|
||||
email: z.string().email(),
|
||||
server_selection: z.enum(['prod', 'test', 'dev']),
|
||||
marketing_flag: z.enum(['true', 'false']).transform((value) => value === 'true'),
|
||||
@@ -74,7 +75,8 @@ router.get('/ui/profile', async function (request: express.Request, response: ex
|
||||
face,
|
||||
notice,
|
||||
accountLevel,
|
||||
regions: region ? region.regions: []
|
||||
regions: region ? region.regions: [],
|
||||
regionsList
|
||||
});
|
||||
}
|
||||
catch (error: any) {
|
||||
@@ -160,6 +162,7 @@ router.post('/update', async function (request: express.Request, response: expre
|
||||
|
||||
pnid.gender = person.data.gender;
|
||||
pnid.region = region;
|
||||
pnid.country = person.data.country;
|
||||
pnid.timezone.name = timezoneName;
|
||||
pnid.timezone.offset = Number(timezone.utc_offset);
|
||||
pnid.flags.marketing = person.data.marketing_flag;
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
</div>
|
||||
<div class="group">
|
||||
<h2>Country</h2>
|
||||
<p class="content" id="country"><%= PNID.country %></p>
|
||||
<select name="country" id="country" onclick="warning()">
|
||||
<% for (let region of regionsList) { %>
|
||||
<option value="<%= region.iso_code %>" <% if (PNID.country === region.iso_code) { %>selected<% } %>><%= region.name %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="group">
|
||||
<h2>Region</h2>
|
||||
@@ -138,9 +142,17 @@
|
||||
</form>
|
||||
<% if (notice) { %>
|
||||
<script>
|
||||
alert('<%= notice %>');
|
||||
wiiuDialog.alert('<%= notice %>', 'OK');
|
||||
</script>
|
||||
<% } %>
|
||||
<script>
|
||||
var seen = false;
|
||||
function warning() {
|
||||
if(seen) return;
|
||||
seen = true;
|
||||
wiiuDialog.alert('Warning: Changing your country may cause unexpected results. You may need to re-link your PNID for the changes to apply. \n\nFor more information, see:\nhttps://pretendo.network/docs/errors/PAS-727-0001', 'I Understand');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user