Merge pull request #1657 from appwrite/feat-wip-account-menu-changes

Feat wip account menu changes
This commit is contained in:
Ernst Mulders
2025-02-12 09:45:38 +01:00
committed by GitHub
2 changed files with 53 additions and 19 deletions
+19 -3
View File
@@ -90,19 +90,29 @@
$: {
if (browser) {
const isCloudClass = isCloud ? 'is-cloud' : '';
if ($app.theme === 'auto') {
const darkThemeMq = window.matchMedia('(prefers-color-scheme: dark)');
if (darkThemeMq.matches) {
document.body.setAttribute('class', `theme-dark ${isCloudClass}`);
document.body.setAttribute('class', `theme-dark ${isCloudClass} no-transition`);
$app.themeInUse = 'dark';
} else {
document.body.setAttribute('class', `theme-light ${isCloudClass}`);
document.body.setAttribute(
'class',
`theme-light ${isCloudClass} no-transition`
);
$app.themeInUse = 'light';
}
} else {
document.body.setAttribute('class', `theme-${$app.theme} ${isCloudClass}`);
document.body.setAttribute(
'class',
`theme-${$app.theme} ${isCloudClass} no-transition`
);
$app.themeInUse = $app.theme;
}
requestAnimationFrame(() => {
document.body.classList.remove('no-transition');
});
}
}
</script>
@@ -123,6 +133,12 @@
<style lang="scss" global>
@use '@appwrite.io/pink-legacy/src/abstract/variables/devices';
.no-transition {
* {
transition: none !important;
}
}
.tippy-box {
--p-tooltip-text-color: var(--color-neutral-10);
--p-tooltip--bg-color: var(--color-neutral-80);