mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-12 13:48:23 +09:00
Improve url visual (#2591)
* Use string interpolation * improve url visual * fix lint
This commit is contained in:
parent
c145c994a9
commit
99fbd60265
@ -12,6 +12,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { toUnicode as decodePunycode } from 'punycode';
|
||||
export default Vue.extend({
|
||||
props: ['url', 'target'],
|
||||
data() {
|
||||
@ -27,11 +28,11 @@ export default Vue.extend({
|
||||
created() {
|
||||
const url = new URL(this.url);
|
||||
this.schema = url.protocol;
|
||||
this.hostname = url.hostname;
|
||||
this.hostname = decodePunycode(url.hostname);
|
||||
this.port = url.port;
|
||||
this.pathname = url.pathname;
|
||||
this.query = url.search;
|
||||
this.hash = url.hash;
|
||||
this.pathname = decodeURIComponent(url.pathname);
|
||||
this.query = decodeURIComponent(url.search);
|
||||
this.hash = decodeURIComponent(url.hash);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user