@fayz-ai/admin 0.46.1 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedBrandingSettings.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ConnectedBrandingSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ConnectedBrandingSettings.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ConnectedBrandingSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,wBAAgB,yBAAyB,sBAgHxC"}
|
package/dist/index.js
CHANGED
|
@@ -30632,16 +30632,18 @@ function ConnectedBrandingSettings() {
|
|
|
30632
30632
|
...patch,
|
|
30633
30633
|
identity: { ...patch.identity }
|
|
30634
30634
|
};
|
|
30635
|
+
const stamp = Date.now().toString(36);
|
|
30635
30636
|
if (assets?.logoFile) {
|
|
30636
30637
|
const ext = assets.logoFile.name.split(".").pop() ?? "png";
|
|
30637
|
-
const path = `${currentOrg.id}/branding/logo.${ext}`;
|
|
30638
|
+
const path = `${currentOrg.id}/branding/logo-${stamp}.${ext}`;
|
|
30638
30639
|
const { error } = await supabase.storage.from("avatars").upload(path, assets.logoFile, { upsert: true });
|
|
30639
30640
|
if (error) throw error;
|
|
30640
30641
|
next.identity.logoUrl = supabase.storage.from("avatars").getPublicUrl(path).data.publicUrl;
|
|
30642
|
+
delete next.identity.markUrl;
|
|
30641
30643
|
}
|
|
30642
30644
|
if (assets?.faviconFile) {
|
|
30643
30645
|
const ext = assets.faviconFile.name.split(".").pop() ?? "png";
|
|
30644
|
-
const path = `${currentOrg.id}/branding/favicon.${ext}`;
|
|
30646
|
+
const path = `${currentOrg.id}/branding/favicon-${stamp}.${ext}`;
|
|
30645
30647
|
const { error } = await supabase.storage.from("avatars").upload(path, assets.faviconFile, { upsert: true });
|
|
30646
30648
|
if (error) throw error;
|
|
30647
30649
|
next.identity.faviconUrl = supabase.storage.from("avatars").getPublicUrl(path).data.publicUrl;
|
|
@@ -30660,6 +30662,10 @@ function ConnectedBrandingSettings() {
|
|
|
30660
30662
|
}
|
|
30661
30663
|
};
|
|
30662
30664
|
setCurrentOrg({ ...currentOrg, logoUrl: logoUrl ?? void 0, settings });
|
|
30665
|
+
const appConfig = useAppConfigStore.getState();
|
|
30666
|
+
if (brand2 && appConfig.tenantId === currentOrg.id) {
|
|
30667
|
+
appConfig.setConfig({ ...appConfig.config, branding: brand2 }, appConfig.tenantId);
|
|
30668
|
+
}
|
|
30663
30669
|
toast.success("Marca salva");
|
|
30664
30670
|
} catch (err) {
|
|
30665
30671
|
toast.error("N\xE3o foi poss\xEDvel salvar a marca", { description: err?.message });
|