mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-18 05:23:57 +08:00
yas
This commit is contained in:
@@ -15,7 +15,7 @@ export const DevicePicker = {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hasDevices() { return this.devices.length > 0 },
|
||||
hasMultipleDevices() { return this.devices.length > 1 },
|
||||
},
|
||||
methods: {
|
||||
loadCustomNames() {
|
||||
@@ -89,7 +89,7 @@ export const DevicePicker = {
|
||||
this.loadDevices()
|
||||
},
|
||||
template: `
|
||||
<div v-if="!loading && hasDevices" class="gx-device-picker">
|
||||
<div v-if="!loading && hasMultipleDevices" class="gx-device-picker">
|
||||
<div class="gx-device-picker__heading">
|
||||
<div>
|
||||
<div class="gx-nav-section__title">Commas</div>
|
||||
|
||||
@@ -70,7 +70,7 @@ def test_ui_device_picker_uses_gateway_directory_and_preserves_local_galaxy():
|
||||
assert 'fetch("/_gateway/devices"' in picker
|
||||
assert "localStorage" in picker
|
||||
assert "Rename comma" in picker
|
||||
assert "hasDevices" in picker
|
||||
assert "hasMultipleDevices" in picker
|
||||
assert "window.location.assign(device.path)" in picker
|
||||
assert shell.index('<DevicePicker />') > shell.index('v-for="(links, section) in NAV"')
|
||||
assert "Local Galaxy instances do not have the gateway directory endpoint." in picker
|
||||
|
||||
Reference in New Issue
Block a user