Remove background support experiment
This commit is contained in:
@@ -403,18 +403,6 @@ onUnmounted(() => {
|
||||
background-color: var(--card-background);
|
||||
}
|
||||
|
||||
body.has-background .grid-item {
|
||||
background-color: rgba(255,255,255,0.3);
|
||||
filter: drop-shadow(0px 0px 14px white);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body.has-background .grid-item {
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
filter: drop-shadow(0px 0px 14px black);
|
||||
}
|
||||
}
|
||||
|
||||
.grid-item:focus,
|
||||
.grid-item:hover {
|
||||
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
|
||||
|
||||
@@ -117,19 +117,6 @@ async function onAvatarChanged(file) {
|
||||
user.value.avatarUrl = u.toString();
|
||||
}
|
||||
|
||||
async function onBackgroundChanged(file) {
|
||||
await profileModel.setBackgroundImage(file);
|
||||
await refreshProfile();
|
||||
|
||||
if (file) {
|
||||
window.document.body.style.backgroundImage = `url('${user.value.backgroundImageUrl}')`;
|
||||
window.document.body.classList.add('has-background');
|
||||
} else {
|
||||
window.document.body.style.backgroundImage = 'None';
|
||||
window.document.body.classList.remove('has-background');
|
||||
}
|
||||
}
|
||||
|
||||
// Password changes
|
||||
async function onPasswordChange() {
|
||||
const result = await inputDialog.value.prompt({
|
||||
@@ -290,10 +277,6 @@ onMounted(async () => {
|
||||
<div style="display: flex; flex-wrap: wrap">
|
||||
<div style="width: 150px; display: flex; flex-direction: column; justify-content: space-between;">
|
||||
<ImagePicker :src="user.avatarUrl" fallback-src="/img/background-image-placeholder.svg" :size="512" @changed="onAvatarChanged" display-width="128px"/>
|
||||
<div>
|
||||
<ImagePicker :src="user.backgroundImageUrl" fallback-src="/img/background-image-placeholder.svg" :max-size="1280" @changed="onBackgroundChanged" display-width="128px"/>
|
||||
<div v-if="user.hasBackgroundImage" class="actionable" @click="onBackgroundChanged(null)">Clear</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex-grow: 1;">
|
||||
<SettingsItem>
|
||||
@@ -359,37 +342,3 @@ onMounted(async () => {
|
||||
</Section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.profile-avatar {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.profile-avatar-edit-indicator {
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
right: -4px;
|
||||
border-radius: 20px;
|
||||
padding: 5px;
|
||||
color: var(--pankow-text-color);
|
||||
background-color: var(--pankow-input-background-color);
|
||||
transition: all 250ms;
|
||||
}
|
||||
|
||||
.profile-avatar:hover .profile-avatar-edit-indicator {
|
||||
color: white;
|
||||
background: var(--pankow-color-primary);
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user