fix: removed config appearance tab already in this branch, and keeping the UI fixes

This commit is contained in:
zelfroster 2023-07-03 19:36:19 +05:30
parent dd4ee1674e
commit ba7eec4e8d
6 changed files with 1 additions and 118 deletions

View File

@ -1,36 +0,0 @@
const m = require('mithril');
const Appearance = () => {
let rsBaseFontSize =
localStorage.getItem('rsBaseFontSize') ||
window.getComputedStyle(document.body).getPropertyValue('font-size');
return {
view: () =>
m('.widget', [
m('.widget__heading', m('h3', 'Appearance')),
m('.widget__body', [
m('.set-font', [
m('h3', 'Set font size'),
m('.set-font__slider', [
m('div.set-font__slider-scale', [
m('p', '12px'),
m('p', '14px'),
m('p', '16px'),
m('p', '18px'),
m('p', '20px'),
]),
m('input[type=range][min=1][max=5]', {
value: (rsBaseFontSize.substring(0, rsBaseFontSize.length - 2) - 10) / 2,
oninput: (e) => (rsBaseFontSize = `${10 + e.target.value * 2}px`),
onchange: () => {
document.documentElement.style.fontSize = rsBaseFontSize;
localStorage.setItem('rsBaseFontSize', rsBaseFontSize);
},
}),
]),
]),
]),
]),
};
};
module.exports = Appearance;

View File

@ -8,7 +8,6 @@ const sections = {
files: require('config/config_files'),
people: require('config/config_people'),
mail: require('config/config_mail'),
appearance: require('config/config_appearance'),
};
const Layout = {

View File

@ -69,11 +69,6 @@ const navbar = () => {
const Layout = () => {
return {
oninit: () => {
document.documentElement.style.fontSize =
localStorage.getItem('rsBaseFontSize') ||
window.getComputedStyle(document.body).getPropertyValue('font-size');
},
view: (vnode) => [
m('.content', [
m(navbar, {

View File

@ -42,10 +42,6 @@
gap: 0.5rem;
}
}
& > p {
font-size: 0.9em;
color: #666;
}
& .tooltip {
float: right;
}

View File

@ -98,74 +98,3 @@
flex-direction: column;
gap: 1rem;
}
.set-font {
& h3 {
align-self: flex-start;
}
&__slider {
width: 100%;
display: flex;
gap: 0.25rem;
flex-direction: column;
align-items: center;
padding: 0.5rem;
border: 1px solid $light-color;
border-radius: 4px;
& input[type='range'] {
-webkit-appearance: none;
appearance: none;
background: transparent;
cursor: move; /* fallback if grab is not supported */
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
width: 98.5%;
transform: translateX(-1.5px);
&:active {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing;
}
&:focus {
outline: transparent;
border: none;
box-shadow: none;
}
&::-webkit-slider-runnable-track {
background-color: $primary-light-color;
height: 0.5rem;
border-radius: 0.5rem;
margin: 0.5rem 0;
}
&::-moz-range-track {
background-color: $primary-light-color;
height: 0.5rem;
border-radius: 0.5rem;
}
&::-webkit-slider-thumb {
-webkit-appearance: none;
height: 1.5rem;
width: 0.5rem;
// In order to properly center the thumb in chromium browsers
// margin-top = (track height / 2) - (thumb height /2);
margin-top: calc(0.5rem / 2 - 1.5rem / 2);
border: none;
border-radius: 0.125rem;
background-color: $primary-color;
}
&::-moz-range-thumb {
height: 1.5rem;
width: 0.5rem;
border: none;
border-radius: 0.125rem;
background-color: $primary-color;
}
}
&-scale {
width: 100%;
display: flex;
justify-content: space-between;
}
}
}

File diff suppressed because one or more lines are too long