Compare commits

..
17 Commits
80 changed files with 2725 additions and 2278 deletions
+23 -34
View File
@@ -12,7 +12,6 @@
--wallpaper-repeat: repeat; --wallpaper-repeat: repeat;
--wallpaper-blur: 0px; --wallpaper-blur: 0px;
--wallpaper-invert: 0; --wallpaper-invert: 0;
--wallpaper-brightness: 1;
--wallpaper-size: contain; --wallpaper-size: contain;
--wallpaper-position: center; --wallpaper-position: center;
@@ -43,12 +42,11 @@
--clr-text-primary: light-dark(#666, #999); /* Default text color */ --clr-text-primary: light-dark(#666, #999); /* Default text color */
--clr-text-secondary: light-dark(#757575, #8a8a8a); /* Muted text, icons e.g. menu trigger */ --clr-text-secondary: light-dark(#757575, #8a8a8a); /* Muted text, icons e.g. menu trigger */
--clr-text-tertiary: light-dark(#999, #787878); /* Even more muted text, borders, some icons */ --clr-text-tertiary: light-dark(#999, #787878); /* Even more muted text, borders, some icons */
--clr-text-tertiary-activated: #888; /* Activated (hover, focus) tertiary text */
--clr-text-placeholder: light-dark(#bbb, #555); /* Placeholder text */ --clr-text-placeholder: light-dark(#bbb, #555); /* Placeholder text */
--clr-text-disabled: light-dark(#888, #777); /* Disabled text e.g. in-place-edit */ --clr-text-disabled: light-dark(#888, #777); /* Disabled text e.g. in-place-edit */
--clr-border-light: light-dark(#ccc, #555); /* Common light border, separator */ --clr-border-light: light-dark(#ccc, #555); /* Common light border, separator */
--clr-border-muted: light-dark(#ddd, #444); /* Softer border, e.g. in-place-edit dashed */ --clr-border-muted: light-dark(#ddd, #444); /* Softer border, e.g. in-place-edit dashed */
--clr-background-off-white: light-dark(#fafafa, #222); /* Common very light background */ --clr-background-off-white: light-dark(#fafafa, #282828); /* Common very light background */
--clr-background-light-gray: light-dark(#f0f0f0, #0f0f0f); /* HR background, action button hover */ --clr-background-light-gray: light-dark(#f0f0f0, #0f0f0f); /* HR background, action button hover */
--clr-background-extra-light-gray: light-dark(#eee, #222); /* Flat button faux bg, tabbar bg, chip bg */ --clr-background-extra-light-gray: light-dark(#eee, #222); /* Flat button faux bg, tabbar bg, chip bg */
--clr-background-blue-gray-50: light-dark(#edf0f2, #202c33); /* Contact hover, messages panel, send message panel */ --clr-background-blue-gray-50: light-dark(#edf0f2, #202c33); /* Contact hover, messages panel, send message panel */
@@ -831,7 +829,7 @@ div.trusted-badge {
.action-button { .action-button {
display: block; display: block;
position: absolute; position: absolute;
color: var(--clr-text-secondary); color: var(--clr-text-tertiary);
font-size: 1.8rem; font-size: 1.8rem;
background-color: var(--clr-background-off-white); background-color: var(--clr-background-off-white);
border-radius: 50%; border-radius: 50%;
@@ -847,15 +845,12 @@ div.trusted-badge {
z-index: 2; z-index: 2;
} }
.action-button:focus, .action-button:focus, .action-button:hover {
.action-button:hover, color: var(--clr-text-disabled);
.action-button:hover:not([disabled]),
.action-button:active:not([disabled]) {
color: var(--clr-text-tertiary-activated);
background-color: var(--clr-background-light-gray); background-color: var(--clr-background-light-gray);
} }
.action-button:active { .action-button:active {
color: var(--clr-text-tertiary-activated); color: light-dark(#777, #666); /* #777 */
background-color: var(--clr-background-extra-light-gray); background-color: var(--clr-background-extra-light-gray);
} }
@@ -1768,47 +1763,45 @@ img.channel {
align-self: center; align-self: center;
} }
#messages-container { /* Scrollable panel where the messages are shown */
#messages-panel {
position: relative; position: relative;
overflow-y: hidden; padding: 0.75rem;
overflow-y: scroll;
background-color: var(--clr-background-blue-gray-50);
height: 100%; height: 100%;
} }
#messages-panel::before {
#messages-container::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: var(--clr-background-blue-gray-50);
background-image: var(--wallpaper-url); background-image: var(--wallpaper-url);
background-repeat: var(--wallpaper-repeat); background-repeat: var(--wallpaper-repeat);
background-size: var(--wallpaper-size); background-size: var(--wallpaper-size);
background-position: var(--wallpaper-position); background-position: var(--wallpaper-position);
filter: blur(var(--wallpaper-blur)) filter: blur(var(--wallpaper-blur)) invert(var(--wallpaper-invert));
invert(var(--wallpaper-invert))
brightness(var(--wallpaper-brightness));
pointer-events: none; pointer-events: none;
z-index: 0;
} }
/* Dark mode wallpaper adjustments: image wallpaper * /* Dark mode asigned by the OS */
#messages-container.dark.wpimg::before { @media (prefers-color-scheme: dark) {
filter: brightness(50%); #messages-panel::before {
background-image: url("../img/bg_messages_dk.png");
} }
/* Dark mode wallpaper adjustments: pattern wallpaper *
#messages-container.dark.wppatt::before {
filter: invert(1);
} }
*/
/* Scrollable panel where the messages are shown */ /* Explicitly set dark mode */
#messages-panel { #messages-panel[color-scheme="dark"]::before {
background-image: url("../img/bg_messages_dk.png");
}
#messages-container {
position: relative; position: relative;
padding: 0.75rem; overflow-y: hidden;
overflow-y: scroll;
height: 100%; height: 100%;
} }
@@ -3626,10 +3619,6 @@ ul.phone-country-selector span.country {
border: 1.5px solid var(--clr-secondary-accent); border: 1.5px solid var(--clr-secondary-accent);
} }
img.inverted {
filter: invert(1);
}
div.toast { div.toast {
visibility: hidden; visibility: hidden;
display: flex; display: flex;
+1 -1
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

+712 -726
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "tinode-webapp", "name": "tinode-webapp",
"description": "Tinode messenger for the web", "description": "Tinode messenger for the web",
"version": "0.25.0-beta2", "version": "0.25.0-beta1",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/tinode/webapp.git" "url": "git+https://github.com/tinode/webapp.git"
@@ -75,7 +75,7 @@
"react": "^18.3.0", "react": "^18.3.0",
"react-dom": "^18.3.0", "react-dom": "^18.3.0",
"react-intl": "^7.0.0", "react-intl": "^7.0.0",
"tinode-sdk": "^0.24.0-beta1", "tinode-sdk": "^0.25.0-beta1",
"webm-duration-fix": "^1.0.4" "webm-duration-fix": "^1.0.4"
}, },
"devDependencies": { "devDependencies": {
+1 -1
View File
@@ -150,7 +150,7 @@ export const SELF_AVATAR_URI = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS
export const TOAST_DURATION = 3_000; export const TOAST_DURATION = 3_000;
// Initial/default color scheme. // Initial/default color scheme.
export const DEFAULT_COLOR_SCHEME = 'auto'; export const DEFAULT_COLOR_SCHEME = 'light dark';
// Default text size in points. // Default text size in points.
export const DEFAULT_TEXT_SIZE = 10; export const DEFAULT_TEXT_SIZE = 10;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "صورة", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "نمط", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "استعادة الافتراضي", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "الخلفيات", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "ضبابية:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "Bild", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "Muster", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Standard wiederherstellen", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Hintergrundbilder", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Unschärfe:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+7
View File
@@ -1865,6 +1865,13 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "Wallpapers",
"defaultMessage": "Wallpapers",
"description": "Label for selecting wallpapers in Settings",
"missing": false,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "image", "translation": "image",
"defaultMessage": "image", "defaultMessage": "image",
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "imagen", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "patrón", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Restaurar predeterminado", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Fondos de pantalla", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Desenfoque:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "image", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "motif", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Restaurer par défaut", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Fonds d'écran", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Flou :", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "immagine", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "motivo", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Ripristina predefinito", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Sfondi", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Sfocatura:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "이미지", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "패턴", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "기본값 복원", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "배경화면", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "흐림:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "imagine", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "model", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Restabilește implicit", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Imagini de fundal", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Estompare:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "картинка", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "узор", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Восстановить по умолчанию", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Обои", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Размытие:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "รูปภาพ", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "ลายลวดลาย", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "คืนค่าเริ่มต้น", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "วอลเปเปอร์", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "เบลอ:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "зображення", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "візерунок", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "Відновити типові", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "Шпалери", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "Розмиття:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "圖片", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "圖案", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "恢復預設", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "桌布", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "模糊:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+24 -10
View File
@@ -1865,39 +1865,53 @@
"missing": false, "missing": false,
"obsolete": false "obsolete": false
}, },
"label_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers:",
"description": "Label for selecting wallpapers in Settings",
"missing": true,
"obsolete": true
},
"tabtitle_image": { "tabtitle_image": {
"translation": "图片", "translation": "",
"defaultMessage": "image", "defaultMessage": "image",
"description": "Tab title Image", "description": "Tab title Image",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"tabtitle_pattern": { "tabtitle_pattern": {
"translation": "图案", "translation": "",
"defaultMessage": "pattern", "defaultMessage": "pattern",
"description": "Tab title Pattern", "description": "Tab title Pattern",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"sidepanel_title_wallpapers": {
"translation": "",
"defaultMessage": "Wallpapers",
"description": "Sidepanel title for WallpapersView.",
"missing": true,
"obsolete": true
},
"button_restore": { "button_restore": {
"translation": "恢复默认", "translation": "",
"defaultMessage": "Restore default", "defaultMessage": "Restore default",
"description": "Reset setting to default", "description": "Reset setting to default",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"wallpapers": { "wallpapers": {
"translation": "壁纸", "translation": "",
"defaultMessage": "Wallpapers", "defaultMessage": "Wallpapers",
"description": "Link or title for working with wallpapers.", "description": "Link or title for working with wallpapers.",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
}, },
"label_blur_wallpaper": { "label_blur_wallpaper": {
"translation": "模糊:", "translation": "",
"defaultMessage": "Blur:", "defaultMessage": "Blur:",
"description": "Label adjusting blur amount", "description": "Label adjusting blur amount",
"missing": false, "missing": true,
"obsolete": false "obsolete": false
} }
} }
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit. // This is a generated file. Don't edit.
export const PACKAGE_VERSION = "0.25.0-beta2"; export const PACKAGE_VERSION = "0.25.0-beta1";
+3 -3
View File
@@ -7,7 +7,7 @@ export default class AccGeneralView extends React.PureComponent {
super(props); super(props);
this.state = { this.state = {
colorSchema: props.colorSchema || 'auto', colorSchema: props.colorSchema || 'light dark',
textSize: (props.textSize * 10) || '100', textSize: (props.textSize * 10) || '100',
sendOnEnter: props.sendOnEnter || 'plain', sendOnEnter: props.sendOnEnter || 'plain',
}; };
@@ -49,8 +49,8 @@ export default class AccGeneralView extends React.PureComponent {
<div className="panel-form-row"> <div className="panel-form-row">
<ul className="quoted"> <ul className="quoted">
<li key="system"> <li key="system">
<input type="radio" id="system" name="color-scheme-select" value="auto" <input type="radio" id="system" name="color-scheme-select" value="light dark"
checked={this.state.colorSchema == 'auto'} checked={this.state.colorSchema == 'light dark'}
onChange={this.handleColorSchemaSelected} />&nbsp; onChange={this.handleColorSchemaSelected} />&nbsp;
<label htmlFor="system"> <label htmlFor="system">
<FormattedMessage id="color_schema_system" defaultMessage="System default" description="Name of the color schema"/>&nbsp; <FormattedMessage id="color_schema_system" defaultMessage="System default" description="Name of the color schema"/>&nbsp;
+2 -3
View File
@@ -1706,16 +1706,15 @@ class MessagesView extends React.Component {
this.props.online ? 'online' + (this.state.typingIndicator ? ' typing' : '') : 'offline'; this.props.online ? 'online' + (this.state.typingIndicator ? ' typing' : '') : 'offline';
const titleClass = 'panel-title' + (this.state.deleted ? ' deleted' : ''); const titleClass = 'panel-title' + (this.state.deleted ? ' deleted' : '');
const darkModeClass = this.props.colorSchema == 'dark' ? 'dark' : '';
let messagesComponent = ( let messagesComponent = (
<> <>
<div id="messages-container" className={darkModeClass}> <div id="messages-container">
<button id="go-to-latest" className={'action-button' + (this.state.showGoToLastButton ? '' : ' hidden')} <button id="go-to-latest" className={'action-button' + (this.state.showGoToLastButton ? '' : ' hidden')}
onClick={this.goToLatestMessage}> onClick={this.goToLatestMessage}>
<i className="material-icons">arrow_downward</i> <i className="material-icons">arrow_downward</i>
</button> </button>
<div id="messages-panel" ref={this.handleScrollReference}> <div id="messages-panel" ref={this.handleScrollReference} color-scheme={this.props.colorSchema}>
<ul id="scroller" className={chatBoxClass}> <ul id="scroller" className={chatBoxClass}>
{messageNodes} {messageNodes}
</ul> </ul>
-1
View File
@@ -254,7 +254,6 @@ class SidepanelView extends React.PureComponent {
<Suspense fallback={<div className="panel-form-row"><FormattedMessage id="loading_note" <Suspense fallback={<div className="panel-form-row"><FormattedMessage id="loading_note"
defaultMessage="Loading..." description="Message shown when component is loading"/></div>}> defaultMessage="Loading..." description="Message shown when component is loading"/></div>}>
<WallpapersView <WallpapersView
colorSchema={this.props.colorSchema !== 'auto' ? this.props.colorSchema : this.props.systemColorSchema}
onWallpaperSelected={this.props.onWallpaperSelected} onWallpaperSelected={this.props.onWallpaperSelected}
/> />
</Suspense> : </Suspense> :
+26 -52
View File
@@ -204,12 +204,7 @@ class TinodeWeb extends React.Component {
getBlankState() { getBlankState() {
const settings = LocalStorageUtil.getObject('settings') || {}; const settings = LocalStorageUtil.getObject('settings') || {};
const persist = !!LocalStorageUtil.getObject('keep-logged-in'); const persist = !!LocalStorageUtil.getObject('keep-logged-in');
if (!settings.wallpaper) {
const wallpaper = defaultWallpaper();
settings.wallpaper = wallpaper.name || '';
settings.wallpaperSize = wallpaper.size || 0;
settings.wallpaperBlur = 0;
}
return { return {
connected: false, connected: false,
// Connected and subscribed to 'me' // Connected and subscribed to 'me'
@@ -224,17 +219,9 @@ class TinodeWeb extends React.Component {
// "On" is the default, so saving the "off" state. // "On" is the default, so saving the "off" state.
messageSounds: !settings.messageSoundsOff, messageSounds: !settings.messageSoundsOff,
incognitoMode: false, incognitoMode: false,
// Manually selected color scheme. Default: 'system default' ('auto'). colorSchema: settings.colorSchema || DEFAULT_COLOR_SCHEME, // default: system default
colorSchema: settings.colorSchema || DEFAULT_COLOR_SCHEME, textSize: settings.textSize || DEFAULT_TEXT_SIZE, // default size: 10pt
systemColorSchema: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light', sendOnEnter: settings.sendOnEnter || 'plain', // default: 'plain' (just Enter)
// Wallpaper settings.
wallpaper: settings.wallpaper,
wallpaperSize: settings.wallpaperSize,
wallpaperBlur: 0,
// Text size in points. Default size: 10pt
textSize: settings.textSize || DEFAULT_TEXT_SIZE,
// Default: 'plain' (just Enter)
sendOnEnter: settings.sendOnEnter || 'plain',
// Persistent request to enable alerts. // Persistent request to enable alerts.
desktopAlerts: persist && !!settings.desktopAlerts, desktopAlerts: persist && !!settings.desktopAlerts,
// Enable / disable checkbox. // Enable / disable checkbox.
@@ -319,15 +306,17 @@ class TinodeWeb extends React.Component {
// Window/tab visible or invisible for pausing timers. // Window/tab visible or invisible for pausing timers.
document.addEventListener('visibilitychange', this.handleVisibilityEvent); document.addEventListener('visibilitychange', this.handleVisibilityEvent);
document.documentElement.style.colorScheme = this.state.colorSchema == 'auto' ? 'light dark' : this.state.colorSchema; document.documentElement.style.colorScheme = this.state.colorSchema;
document.documentElement.style.setProperty('--message-text-size', `${this.state.textSize}pt`); document.documentElement.style.setProperty('--message-text-size', `${this.state.textSize}pt`);
this.applyWallpaperSettings(this.state.wallpaper, this.state.wallpaperSize, this.state.wallpaperBlur, const settings = LocalStorageUtil.getObject('settings') || {};
this.state.colorSchema == 'auto' ? this.state.systemColorSchema : this.state.colorSchema); if (!settings.wallpaper) {
const wallpaper = defaultWallpaper();
console.log("Wallpaper settings:", this.state.wallpaper, this.state.wallpaperSize, this.state.wallpaperBlur); settings.wallpaper = wallpaper.name || '';
console.log("Wallpaper type:", this.state.wallpaperSize == 0 ? 'wpimg' : 'wppatt'); settings.wallpaperSize = wallpaper.size || 0;
console.log("System color scheme:", this.state.systemColorSchema); settings.wallpaperBlur = 0;
}
this.applyWallpaperSettings(settings.wallpaper, settings.wallpaperSize, settings.wallpaperBlur);
// Process background notifications from the service worker. // Process background notifications from the service worker.
if (typeof BroadcastChannel == 'function') { if (typeof BroadcastChannel == 'function') {
@@ -1261,28 +1250,18 @@ class TinodeWeb extends React.Component {
}); });
} }
// Manual change of color scheme: 'dark', 'light', 'auto'. // Manual change of color scheme.
handleChangeColorSchema(schema) { handleChangeColorSchema(scheme) {
console.log("User color scheme change:", schema); this.setState({colorSchema: scheme});
this.setState({colorSchema: schema}); LocalStorageUtil.updateObject('settings', {colorSchema: scheme});
LocalStorageUtil.updateObject('settings', {colorSchema: schema}); document.documentElement.style.colorScheme = scheme;
document.documentElement.style.colorScheme = schema == 'auto' ? 'light dark' : schema;
this.applyColorSchema(schema, this.state.systemColorSchema, this.state.wallpaperSize);
} }
// System color scheme has changed. // System color scheme has changed.
handleColorSchemeChange(event) { handleColorSchemeChange(event) {
const systemSchema = event.matches ? 'dark' : 'light'; console.log("Color scheme change:", event.matches ? 'dark' : 'not dark');
console.log("System color scheme change:", systemSchema); // this.setState({colorSchema: event.matches ? 'dark' : 'light'});
this.setState({systemColorSchema: systemSchema}); // document.documentElement.style.setProperty('--wallpaper-invert', '0');
this.applyColorSchema(this.state.colorSchema, systemSchema, this.state.wallpaperSize);
}
applyColorSchema(schema, systemSchema, size) {
const effectiveSchema = schema == 'auto' ? systemSchema : schema;
console.log("applyColorSchema:", effectiveSchema);
document.documentElement.style.setProperty('--wallpaper-invert', effectiveSchema == 'dark' && size ? '1' : '0');
document.documentElement.style.setProperty('--wallpaper-brightness', effectiveSchema == 'dark' && !size ? '0.5' : '1');
} }
handleSelectWallpapers() { handleSelectWallpapers() {
@@ -1290,22 +1269,19 @@ class TinodeWeb extends React.Component {
HashNavigation.navigateTo(HashNavigation.setUrlSidePanel(window.location.hash, 'wallpapers')); HashNavigation.navigateTo(HashNavigation.setUrlSidePanel(window.location.hash, 'wallpapers'));
} }
applyWallpaperSettings(wallpaper, size, blur, effectiveSchema) { applyWallpaperSettings(wallpaper, size, blur) {
console.log("Applying wallpaper settings:", wallpaper, size, blur);
document.documentElement.style.setProperty('--wallpaper-url', `url('${wallpaper}')`); document.documentElement.style.setProperty('--wallpaper-url', `url('${wallpaper}')`);
document.documentElement.style.setProperty('--wallpaper-repeat', size ? 'repeat' : 'no-repeat'); document.documentElement.style.setProperty('--wallpaper-repeat', size ? 'repeat' : 'no-repeat');
document.documentElement.style.setProperty('--wallpaper-blur', size ? '0px' : `${blur}px`); document.documentElement.style.setProperty('--wallpaper-blur', size ? '0px' : `${blur}px`);
document.documentElement.style.setProperty('--wallpaper-size', size ? `${size}px` : 'cover'); document.documentElement.style.setProperty('--wallpaper-size', size ? `${size}px` : 'cover');
document.documentElement.style.setProperty('--wallpaper-position', size ? 'unset' : 'center'); document.documentElement.style.setProperty('--wallpaper-position', size ? 'unset' : 'center');
document.documentElement.style.setProperty('--wallpaper-invert', effectiveSchema == 'dark' && size ? '1' : '0');
document.documentElement.style.setProperty('--wallpaper-brightness', effectiveSchema == 'dark' && !size ? '0.5' : '1');
} }
handleWallpaperSelected(wallpaper, size, blur) { handleWallpaperSelected(wallpaper, size, blur) {
this.handleError(); this.handleError();
LocalStorageUtil.updateObject('settings', {wallpaper: wallpaper, wallpaperSize: size, wallpaperBlur: blur}); LocalStorageUtil.updateObject('settings', {wallpaper: wallpaper, wallpaperSize: size, wallpaperBlur: blur});
this.setState({wallpaper: wallpaper, wallpaperSize: size, wallpaperBlur: blur}); this.applyWallpaperSettings(wallpaper, size, blur);
this.applyWallpaperSettings(wallpaper, size, blur,
this.state.colorSchema == 'auto' ? this.state.systemColorSchema : this.state.colorSchema);
} }
handleChangeTextSize(size) { handleChangeTextSize(size) {
@@ -1588,7 +1564,7 @@ class TinodeWeb extends React.Component {
} }
// Reset color scheme. // Reset color scheme.
document.documentElement.style.colorScheme = DEFAULT_COLOR_SCHEME == 'auto' ? 'light dark' : DEFAULT_COLOR_SCHEME; document.documentElement.style.colorScheme = DEFAULT_COLOR_SCHEME;
document.documentElement.style.setProperty('--message-text-size', `${DEFAULT_TEXT_SIZE}pt`); document.documentElement.style.setProperty('--message-text-size', `${DEFAULT_TEXT_SIZE}pt`);
clearInterval(this.reconnectCountdown); clearInterval(this.reconnectCountdown);
@@ -2085,7 +2061,6 @@ class TinodeWeb extends React.Component {
} }
render() { render() {
const colorSchema = this.state.colorSchema !== 'auto' ? this.state.colorSchema : this.state.systemColorSchema;
return ( return (
<div id="app-container" ref={this.selfRef}> <div id="app-container" ref={this.selfRef}>
{this.state.contextMenuVisible ? {this.state.contextMenuVisible ?
@@ -2186,7 +2161,6 @@ class TinodeWeb extends React.Component {
reqCredMethod={this.state.reqCredMethod} reqCredMethod={this.state.reqCredMethod}
textSize={this.state.textSize} textSize={this.state.textSize}
colorSchema={this.state.colorSchema} colorSchema={this.state.colorSchema}
systemColorSchema={this.state.systemColorSchema}
sendOnEnter={this.state.sendOnEnter} sendOnEnter={this.state.sendOnEnter}
onGlobalSettings={this.handleGlobalSettings} onGlobalSettings={this.handleGlobalSettings}
@@ -2248,7 +2222,7 @@ class TinodeWeb extends React.Component {
serverVersion={this.state.serverVersion} serverVersion={this.state.serverVersion}
serverAddress={this.state.serverAddress} serverAddress={this.state.serverAddress}
applicationVisible={this.state.applicationVisible} applicationVisible={this.state.applicationVisible}
colorSchema={colorSchema} colorSchema={this.state.colorSchema}
sendOnEnter={this.state.sendOnEnter} sendOnEnter={this.state.sendOnEnter}
wallpaper={this.state.wallpaper} wallpaper={this.state.wallpaper}
+5 -9
View File
@@ -10,8 +10,7 @@ export default class WallpapersView extends React.PureComponent {
super(props); super(props);
this.state = { this.state = {
tab: WALLPAPER_DEFAULTS.type, // currently selected tab: 'patt' | 'img' tab: WALLPAPER_DEFAULTS.type, // 'patt' | 'img'
selectedType: WALLPAPER_DEFAULTS.type, // type of the selected wallpaper.
wallpaper: imageIndex[WALLPAPER_DEFAULTS.type][WALLPAPER_DEFAULTS.index].name, wallpaper: imageIndex[WALLPAPER_DEFAULTS.type][WALLPAPER_DEFAULTS.index].name,
blur: 0, blur: 0,
}; };
@@ -40,11 +39,11 @@ export default class WallpapersView extends React.PureComponent {
e.preventDefault(); e.preventDefault();
type = this.state.tab; type = this.state.tab;
index = e.currentTarget.dataset.id; index = e.currentTarget.dataset.id;
blur = type == 'patt' ? 0 : this.state.blur; blur = this.state.blur;
} }
const fname = imageIndex[type][index].name; const fname = imageIndex[type][index].name;
const size = type == 'patt' ? imageIndex[type][index].size : 0; const size = type == 'patt' ? imageIndex[type][index].size : 0;
this.setState({tab: type, wallpaper: fname, selectedType: type, blur: blur}); this.setState({tab: type, wallpaper: fname, blur: 0});
this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]); this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]);
} }
@@ -52,11 +51,9 @@ export default class WallpapersView extends React.PureComponent {
e.preventDefault(); e.preventDefault();
const blur = e.currentTarget.value; const blur = e.currentTarget.value;
this.setState({blur: blur}); this.setState({blur: blur});
if (this.state.selectedType == 'img') { // Path relative to CSS file.
// Apply blur to patterns only. Path relative to CSS file.
this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]); this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]);
} }
}
render() { render() {
return ( return (
@@ -86,10 +83,9 @@ export default class WallpapersView extends React.PureComponent {
<div className="image-grid"> <div className="image-grid">
{imageIndex.patt.map((img, idx) => { {imageIndex.patt.map((img, idx) => {
const selected = this.state.wallpaper === img.name ? ' selected' : ''; const selected = this.state.wallpaper === img.name ? ' selected' : '';
const dark = this.props.colorSchema == 'dark' ? 'inverted' : null;
return <div key={idx} data-id={idx} className={`image-grid-cell${selected}`} return <div key={idx} data-id={idx} className={`image-grid-cell${selected}`}
onClick={this.handleWallpaperSelected}> onClick={this.handleWallpaperSelected}>
<img src={WALLPAPER_DEFAULTS.path + img.name} alt={img.name} className={dark} <img src={WALLPAPER_DEFAULTS.path + img.name} alt={img.name}
style={{ width: `${img.size}px`, height: `${img.size}px` }}/> style={{ width: `${img.size}px`, height: `${img.size}px` }}/>
</div> </div>
})} })}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
"use strict";(self.webpackChunktinode_webapp=self.webpackChunktinode_webapp||[]).push([[827],{3827:function(e,t,a){a.r(t),a.d(t,{default:function(){return d}});var l=a(1594),s=a.n(l),r=a(8181),n=a(7151),i=a(9027),c=a(1781);class d extends s().PureComponent{constructor(e){super(e),this.state={tab:i.S.type,selectedType:i.S.type,wallpaper:c[i.S.type][i.S.index].name,blur:0},this.blurValues=[0,1,2,4,8,16],this.handleTabClick=this.handleTabClick.bind(this),this.handleWallpaperSelected=this.handleWallpaperSelected.bind(this),this.handleBlurChanged=this.handleBlurChanged.bind(this)}handleTabClick(e){e.preventDefault(),n.A.navigateTo(n.A.addUrlParam(window.location.hash,"tab",e.currentTarget.dataset.id)),this.setState({tab:e.currentTarget.dataset.id})}handleWallpaperSelected(e){let t,a,l;e?(e.preventDefault(),a=this.state.tab,t=e.currentTarget.dataset.id,l="patt"==a?0:this.state.blur):(a=i.S.type,t=i.S.index,l=0);const s=c[a][t].name,r="patt"==a?c[a][t].size:0;this.setState({tab:a,wallpaper:s,selectedType:a,blur:l}),this.props.onWallpaperSelected(`../${i.S.path}${s}`,r,this.blurValues[l])}handleBlurChanged(e){e.preventDefault();const t=e.currentTarget.value;this.setState({blur:t}),"img"==this.state.selectedType&&this.props.onWallpaperSelected(`../${i.S.path}${this.state.wallpaper}`,0,this.blurValues[t])}render(){return s().createElement("div",{className:"flex-column"},s().createElement("div",{className:"panel-form-row clean-clickable"},s().createElement("a",{className:"flat-button",onClick:()=>this.handleWallpaperSelected(null)},s().createElement("i",{className:"material-icons"},"undo")," ",s().createElement(r.FormattedMessage,{id:"button_restore",defaultMessage:[{type:0,value:"Restore default"}]}))),s().createElement("ul",{className:"tabbar"},s().createElement("li",{className:"patt"===this.state.tab?"active":null},s().createElement("a",{href:"#","data-id":"patt",onClick:this.handleTabClick},s().createElement(r.FormattedMessage,{id:"tabtitle_pattern",defaultMessage:[{type:0,value:"pattern"}]}))),s().createElement("li",{className:"img"===this.state.tab?"active":null},s().createElement("a",{href:"#","data-id":"img",onClick:this.handleTabClick},s().createElement(r.FormattedMessage,{id:"tabtitle_image",defaultMessage:[{type:0,value:"image"}]})))),s().createElement("div",{id:"settings-form",className:"scrollable-panel"},"patt"===this.state.tab?s().createElement("div",{className:"image-grid"},c.patt.map((e,t)=>{const a=this.state.wallpaper===e.name?" selected":"",l="dark"==this.props.colorSchema?"inverted":null;return s().createElement("div",{key:t,"data-id":t,className:`image-grid-cell${a}`,onClick:this.handleWallpaperSelected},s().createElement("img",{src:i.S.path+e.name,alt:e.name,className:l,style:{width:`${e.size}px`,height:`${e.size}px`}}))})):s().createElement(s().Fragment,null,s().createElement("div",{className:"panel-form-column"},s().createElement("div",{className:"panel-form-row"},s().createElement("label",{className:"small"},s().createElement(r.FormattedMessage,{id:"label_blur_wallpaper",defaultMessage:[{type:0,value:"Blur:"}]}))),s().createElement("div",{className:"panel-form-row"},s().createElement("input",{type:"range",id:"blur",name:"blur",min:"0",max:"5",step:"1",value:this.state.blur,onChange:this.handleBlurChanged}))),s().createElement("div",{className:"image-grid"},c.img.map((e,t)=>{const a=this.state.wallpaper===e.name?" selected":"";return s().createElement("div",{key:t,"data-id":t,className:`image-grid-cell${a}`,onClick:this.handleWallpaperSelected},s().createElement("img",{src:i.S.path+e.pr,alt:e.name,style:{width:"100%",height:"100%"}}))})))))}}}}]); "use strict";(self.webpackChunktinode_webapp=self.webpackChunktinode_webapp||[]).push([[827],{3827:function(e,a,t){t.r(a),t.d(a,{default:function(){return d}});var l=t(1594),s=t.n(l),r=t(8181),n=t(7151),i=t(9027),c=t(1781);class d extends s().PureComponent{constructor(e){super(e),this.state={tab:i.S.type,wallpaper:c[i.S.type][i.S.index].name,blur:0},this.blurValues=[0,1,2,4,8,16],this.handleTabClick=this.handleTabClick.bind(this),this.handleWallpaperSelected=this.handleWallpaperSelected.bind(this),this.handleBlurChanged=this.handleBlurChanged.bind(this)}handleTabClick(e){e.preventDefault(),n.A.navigateTo(n.A.addUrlParam(window.location.hash,"tab",e.currentTarget.dataset.id)),this.setState({tab:e.currentTarget.dataset.id})}handleWallpaperSelected(e){let a,t,l;e?(e.preventDefault(),t=this.state.tab,a=e.currentTarget.dataset.id,l=this.state.blur):(t=i.S.type,a=i.S.index,l=0);const s=c[t][a].name,r="patt"==t?c[t][a].size:0;this.setState({tab:t,wallpaper:s,blur:0}),this.props.onWallpaperSelected(`../${i.S.path}${s}`,r,this.blurValues[l])}handleBlurChanged(e){e.preventDefault();const a=e.currentTarget.value;this.setState({blur:a}),this.props.onWallpaperSelected(`../${i.S.path}${this.state.wallpaper}`,0,this.blurValues[a])}render(){return s().createElement("div",{className:"flex-column"},s().createElement("div",{className:"panel-form-row clean-clickable"},s().createElement("a",{className:"flat-button",onClick:()=>this.handleWallpaperSelected(null)},s().createElement("i",{className:"material-icons"},"undo")," ",s().createElement(r.FormattedMessage,{id:"button_restore",defaultMessage:[{type:0,value:"Restore default"}]}))),s().createElement("ul",{className:"tabbar"},s().createElement("li",{className:"patt"===this.state.tab?"active":null},s().createElement("a",{href:"#","data-id":"patt",onClick:this.handleTabClick},s().createElement(r.FormattedMessage,{id:"tabtitle_pattern",defaultMessage:[{type:0,value:"pattern"}]}))),s().createElement("li",{className:"img"===this.state.tab?"active":null},s().createElement("a",{href:"#","data-id":"img",onClick:this.handleTabClick},s().createElement(r.FormattedMessage,{id:"tabtitle_image",defaultMessage:[{type:0,value:"image"}]})))),s().createElement("div",{id:"settings-form",className:"scrollable-panel"},"patt"===this.state.tab?s().createElement("div",{className:"image-grid"},c.patt.map((e,a)=>{const t=this.state.wallpaper===e.name?" selected":"";return s().createElement("div",{key:a,"data-id":a,className:`image-grid-cell${t}`,onClick:this.handleWallpaperSelected},s().createElement("img",{src:i.S.path+e.name,alt:e.name,style:{width:`${e.size}px`,height:`${e.size}px`}}))})):s().createElement(s().Fragment,null,s().createElement("div",{className:"panel-form-column"},s().createElement("div",{className:"panel-form-row"},s().createElement("label",{className:"small"},s().createElement(r.FormattedMessage,{id:"label_blur_wallpaper",defaultMessage:[{type:0,value:"Blur:"}]}))),s().createElement("div",{className:"panel-form-row"},s().createElement("input",{type:"range",id:"blur",name:"blur",min:"0",max:"5",step:"1",value:this.state.blur,onChange:this.handleBlurChanged}))),s().createElement("div",{className:"image-grid"},c.img.map((e,a)=>{const t=this.state.wallpaper===e.name?" selected":"";return s().createElement("div",{key:a,"data-id":a,className:`image-grid-cell${t}`,onClick:this.handleWallpaperSelected},s().createElement("img",{src:i.S.path+e.pr,alt:e.name,style:{width:"100%",height:"100%"}}))})))))}}}}]);
//# sourceMappingURL=827.prod.js.map //# sourceMappingURL=827.prod.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+29 -57
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -8
View File
@@ -28,7 +28,6 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
super(props); super(props);
this.state = { this.state = {
tab: _config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.type, tab: _config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.type,
selectedType: _config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.type,
wallpaper: _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__[_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.type][_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.index].name, wallpaper: _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__[_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.type][_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.index].name,
blur: 0 blur: 0
}; };
@@ -54,15 +53,14 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
e.preventDefault(); e.preventDefault();
type = this.state.tab; type = this.state.tab;
index = e.currentTarget.dataset.id; index = e.currentTarget.dataset.id;
blur = type == 'patt' ? 0 : this.state.blur; blur = this.state.blur;
} }
const fname = _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__[type][index].name; const fname = _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__[type][index].name;
const size = type == 'patt' ? _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__[type][index].size : 0; const size = type == 'patt' ? _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__[type][index].size : 0;
this.setState({ this.setState({
tab: type, tab: type,
wallpaper: fname, wallpaper: fname,
selectedType: type, blur: 0
blur: blur
}); });
this.props.onWallpaperSelected(`../${_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]); this.props.onWallpaperSelected(`../${_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]);
} }
@@ -72,10 +70,8 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
this.setState({ this.setState({
blur: blur blur: blur
}); });
if (this.state.selectedType == 'img') {
this.props.onWallpaperSelected(`../${_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]); this.props.onWallpaperSelected(`../${_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]);
} }
}
render() { render() {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "flex-column" className: "flex-column"
@@ -125,7 +121,6 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
className: "image-grid" className: "image-grid"
}, _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__.patt.map((img, idx) => { }, _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__.patt.map((img, idx) => {
const selected = this.state.wallpaper === img.name ? ' selected' : ''; const selected = this.state.wallpaper === img.name ? ' selected' : '';
const dark = this.props.colorSchema == 'dark' ? 'inverted' : null;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
key: idx, key: idx,
"data-id": idx, "data-id": idx,
@@ -134,7 +129,6 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", {
src: _config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path + img.name, src: _config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path + img.name,
alt: img.name, alt: img.name,
className: dark,
style: { style: {
width: `${img.size}px`, width: `${img.size}px`,
height: `${img.size}px` height: `${img.size}px`
File diff suppressed because one or more lines are too long
+52 -8
View File
@@ -3753,6 +3753,38 @@ class TopicMe extends _topic_js__WEBPACK_IMPORTED_MODULE_2__["default"] {
getCredentials() { getCredentials() {
return this._credentials; return this._credentials;
} }
pinTopic(topic, pin) {
if (!this._attached) {
return Promise.reject(new Error("Cannot pin topic in inactive 'me' topic"));
}
if (!_topic_js__WEBPACK_IMPORTED_MODULE_2__["default"].isCommTopicName(topic)) {
return Promise.reject(new Error("Invalid topic to pin"));
}
const tpin = Array.isArray(this.private && this.private.tpin) ? this.private.tpin : [];
const found = tpin.includes(topic);
if (pin && found || !pin && !found) {
return Promise.resolve(tpin);
}
if (pin) {
tpin.unshift(topic);
} else {
tpin.splice(tpin.indexOf(topic), 1);
}
return this.setMeta({
desc: {
private: {
tpin: tpin.length > 0 ? tpin : _config_js__WEBPACK_IMPORTED_MODULE_1__.DEL_CHAR
}
}
});
}
pinnedTopicRank(topic) {
if (!this.private || !this.private.tpin) {
return 0;
}
const idx = this.private.tpin.indexOf(topic);
return idx < 0 ? 0 : this.private.tpin.length - idx;
}
} }
/***/ }), /***/ }),
@@ -4315,6 +4347,12 @@ class Topic {
} }
return Promise.resolve(); return Promise.resolve();
} }
pinTopic(topic, pin) {
return Promise.reject(new Error("Pinning topics is not supported here"));
}
pinnedTopicRank(topic) {
return 0;
}
delMessages(ranges, hard) { delMessages(ranges, hard) {
if (!this._attached) { if (!this._attached) {
return Promise.reject(new Error("Cannot delete messages in inactive topic")); return Promise.reject(new Error("Cannot delete messages in inactive topic"));
@@ -5006,10 +5044,14 @@ class Topic {
acs: sub.acs acs: sub.acs
}); });
} }
if (!this._users[sub.user]) {
this.subcnt++;
}
user = this._updateCachedUser(sub.user, sub); user = this._updateCachedUser(sub.user, sub);
} else { } else {
delete this._users[sub.user]; delete this._users[sub.user];
user = sub; user = sub;
this.subcnt--;
} }
if (this.onMetaSub) { if (this.onMetaSub) {
this.onMetaSub(user); this.onMetaSub(user);
@@ -5204,7 +5246,7 @@ function rfc3339DateString(d) {
const millis = d.getUTCMilliseconds(); const millis = d.getUTCMilliseconds();
return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + (millis ? '.' + pad(millis, 3) : '') + 'Z'; return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + (millis ? '.' + pad(millis, 3) : '') + 'Z';
} }
function mergeObj(dst, src, ignore) { function mergeObj(dst, src) {
if (typeof src != 'object') { if (typeof src != 'object') {
if (src === undefined) { if (src === undefined) {
return dst; return dst;
@@ -5215,7 +5257,7 @@ function mergeObj(dst, src, ignore) {
return src; return src;
} }
if (src === null) { if (src === null) {
return src; return dst;
} }
if (src instanceof Date && !isNaN(src)) { if (src instanceof Date && !isNaN(src)) {
return !dst || !(dst instanceof Date) || isNaN(dst) || dst < src ? src : dst; return !dst || !(dst instanceof Date) || isNaN(dst) || dst < src ? src : dst;
@@ -5230,16 +5272,18 @@ function mergeObj(dst, src, ignore) {
dst = src.constructor(); dst = src.constructor();
} }
for (let prop in src) { for (let prop in src) {
if (src.hasOwnProperty(prop) && (!ignore || !ignore[prop]) && prop != '_noForwarding') { if (src.hasOwnProperty(prop) && prop != '_noForwarding') {
try { try {
dst[prop] = mergeObj(dst[prop], src[prop]); dst[prop] = mergeObj(dst[prop], src[prop]);
} catch (err) {} } catch (err) {
console.warn("Error merging property:", prop, err);
}
} }
} }
return dst; return dst;
} }
function mergeToCache(cache, key, newval, ignore) { function mergeToCache(cache, key, newval) {
cache[key] = mergeObj(cache[key], newval, ignore); cache[key] = mergeObj(cache[key], newval);
return cache[key]; return cache[key];
} }
function simplify(obj) { function simplify(obj) {
@@ -5385,7 +5429,7 @@ function clipInRange(src, clip) {
hi: Math.min(src.hi, clip.hi) hi: Math.min(src.hi, clip.hi)
}; };
// removed by dead control flow // removed by dead control flow
{}
} }
/***/ }), /***/ }),
@@ -5400,7 +5444,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION) /* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION)
/* harmony export */ }); /* harmony export */ });
const PACKAGE_VERSION = "0.24.4"; const PACKAGE_VERSION = "0.25.0-beta1";
/***/ }) /***/ })
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit. // This is a generated file. Don't edit.
const PACKAGE_VERSION = "0.25.0-beta2"; const PACKAGE_VERSION = "0.25.0-beta1";
+1 -8
View File
@@ -54,14 +54,7 @@ module.exports = (env, argv) => {
}, },
performance: { performance: {
maxEntrypointSize: maxAssetSize, maxEntrypointSize: maxAssetSize,
maxAssetSize: maxAssetSize, maxAssetSize: maxAssetSize
assetFilter: function(assetFilename) {
// Exclude all sourcemaps
if (/\.map$/.test(assetFilename)) {
return false;
}
return true;
},
}, },
plugins: [ plugins: [
new CopyPlugin({ new CopyPlugin({