Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions components/ProjectGroupPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const loadGroups = async (reset = false) => {
}

let timeoutId: ReturnType<typeof setTimeout>
watch(searchText, (newVal, oldVal) => {
watch(searchText, (newVal) => {
if (!isOpen.value) return

clearTimeout(timeoutId)
Expand Down Expand Up @@ -127,8 +127,11 @@ const selectGroup = (id: string) => {
}

const onFocus = (e: Event) => {
const wasOpen = isOpen.value
isOpen.value = true
loadGroups(true)
if (!wasOpen) {
loadGroups(true)
}
const target = e.target as HTMLInputElement
if (target) {
target.select()
Expand Down
3 changes: 2 additions & 1 deletion pages/workspace/create/tdei.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,12 @@
</template>

<script setup lang="ts">
declare const L: any;
import { LoadingContext } from '~/services/loading'
import { TdeiImporter, TdeiImporterContext } from '~/services/import/tdei'
import { osmClient, tdeiClient, workspacesClient } from '~/services/index'

declare const L: any

const context = reactive(new TdeiImporterContext())
const importer = new TdeiImporter(workspacesClient, tdeiClient, osmClient, context)

Expand Down
8 changes: 4 additions & 4 deletions services/tdei.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ export class TdeiClient extends BaseHttpClient implements ICancelableClient {
const jwt = getJwtBody(body.access_token);

this.#auth.username = username;
this.#auth.subject = jwt.sub as unknown as string;
this.#auth.displayName = jwt.name as unknown as string;
this.#auth.email = jwt.email as unknown as string;
this.#auth.subject = jwt.sub as string;
this.#auth.displayName = jwt.name as string;
this.#auth.email = jwt.email as string;
this.#auth.accessToken = body.access_token;
this.#auth.refreshToken = body.refresh_token;
this.#auth.expiresAt = expiresAsDate(body.expires_in);
this.#auth.refreshExpiresAt = expiresAsDate(body.refresh_expires_in);

this.#auth.store();

this.#setAuthHeader();
Expand Down