Skip to content

Commit

Permalink
Merge branch 'hostnames-for-public' into public
Browse files Browse the repository at this point in the history
  • Loading branch information
Istador committed Oct 6, 2023
2 parents 3132645 + 8a01ab4 commit 2af7c1c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
4 changes: 0 additions & 4 deletions src/views/faq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ export default class FAQ extends Vue {
<b-icon flip-h icon="hand-thumbs-down" class="text-danger"/>
Inaccurate emulation might cause graphical glitches and bugs.
</li>
<li>
<b-icon flip-h icon="hand-thumbs-down" class="text-danger"/>
Using DNS hostnames instead of IPv4 addresses to connect to a SMOO server doesn't work.
</li>
<li>
<b-icon flip-h icon="hand-thumbs-down" class="text-danger"/>
You have to select a network adapter in the settings and might chose the wrong one.
Expand Down
4 changes: 2 additions & 2 deletions src/views/play/test.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h5>Test that it works</h5>
<p>
When starting the game with the mod for the first time a keyboard dialog should pop up before the main menu asking for a server IP.
Choose one of the <a-int name="servers">public servers</a-int> and type in its IPv4 address.
Choose one of the <a-int name="servers">public servers</a-int> and type in its hostname.
<b-icon icon="info-circle-fill" :id="'play-test-hostname-' + _uid"/>
<b-tooltip :target="'play-test-hostname-' + _uid" triggers="hover">
<p>
Expand All @@ -16,7 +16,7 @@
<a-ext href="https://github.com/CraftyBoss/SuperMarioOdysseyOnline/releases/latest">later</a-ext>.
</p>
<p>
Entering hostnames doesn't work with the <a-int name="play" id="yuzu">yuzu</a-int> emulator.
Entering hostnames doesn't work with <a-int name="play" id="yuzu">yuzu</a-int> versions below <code>1499</code>.
</p>
</b-tooltip>
On version <code>v1.1.0</code> or later of the mod the game will also ask for the server port.
Expand Down
11 changes: 9 additions & 2 deletions src/views/play/yuzu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@
yuzu version.
<b-icon icon="info-circle-fill" id="play-yuzu-version"/>
<b-tooltip target="play-yuzu-version" triggers="hover">
yuzu should be at version <code>1114</code> or later.
The version is shown in the title of the window.
<p>
yuzu should be at least at version <code>1114</code> or later for the mod to work.
</p>
<p>
To use DNS hostnames as a server IP yuzu should be at version <code>1499</code> or later.
</p>
<p>
The version is shown in the title of the window.
</p>
</b-tooltip>
If you haven't, then please consult the yuzu
<a-ext href="https://yuzu-emu.org/help/quickstart/">Quickstart Guide</a-ext>
Expand Down
4 changes: 0 additions & 4 deletions src/views/servers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@
}
@media (min-width: 576px) {
.host::before { content: 'Host: '; }
.ip::before { content: 'IPv4: '; }
.port.default { display: block !important; }
}
.port::before { content: 'Port: '; }
.ip.dynamic::before { content: 'IPv4: '; }

.port.default { opacity: 0.5; display: none; &::before { opacity: 0.5; } }
.host + .ip { opacity: 0.5; &::before { opacity: 0.5; } }
.ip.dynamic > span { user-select: none; cursor: help; }
}

.td-location {
Expand Down
5 changes: 3 additions & 2 deletions src/views/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ export default class Servers extends Vue {
},
]

getIPv4 ({ host, port }: IHost) {
getIPv4 ({ host, port, ip }: IHost) {
const ipv4 = getIPv4({ host, port })
return (ipv4 ? 'IPv4: <code>' + ipv4 + '</code>' : '')
return (ipv4 ? 'IPv4: <code>' + (ip || ipv4) + '</code>' + (ip ? '' : ' (dynamic)') : '')
+ (ip && ip !== ipv4 ? '<br/>Changed to <code>' + ipv4 + '</code>?' : '')
}
}
21 changes: 7 additions & 14 deletions src/views/servers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,24 @@
<a-ext href="https://github.com/CraftyBoss/SuperMarioOdysseyOnline/releases/latest">later</a-ext>.
</p>
<p>
Entering hostnames doesn't work with the <a-int name="play" id="yuzu">yuzu</a-int> emulator.
Entering hostnames doesn't work with <a-int name="play" id="yuzu">yuzu</a-int> versions below <code>1499</code>.
</p>
</b-tooltip>
</template>

<template #cell(server)="{ item: { name, server: { host, ip, port }, link } }">
<div class="name"><b>{{ name }}</b></div>
<div class="host" v-if="host">
<a-ext v-if="link" :href="link">{{ host }}</a-ext>
<span v-else>{{ host }}</span>
</div>
<div class="ip" v-if="ip">{{ ip }}</div>
<div class="ip dynamic" v-if="!ip">
<b-badge
variant="secondary"
:id="'dynamic-ip-badge-' + host + '-' + port"
>
dynamic
</b-badge>
<span :id="'servers-ip-' + host + '-' + port">
<a-ext v-if="link" :href="link">{{ host }}</a-ext>
<span v-else>{{ host }}</span>
</span>
<b-tooltip
:target="'dynamic-ip-badge-' + host + '-' + port"
:target="'servers-ip-' + host + '-' + port"
placement="top"
boundary="viewport"
>
<span v-html="getIPv4({ host, port })"/>
<span v-html="getIPv4({ host, port, ip })"/>
</b-tooltip>
</div>
<div class="port" :class="{ 'default': (port || defaultPort) === defaultPort }">{{ port || defaultPort }}</div>
Expand Down

0 comments on commit 2af7c1c

Please sign in to comment.