Skip to content

Commit a0c696b

Browse files
committed
typo
1 parent 781146b commit a0c696b

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

spx-gui/src/components/editor/EditorHomepage.vue

+10-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
<div v-else-if="error != null">
1212
{{ _t(error.userMessage) }}
1313
</div>
14-
<EditorContextProvider v-else-if="project != null" :project="project" :user-info="userStore.userInfo">
14+
<EditorContextProvider
15+
v-else-if="project != null"
16+
:project="project"
17+
:user-info="userStore.userInfo"
18+
>
1519
<ProjectEditor />
1620
</EditorContextProvider>
1721
<div v-else>TODO</div>
@@ -56,7 +60,11 @@ const projectName = computed(
5660
() => router.currentRoute.value.params.projectName as string | undefined
5761
)
5862
59-
const { data: project, isFetching: isLoading, error } = useQuery(
63+
const {
64+
data: project,
65+
isFetching: isLoading,
66+
error
67+
} = useQuery(
6068
async () => {
6169
if (userStore.userInfo == null) return null
6270
if (projectName.value == null) return null

spx-gui/src/models/sound.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ export class Sound {
6565

6666
static async loadAll(files: Files) {
6767
const soundNames = listDirs(files, soundAssetPath)
68-
const sounds = (await Promise.all(
69-
soundNames.map(async (soundName) => {
70-
const sound = await Sound.load(soundName, files)
71-
if (sound == null) console.warn('failed to load sound:', soundName)
72-
return sound
73-
})
74-
)).filter(s => !!s) as Sound[]
68+
const sounds = (
69+
await Promise.all(
70+
soundNames.map(async (soundName) => {
71+
const sound = await Sound.load(soundName, files)
72+
if (sound == null) console.warn('failed to load sound:', soundName)
73+
return sound
74+
})
75+
)
76+
).filter((s) => !!s) as Sound[]
7577
return sounds
7678
}
7779

spx-gui/src/models/sprite.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,15 @@ export class Sprite extends Disposble {
161161

162162
static async loadAll(files: Files) {
163163
const spriteNames = listDirs(files, spriteAssetPath)
164-
const sprites = (await Promise.all(
165-
spriteNames.map(async (spriteName) => {
166-
const sprite = await Sprite.load(spriteName, files)
167-
if (sprite == null) console.warn('failed to load sprite:', spriteName)
168-
return sprite
169-
})
170-
)).filter(s => !!s) as Sprite[]
164+
const sprites = (
165+
await Promise.all(
166+
spriteNames.map(async (spriteName) => {
167+
const sprite = await Sprite.load(spriteName, files)
168+
if (sprite == null) console.warn('failed to load sprite:', spriteName)
169+
return sprite
170+
})
171+
)
172+
).filter((s) => !!s) as Sprite[]
171173
return sprites
172174
}
173175

spx-gui/src/utils/path.test.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ describe('stripExt', () => {
3232
})
3333
it('should work well with url', () => {
3434
expect(stripExt('https://test.com/abc.txt')).toBe('https://test.com/abc')
35-
expect(stripExt('https://test.com/foo/%E4%B8%AD%E6%96%87.png')).toBe('https://test.com/foo/%E4%B8%AD%E6%96%87')
35+
expect(stripExt('https://test.com/foo/%E4%B8%AD%E6%96%87.png')).toBe(
36+
'https://test.com/foo/%E4%B8%AD%E6%96%87'
37+
)
3638
})
3739
it('should work well with no ext', () => {
3840
expect(stripExt('abc')).toBe('abc')
@@ -44,4 +46,4 @@ describe('stripExt', () => {
4446
expect(stripExt('foo/.cache/abc.d.ts')).toBe('foo/.cache/abc.d')
4547
expect(stripExt('/foo/bar/.gitignore')).toBe('/foo/bar/.gitignore')
4648
})
47-
})
49+
})

0 commit comments

Comments
 (0)