refactor: import dialogs (#1187)

* refactor: import dialogs

* fix: world dialog z-index issue

* fix: world dialog z-index issue
This commit is contained in:
pa
2025-03-16 23:38:16 +09:00
committed by GitHub
parent 3cba74fd53
commit 6b6663f803
17 changed files with 1235 additions and 834 deletions

View File

@@ -4,7 +4,7 @@
<span v-show="text">
<span
:class="{ 'x-link': link && location !== 'private' && location !== 'offline' }"
@click="showWorldDialog">
@click="handleShowWorldDialog">
<i v-if="isTraveling" class="el-icon el-icon-loading" style="display: inline-block"></i>
<span>{{ text }}</span>
</span>
@@ -26,7 +26,8 @@
// not good idea, it's temporary
API: { default: window.API },
getWorldName: { default: window.$app?.getWorldName },
getGroupName: { default: window.$app?.getGroupName }
getGroupName: { default: window.$app?.getGroupName },
showWorldDialog: { default: window.$app?.showWorldDialog }
},
props: {
location: String,
@@ -122,7 +123,7 @@
}
this.strict = L.strict;
},
showWorldDialog() {
handleShowWorldDialog() {
if (this.link) {
let instanceId = this.location;
if (this.traveling && this.location === 'traveling') {
@@ -136,7 +137,7 @@
if (this.isOpenPreviousInstanceInfoDialog) {
this.$emit('open-previous-instance-info-dialog', instanceId);
} else {
this.API.$emit('SHOW_WORLD_DIALOG', instanceId);
this.showWorldDialog(instanceId);
}
}
},

View File

@@ -163,7 +163,7 @@
},
smallThumbnail() {
return (
this.localFavFakeRef.thumbnailImageUrl.replace('256', '64') ||
this.localFavFakeRef.thumbnailImageUrl.replace('256', '128') ||
this.localFavFakeRef.thumbnailImageUrl
);
}

View File

@@ -56,7 +56,7 @@
},
computed: {
smallThumbnail() {
return this.favorite.thumbnailImageUrl.replace('256', '64') || this.favorite.thumbnailImageUrl;
return this.favorite.thumbnailImageUrl.replace('256', '128') || this.favorite.thumbnailImageUrl;
}
},
methods: {

View File

@@ -244,7 +244,7 @@
export default {
name: 'FavoritesAvatarTab',
components: { FavoritesAvatarItem, FavoritesAvatarLocalHistoryItem, AvatarExportDialog },
inject: ['API'],
inject: ['API', 'showAvatarDialog'],
props: {
sortFavorites: Boolean,
hideTooltips: Boolean,
@@ -364,9 +364,6 @@
saveSortFavoritesOption() {
this.$emit('save-sort-favorites-option');
},
showAvatarDialog(id) {
this.$emit('show-avatar-dialog', id);
},
changeFavoriteGroupName(group) {
this.$emit('change-favorite-group-name', group);
},

View File

@@ -157,7 +157,7 @@
},
smallThumbnail() {
return (
this.localFavFakeRef.thumbnailImageUrl.replace('256', '64') ||
this.localFavFakeRef.thumbnailImageUrl.replace('256', '128') ||
this.localFavFakeRef.thumbnailImageUrl
);
}

View File

@@ -237,7 +237,7 @@
FavoritesWorldItem,
WorldExportDialog
},
inject: ['API'],
inject: ['API', 'showWorldDialog'],
props: {
sortFavorites: Boolean,
hideTooltips: Boolean,
@@ -428,9 +428,6 @@
changeFavoriteGroupName(group) {
this.$emit('change-favorite-group-name', group);
},
showWorldDialog(event) {
this.$emit('show-world-dialog', event);
},
newInstanceSelfInvite(event) {
this.$emit('new-instance-self-invite', event);
},