mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #1657 from appwrite/feat-wip-account-menu-changes
Feat wip account menu changes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user