mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: title updated without needless calls
This commit is contained in:
1 parent
6288480082
commit
de32d858d8
4 files changed
+4
-8
No files matched your search
@@ -41,10 +41,6 @@
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$: if ($team.name) {
|
||||
handle();
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { team } from './store';
|
||||
import { title } from '$lib/stores/layout';
|
||||
import DeleteTeam from './_deleteTeam.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@@ -33,6 +34,7 @@
|
||||
try {
|
||||
await sdkForProject.teams.update($page.params.team, teamName);
|
||||
$team.name = teamName;
|
||||
title.set(teamName);
|
||||
addNotification({
|
||||
message: 'Name has been updated',
|
||||
type: 'success'
|
||||
|
||||
@@ -45,10 +45,6 @@
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$: if ($user.name) {
|
||||
handle();
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import DeleteUser from './_deleteUser.svelte';
|
||||
import { user } from './store';
|
||||
import { onMount } from 'svelte';
|
||||
import { title } from '$lib/stores/layout';
|
||||
|
||||
$: if (prefs) {
|
||||
if (JSON.stringify(prefs) !== JSON.stringify(Object.entries($user.prefs))) {
|
||||
@@ -111,6 +112,7 @@
|
||||
try {
|
||||
await sdkForProject.users.updateName($user.$id, userName);
|
||||
$user.name = userName;
|
||||
title.set(userName);
|
||||
showError = false;
|
||||
addNotification({
|
||||
message: 'Name has been updated',
|
||||
|
||||
Reference in new issue
Block a user