Commit 690a5d2a authored by yPhil's avatar yPhil
Browse files

Big refactoring

- Server now errors immediately
- Full name refactoring
- Updated tests
parent 31bd4e8e
Pipeline #409534 passed with stage
in 45 seconds
# Changelog
## 1.3.0
### Bugfixes
- Better (faster) server (fetch) error handling
- Finalized name refactoring
## 1.2.8
- New function / dialog to merge the imported / open feeds with existing ones #e38691d5
......
......@@ -10,7 +10,7 @@ const portHttp = pjson.HTTP_PORT || 8000;
const portHttps = pjson.HTTPS_PORT || 8001;
httpServer.listen(portHttp, () => {
console.debug('HTTP Server running on port %s', port);
console.debug('HTTP Server running on port %s', portHttp);
});
const httpsServer = https.createServer({
......
{
"name": "petrolette",
"description": "The news reader that doesn't know you",
"version": "1.2.9A",
"version": "1.3.0A",
"private": true,
"license": "GPL-3.0-only",
"HTTP_PORT": 8000,
......
......@@ -63,7 +63,6 @@
--wrap: nowrap;
}
@media screen and (max-width: 700px) {
:root {
--beggar-width: 100%;
......@@ -132,30 +131,101 @@ a.ptl-link:hover {
color: var(--color-ui-sec) !important;
}
.dangerous {
color: var(--color-ui-danger) !important;
}
.logo-title:hover,
.ptl-link a:hover,
.introjs-tooltiptext a:hover {
color: var(--color-ui-sec) !important;
}
.feed-header .feed-controls div {
li.feed-item:not(.error) a {
display: block;
width: 100%;
}
li.results a:link,
li.results a:visited {
color: black !important;
}
.ui-tab.ui-state-active a:link,
.ui-tab.ui-state-active i,
.ui-tab.ui-state-default a:link {
color: var(--color-fg1);
}
/* .ui-tab.ui-state-hover a { */
/* color: var(--color-hl1); */
/* } */
.ui-tab.ui-state-default a:hover {
cursor: pointer !important;
color: var(--color-fg2) !important;
}
.feedHeader > .feedTitle > a:link,
.feedHeader > .feedTitle > a:visited,
.feedHeader > .feedTitle > a:focus,
.feedHeader > .feedTitle > a:focus-visible,
.feedHeader > .feedTitle > a:focus-within {
color: var(--color-fg6) !important;
}
.feedHeader > .feedTitle > a.danger:hover,
.feedHeader > .feedTitle > a:hover {
color: var(--color-fg2) !important;
}
#liberapay a {
flex: 0 0 0;
}
table#jslicense-labels1 td a:link {
text-decoration: underline;
}
div#logoTitle {
display: flex;
cursor: pointer;
}
.feedHeader .feed-controls div {
margin: 0 2px 0 0;
}
.feed-header > .feed-toggle,
.feed-header .feed-controls div {
.feedHeader > .feed-toggle,
.feedHeader .feed-controls div {
text-align: center;
}
#load-spinner > div {
#loadSpinner > div {
color: var(--color-fg1);
font-size: 12pt;
}
div#logoTitle > div {
flex: 1 0;
}
.logoTitle {
color: var(--color-ui-pri);
display: var(--logo-display);
font-family: LobsterRegular, Helvetica, Arial, sans-serif;
font-size: 36pt;
}
div#logoTitle > .logoTitle > a:link,
div#logoTitle > .logoTitle > a:visited {
color: var(--color-ui-pri);
}
.feedHeader > .feedTitle > a.danger:link,
.feedHeader > .feedTitle > a.danger:visited {
color: var(--color-danger) !important;
}
.dangerous {
color: var(--color-ui-danger) !important;
}
.fold {
display: inline-block;
......@@ -171,66 +241,69 @@ a.ptl-link:hover {
/* TOP Menu navBar */
.topnav {
.topNav {
/* position: relative; */
z-index: 20;
background-color: var(--color-ui-qua);
display: flex;
flex-direction: row;
/* color: var(--color-ui-sec); */
overflow: hidden;
height: 45px;
}
.topnav > div.menuBarItem {
.topNav > div.menuBarItem {
color: var(--color-ui-pri);
text-align: center;
}
.topnav > div.menuBarButton{
.topNav > div.menuBarButton {
cursor: pointer;
}
.topnav .navLeft {
.topNav .navLeft {
order: 1;
}
.topnav .navCenter {
.topNav .navCenter {
order: 2;
flex-grow: 5;
}
.topnav .navRight {
.topNav .navRight {
order: 3;
}
.topnav > div.menuBarItem > i.topMenuIcon {
.topNav > div.menuBarItem > i.topMenuIcon {
display: block;
color: var(--color-ui-sec);
font-size: 16pt;
margin: 8px 8px 8px 12px;
}
.topnav > div.menuBarItem > i.icon-reset {
.topNav > div.menuBarItem > i.icon-reset {
margin: 13px 0 8px -28px;
color: #333333;
color: #333;
}
.topnav > div.menuBarItem > i.icon-reset:hover {
color: #555555;
.topNav > div.menuBarItem > i.icon-reset:hover {
color: #555;
}
.topnav > div.menuBarItem > input {
margin: 8px;
input {
margin: 0;
padding: 0.4em;
}
.topnav > div.menuBarItem i.topMenuIcon:hover {
color: var(--color-ui-pri);
.ui-spinner input {
width: 32px;
}
div#logo-title {
display: flex;
cursor: pointer;
.topNav > div.menuBarItem > input {
margin: 8px;
}
.topNav > div.menuBarItem i.topMenuIcon:hover {
color: var(--color-ui-pri);
}
.icon-w3c {
......@@ -253,17 +326,6 @@ i.icon-petrolette::before {
font-style: italic !important;
}
div#logo-title > div {
flex: 1 0;
}
.logo-title {
color: var(--color-ui-pri);
display: var(--logo-display);
font-family: LobsterRegular, Helvetica, Arial, sans-serif;
font-size: 36pt;
}
i.icon-petrolette.item-icon {
font-size: 1em;
}
......@@ -272,12 +334,6 @@ i.icon-petrolette.item-icon {
color: var(--color-fg1);
}
.ui-tab.ui-state-active a,
.ui-tab.ui-state-active i,
.ui-tab.ui-state-default a {
color: var(--color-fg1);
}
.ui-tab.ui-state-active i {
color: var(--color-fg1);
}
......@@ -326,7 +382,7 @@ i.icon-petrolette.item-icon {
opacity: 1;
}
#load-spinner > div > i {
#loadSpinner > div > i {
line-height: 0;
font-size: 8em;
}
......@@ -335,13 +391,13 @@ i.icon-petrolette.item-icon {
top: 5px;
}
#load-spinner > div > div {
#loadSpinner > div > div {
margin: 2em 0 0 0;
color: var(--color-fg1);
font-size: 12pt;
}
#no-script {
#noScript {
padding: 1em;
margin: 3vh auto;
background: var(--color-ui-qua);
......@@ -353,28 +409,20 @@ i.icon-petrolette.item-icon {
width: 0;
}
#preload > .logo-title {
#preload > .logoTitle {
font-family: LobsterRegular, Helvetica, sans-serif;
}
.feed-header > .feed-title {
.feedHeader > .feedTitle {
flex-basis: auto;
flex-grow: 4;
flex-shrink: 1;
/* display:flex; */
/* align-items: center; */
/* font-family: "Aveny T WEB", Arial, sans-serif; */
font-family: BebasNeueRegular, Verdana, sans-serif !important;
/* font-stretch: ultra-condensed; */
/* font-style: normal; */
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
font-size: var(--feed-title-font-size);
/* text-transform: uppercase; */
/* margin-top: var(--title-padding-top); */
font-style: oblique;
/* height: 30px; */
margin-left: var(--title-margin-left);
text-overflow: ellipsis;
color: var(--color-fg6);
......@@ -384,7 +432,7 @@ i.icon-petrolette.item-icon {
white-space: nowrap;
}
#preload > .feed-title {
#preload > .feedTitle {
font-family: BebasNeueRegular, Helvetica, sans-serif;
}
......@@ -453,6 +501,16 @@ li {
padding: 0;
}
.flexBox {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: -moz-available; /* WebKit-based browsers will ignore this. */
width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
width: fill-available;
align-items: center;
}
#questionDialog > .flexBox {
flex-wrap: var(--wrap);
}
......@@ -484,19 +542,11 @@ ul.help li {
background: var(--color-bg1);
}
.ui-tab.ui-state-hover a {
color: var(--color-hl1);
}
.ui-tab#new-group:hover,
.ui-tab.ui-state-hover {
filter: brightness(0.9);
}
/* .ui-tab.ui-state-active { */
/* border-top: 1px solid var(--color-ui-danger) !important; */
/* } */
.feed-control {
color: var(--color-fg5);
cursor: pointer;
......@@ -507,13 +557,8 @@ ul.help li {
color: var(--color-fg6);
}
.ui-tab.ui-state-default a:hover {
cursor: pointer !important;
color: var(--color-fg2) !important;
}
.ui-tab.ui-state-active,
#tab-names,
#tabNamesUl,
#tabs {
background: var(--color-bg3);
}
......@@ -543,24 +588,6 @@ i.item-icon:hover {
color: var(--color-danger);
}
.feed-header > .feed-title > a:link,
.feed-header > .feed-title > a:visited,
.feed-header > .feed-title > a:focus,
.feed-header > .feed-title > a:focus-visible,
.feed-header > .feed-title > a:focus-within {
color: var(--color-fg6) !important;
}
.feed-header > .feed-title > a.danger:link,
.feed-header > .feed-title > a.danger:visited {
color: var(--color-danger) !important;
}
.feed-header > .feed-title > a.danger:hover,
.feed-header > .feed-title > a:hover {
color: var(--color-fg2) !important;
}
li.feed-item.error > strong.key {
color: var(--color-fg1);
}
......@@ -618,11 +645,6 @@ li.feed-item.error > strong.value {
border-radius: 3px;
}
input {
margin: 0;
padding: 0.4em;
}
.dead-center {
height: 300px;
left: 50%;
......@@ -654,21 +676,21 @@ fieldset.feedsMenuForm {
background-color: var(--color-ui-qua) !important;
}
.side-menu-title {
.sideMenuTitleToggleDiv {
color: var(--color-ui-pri);
}
.menu .side-menu-title {
.menu .sideMenuTitleToggleDiv {
color: var(--color-ui-qui);
margin-left: 14px;
font-size: 9pt;
}
.js-enabled-only {
.jsEnabledOnly {
display: none;
}
nav#side-menu {
nav#sideMenu {
border: none;
height: 100%;
left: var(--side-menu-width);
......@@ -683,8 +705,8 @@ nav#side-menu {
scrollbar-color: var(--color-ui-oct) var(--color-ui-qua);
}
nav#side-menu,
.topnav,
nav#sideMenu,
.topNav,
.ui-dialog,
.ui-dialog .ui-dialog-buttonpane {
background: var(--color-ui-qua);
......@@ -701,16 +723,11 @@ li.results {
outline: 1px solid red;
}
li.results a:link,
li.results a:visited {
color: black !important;
}
nav#side-menu:hover {
nav#sideMenu:hover {
scrollbar-color: var(--color-ui-sec) var(--color-ui-qua);
}
nav#side-menu.expanded {
nav#sideMenu.expanded {
left: 0;
}
......@@ -743,7 +760,6 @@ nav#side-menu.expanded {
max-width: var(--console-max-width);
scrollbar-width: thin;
border-radius: 3px;
/* background-color: var(--color-ui-console-bg); */
color: var(--color-ui-console-fg);
font-family: monospace;
overflow-wrap: break-word;
......@@ -801,10 +817,6 @@ i.tab-icon {
margin: 0;
}
.ui-spinner input {
width: 32px;
}
button#feedGuessButton {
margin-left: 0.4em;
}
......@@ -826,10 +838,6 @@ a.validateFeedButton {
margin-right: 0;
}
/* .ui-button.last { */
/* margin-right: 0; */
/* } */
.ui-widget-header,
th {
background: none;
......@@ -842,22 +850,17 @@ th {
border: none !important;
}
/* .ui-widget-content { */
/* color: var(--color-ui-pri) !important; */
/* } */
button.ui-state-success {
background-color: var(--color-ui-success) !important;
}
.dialog button.help-button {
background-color: var(--color-ui-success);
/* border-color: var(--color-ui-success); */
color: var(--color-ui-pri);
padding: 0.4em;
}
.feed-header > .feed-handle,
.feedHeader > .feed-handle,
.dialog .helpBookmarklet {
cursor: -webkit-grab;
cursor: grab;
......@@ -924,16 +927,6 @@ ul.help li.cloud::before {
color: var(--color-ui-success);
}
.flexBox {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: -moz-available; /* WebKit-based browsers will ignore this. */
width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
width: fill-available;
align-items: center;
}
#feedGuessDiv {
flex-wrap: nowrap;
}
......@@ -965,10 +958,6 @@ ul.help li.cloud::before {
margin: 0.1em;
}
/* .twin { */
/* flex: 1; */
/* } */
span.ui-spinner,
.last {
margin-right: 0;
......@@ -1113,17 +1102,9 @@ ul.column div.buttons {
z-index: 1 !important;
}
/* ul.column div.buttons > button { */
/* margin-bottom: 0.2em; */
/* } */
/* Feed */
li.feed {
position: relative;
/* background: var(--color-bg1); */
/* z-index: 2; */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
margin: 0 0 0.4em 0;
min-height: 20px !important;
......@@ -1135,11 +1116,10 @@ li.feed.selected {
opacity: 0.6;
}
.feed-header {
.feedHeader {
display: flex;
flex-direction: row;
background-color: var(--color-bg2);
/* color: var(--color-fg5); */
transition: all 0.3s linear;
height: var(--header-height);
max-height: var(--header-height);
......@@ -1151,7 +1131,7 @@ li.feed.selected {
outline: 3px dashed var(--color-fg2);
}
.feed-header > .feed-handle {
.feedHeader > .feed-handle {
background-color: transparent;
border-left: 3px dotted var(--color-fg4);
border-right: 3px dotted var(--color-fg4);
......@@ -1161,18 +1141,18 @@ li.feed.selected {
visibility: var(--handle-visibility);
}
.feed-header > .feed-controls {
.feedHeader > .feed-controls {
display: flex;
flex-basis: 0;
flex-grow: 0;
flex-shrink: 0;
}
.feed-header .feed-controls div.collapsible {
.feedHeader .feed-controls div.collapsible {
display: none;
}
.feed-header > .feed-toggle {
.feedHeader > .feed-toggle {
/* margin: 2px; */
background-repeat: no-repeat;
background-size: contain;
......@@ -1234,13 +1214,6 @@ li.feed-item > div.itemDiv > a > .ptl-img {
width: 30%;
background-size: cover;
margin: 0 0.2rem 0.2rem 0;
/* width: 30%; */
/* max-width: 30%; */
}
li.feed-item:not(.error) a {
display: block;
width: 100%;
}
li.feed-item img:hover {
......@@ -1265,42 +1238,36 @@ table#jslicense-labels1 td {
padding: 0.5em;
}
table#jslicense-labels1 td a {
text-decoration: underline;
}
.kbShortcutCol {
white-space: nowrap;
}