Compare commits
5
Commits
0f8d94ac2f
...
0a1e2d3a3d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a1e2d3a3d | ||
|
|
3a2a9f90d0 | ||
|
|
ca492e2e93 | ||
|
|
ec3974f2f0 | ||
|
|
478fb421bf |
+34
-23
@@ -12,6 +12,7 @@
|
||||
--wallpaper-repeat: repeat;
|
||||
--wallpaper-blur: 0px;
|
||||
--wallpaper-invert: 0;
|
||||
--wallpaper-brightness: 1;
|
||||
--wallpaper-size: contain;
|
||||
--wallpaper-position: center;
|
||||
|
||||
@@ -42,11 +43,12 @@
|
||||
--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-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-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-muted: light-dark(#ddd, #444); /* Softer border, e.g. in-place-edit dashed */
|
||||
--clr-background-off-white: light-dark(#fafafa, #282828); /* Common very light background */
|
||||
--clr-background-off-white: light-dark(#fafafa, #222); /* Common very light background */
|
||||
--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-blue-gray-50: light-dark(#edf0f2, #202c33); /* Contact hover, messages panel, send message panel */
|
||||
@@ -829,7 +831,7 @@ div.trusted-badge {
|
||||
.action-button {
|
||||
display: block;
|
||||
position: absolute;
|
||||
color: var(--clr-text-tertiary);
|
||||
color: var(--clr-text-secondary);
|
||||
font-size: 1.8rem;
|
||||
background-color: var(--clr-background-off-white);
|
||||
border-radius: 50%;
|
||||
@@ -845,12 +847,15 @@ div.trusted-badge {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.action-button:focus, .action-button:hover {
|
||||
color: var(--clr-text-disabled);
|
||||
.action-button:focus,
|
||||
.action-button:hover,
|
||||
.action-button:hover:not([disabled]),
|
||||
.action-button:active:not([disabled]) {
|
||||
color: var(--clr-text-tertiary-activated);
|
||||
background-color: var(--clr-background-light-gray);
|
||||
}
|
||||
.action-button:active {
|
||||
color: light-dark(#777, #666); /* #777 */
|
||||
color: var(--clr-text-tertiary-activated);
|
||||
background-color: var(--clr-background-extra-light-gray);
|
||||
}
|
||||
|
||||
@@ -1763,45 +1768,47 @@ img.channel {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* Scrollable panel where the messages are shown */
|
||||
#messages-panel {
|
||||
#messages-container {
|
||||
position: relative;
|
||||
padding: 0.75rem;
|
||||
overflow-y: scroll;
|
||||
background-color: var(--clr-background-blue-gray-50);
|
||||
overflow-y: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#messages-panel::before {
|
||||
|
||||
#messages-container::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: var(--clr-background-blue-gray-50);
|
||||
background-image: var(--wallpaper-url);
|
||||
background-repeat: var(--wallpaper-repeat);
|
||||
background-size: var(--wallpaper-size);
|
||||
background-position: var(--wallpaper-position);
|
||||
filter: blur(var(--wallpaper-blur)) invert(var(--wallpaper-invert));
|
||||
filter: blur(var(--wallpaper-blur))
|
||||
invert(var(--wallpaper-invert))
|
||||
brightness(var(--wallpaper-brightness));
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* Dark mode asigned by the OS */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#messages-panel::before {
|
||||
background-image: url("../img/bg_messages_dk.png");
|
||||
}
|
||||
/* Dark mode wallpaper adjustments: image wallpaper *
|
||||
#messages-container.dark.wpimg::before {
|
||||
filter: brightness(50%);
|
||||
}
|
||||
|
||||
/* Explicitly set dark mode */
|
||||
#messages-panel[color-scheme="dark"]::before {
|
||||
background-image: url("../img/bg_messages_dk.png");
|
||||
/* Dark mode wallpaper adjustments: pattern wallpaper *
|
||||
#messages-container.dark.wppatt::before {
|
||||
filter: invert(1);
|
||||
}
|
||||
*/
|
||||
|
||||
#messages-container {
|
||||
/* Scrollable panel where the messages are shown */
|
||||
#messages-panel {
|
||||
position: relative;
|
||||
overflow-y: hidden;
|
||||
padding: 0.75rem;
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -3619,6 +3626,10 @@ ul.phone-country-selector span.country {
|
||||
border: 1.5px solid var(--clr-secondary-accent);
|
||||
}
|
||||
|
||||
img.inverted {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
div.toast {
|
||||
visibility: hidden;
|
||||
display: flex;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
Generated
+735
-721
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tinode-webapp",
|
||||
"description": "Tinode messenger for the web",
|
||||
"version": "0.25.0-beta1",
|
||||
"version": "0.25.0-beta2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tinode/webapp.git"
|
||||
@@ -75,7 +75,7 @@
|
||||
"react": "^18.3.0",
|
||||
"react-dom": "^18.3.0",
|
||||
"react-intl": "^7.0.0",
|
||||
"tinode-sdk": "^0.25.0-beta1",
|
||||
"tinode-sdk": "^0.24.0-beta1",
|
||||
"webm-duration-fix": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ export const SELF_AVATAR_URI = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS
|
||||
export const TOAST_DURATION = 3_000;
|
||||
|
||||
// Initial/default color scheme.
|
||||
export const DEFAULT_COLOR_SCHEME = 'light dark';
|
||||
export const DEFAULT_COLOR_SCHEME = 'auto';
|
||||
|
||||
// Default text size in points.
|
||||
export const DEFAULT_TEXT_SIZE = 10;
|
||||
|
||||
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
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "صورة",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "نمط",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "استعادة الافتراضي",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "الخلفيات",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "ضبابية:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "Bild",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "Muster",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Standard wiederherstellen",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Hintergrundbilder",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Unschärfe:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1865,13 +1865,6 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "Wallpapers",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": false,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "image",
|
||||
"defaultMessage": "image",
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "imagen",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "patrón",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Restaurar predeterminado",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Fondos de pantalla",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Desenfoque:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "image",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "motif",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Restaurer par défaut",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Fonds d'écran",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Flou :",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "immagine",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "motivo",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Ripristina predefinito",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Sfondi",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Sfocatura:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "이미지",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "패턴",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "기본값 복원",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "배경화면",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "흐림:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "imagine",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "model",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Restabilește implicit",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Imagini de fundal",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Estompare:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "картинка",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "узор",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Восстановить по умолчанию",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Обои",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Размытие:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "รูปภาพ",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "ลายลวดลาย",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "คืนค่าเริ่มต้น",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "วอลเปเปอร์",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "เบลอ:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "зображення",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "візерунок",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "Відновити типові",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "Шпалери",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "Розмиття:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "圖片",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "圖案",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "恢復預設",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "桌布",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "模糊:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-24
@@ -1865,53 +1865,39 @@
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers:",
|
||||
"description": "Label for selecting wallpapers in Settings",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"tabtitle_image": {
|
||||
"translation": "",
|
||||
"translation": "图片",
|
||||
"defaultMessage": "image",
|
||||
"description": "Tab title Image",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"tabtitle_pattern": {
|
||||
"translation": "",
|
||||
"translation": "图案",
|
||||
"defaultMessage": "pattern",
|
||||
"description": "Tab title Pattern",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"sidepanel_title_wallpapers": {
|
||||
"translation": "",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Sidepanel title for WallpapersView.",
|
||||
"missing": true,
|
||||
"obsolete": true
|
||||
},
|
||||
"button_restore": {
|
||||
"translation": "",
|
||||
"translation": "恢复默认",
|
||||
"defaultMessage": "Restore default",
|
||||
"description": "Reset setting to default",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"wallpapers": {
|
||||
"translation": "",
|
||||
"translation": "壁纸",
|
||||
"defaultMessage": "Wallpapers",
|
||||
"description": "Link or title for working with wallpapers.",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_blur_wallpaper": {
|
||||
"translation": "",
|
||||
"translation": "模糊:",
|
||||
"defaultMessage": "Blur:",
|
||||
"description": "Label adjusting blur amount",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// This is a generated file. Don't edit.
|
||||
|
||||
export const PACKAGE_VERSION = "0.25.0-beta1";
|
||||
export const PACKAGE_VERSION = "0.25.0-beta2";
|
||||
|
||||
@@ -7,7 +7,7 @@ export default class AccGeneralView extends React.PureComponent {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
colorSchema: props.colorSchema || 'light dark',
|
||||
colorSchema: props.colorSchema || 'auto',
|
||||
textSize: (props.textSize * 10) || '100',
|
||||
sendOnEnter: props.sendOnEnter || 'plain',
|
||||
};
|
||||
@@ -49,8 +49,8 @@ export default class AccGeneralView extends React.PureComponent {
|
||||
<div className="panel-form-row">
|
||||
<ul className="quoted">
|
||||
<li key="system">
|
||||
<input type="radio" id="system" name="color-scheme-select" value="light dark"
|
||||
checked={this.state.colorSchema == 'light dark'}
|
||||
<input type="radio" id="system" name="color-scheme-select" value="auto"
|
||||
checked={this.state.colorSchema == 'auto'}
|
||||
onChange={this.handleColorSchemaSelected} />
|
||||
<label htmlFor="system">
|
||||
<FormattedMessage id="color_schema_system" defaultMessage="System default" description="Name of the color schema"/>
|
||||
|
||||
@@ -1706,15 +1706,16 @@ class MessagesView extends React.Component {
|
||||
this.props.online ? 'online' + (this.state.typingIndicator ? ' typing' : '') : 'offline';
|
||||
|
||||
const titleClass = 'panel-title' + (this.state.deleted ? ' deleted' : '');
|
||||
const darkModeClass = this.props.colorSchema == 'dark' ? 'dark' : '';
|
||||
|
||||
let messagesComponent = (
|
||||
<>
|
||||
<div id="messages-container">
|
||||
<div id="messages-container" className={darkModeClass}>
|
||||
<button id="go-to-latest" className={'action-button' + (this.state.showGoToLastButton ? '' : ' hidden')}
|
||||
onClick={this.goToLatestMessage}>
|
||||
<i className="material-icons">arrow_downward</i>
|
||||
</button>
|
||||
<div id="messages-panel" ref={this.handleScrollReference} color-scheme={this.props.colorSchema}>
|
||||
<div id="messages-panel" ref={this.handleScrollReference}>
|
||||
<ul id="scroller" className={chatBoxClass}>
|
||||
{messageNodes}
|
||||
</ul>
|
||||
|
||||
@@ -254,6 +254,7 @@ class SidepanelView extends React.PureComponent {
|
||||
<Suspense fallback={<div className="panel-form-row"><FormattedMessage id="loading_note"
|
||||
defaultMessage="Loading..." description="Message shown when component is loading"/></div>}>
|
||||
<WallpapersView
|
||||
colorSchema={this.props.colorSchema !== 'auto' ? this.props.colorSchema : this.props.systemColorSchema}
|
||||
onWallpaperSelected={this.props.onWallpaperSelected}
|
||||
/>
|
||||
</Suspense> :
|
||||
|
||||
+52
-26
@@ -204,7 +204,12 @@ class TinodeWeb extends React.Component {
|
||||
getBlankState() {
|
||||
const settings = LocalStorageUtil.getObject('settings') || {};
|
||||
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 {
|
||||
connected: false,
|
||||
// Connected and subscribed to 'me'
|
||||
@@ -219,9 +224,17 @@ class TinodeWeb extends React.Component {
|
||||
// "On" is the default, so saving the "off" state.
|
||||
messageSounds: !settings.messageSoundsOff,
|
||||
incognitoMode: false,
|
||||
colorSchema: settings.colorSchema || DEFAULT_COLOR_SCHEME, // default: system default
|
||||
textSize: settings.textSize || DEFAULT_TEXT_SIZE, // default size: 10pt
|
||||
sendOnEnter: settings.sendOnEnter || 'plain', // default: 'plain' (just Enter)
|
||||
// Manually selected color scheme. Default: 'system default' ('auto').
|
||||
colorSchema: settings.colorSchema || DEFAULT_COLOR_SCHEME,
|
||||
systemColorSchema: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',
|
||||
// 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.
|
||||
desktopAlerts: persist && !!settings.desktopAlerts,
|
||||
// Enable / disable checkbox.
|
||||
@@ -306,17 +319,15 @@ class TinodeWeb extends React.Component {
|
||||
// Window/tab visible or invisible for pausing timers.
|
||||
document.addEventListener('visibilitychange', this.handleVisibilityEvent);
|
||||
|
||||
document.documentElement.style.colorScheme = this.state.colorSchema;
|
||||
document.documentElement.style.colorScheme = this.state.colorSchema == 'auto' ? 'light dark' : this.state.colorSchema;
|
||||
document.documentElement.style.setProperty('--message-text-size', `${this.state.textSize}pt`);
|
||||
|
||||
const settings = LocalStorageUtil.getObject('settings') || {};
|
||||
if (!settings.wallpaper) {
|
||||
const wallpaper = defaultWallpaper();
|
||||
settings.wallpaper = wallpaper.name || '';
|
||||
settings.wallpaperSize = wallpaper.size || 0;
|
||||
settings.wallpaperBlur = 0;
|
||||
}
|
||||
this.applyWallpaperSettings(settings.wallpaper, settings.wallpaperSize, settings.wallpaperBlur);
|
||||
this.applyWallpaperSettings(this.state.wallpaper, this.state.wallpaperSize, this.state.wallpaperBlur,
|
||||
this.state.colorSchema == 'auto' ? this.state.systemColorSchema : this.state.colorSchema);
|
||||
|
||||
console.log("Wallpaper settings:", this.state.wallpaper, this.state.wallpaperSize, this.state.wallpaperBlur);
|
||||
console.log("Wallpaper type:", this.state.wallpaperSize == 0 ? 'wpimg' : 'wppatt');
|
||||
console.log("System color scheme:", this.state.systemColorSchema);
|
||||
|
||||
// Process background notifications from the service worker.
|
||||
if (typeof BroadcastChannel == 'function') {
|
||||
@@ -1250,18 +1261,28 @@ class TinodeWeb extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
// Manual change of color scheme.
|
||||
handleChangeColorSchema(scheme) {
|
||||
this.setState({colorSchema: scheme});
|
||||
LocalStorageUtil.updateObject('settings', {colorSchema: scheme});
|
||||
document.documentElement.style.colorScheme = scheme;
|
||||
// Manual change of color scheme: 'dark', 'light', 'auto'.
|
||||
handleChangeColorSchema(schema) {
|
||||
console.log("User color scheme change:", schema);
|
||||
this.setState({colorSchema: schema});
|
||||
LocalStorageUtil.updateObject('settings', {colorSchema: schema});
|
||||
document.documentElement.style.colorScheme = schema == 'auto' ? 'light dark' : schema;
|
||||
this.applyColorSchema(schema, this.state.systemColorSchema, this.state.wallpaperSize);
|
||||
}
|
||||
|
||||
// System color scheme has changed.
|
||||
handleColorSchemeChange(event) {
|
||||
console.log("Color scheme change:", event.matches ? 'dark' : 'not dark');
|
||||
// this.setState({colorSchema: event.matches ? 'dark' : 'light'});
|
||||
// document.documentElement.style.setProperty('--wallpaper-invert', '0');
|
||||
const systemSchema = event.matches ? 'dark' : 'light';
|
||||
console.log("System color scheme change:", systemSchema);
|
||||
this.setState({systemColorSchema: systemSchema});
|
||||
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() {
|
||||
@@ -1269,19 +1290,22 @@ class TinodeWeb extends React.Component {
|
||||
HashNavigation.navigateTo(HashNavigation.setUrlSidePanel(window.location.hash, 'wallpapers'));
|
||||
}
|
||||
|
||||
applyWallpaperSettings(wallpaper, size, blur) {
|
||||
console.log("Applying wallpaper settings:", wallpaper, size, blur);
|
||||
applyWallpaperSettings(wallpaper, size, blur, effectiveSchema) {
|
||||
document.documentElement.style.setProperty('--wallpaper-url', `url('${wallpaper}')`);
|
||||
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-size', size ? `${size}px` : 'cover');
|
||||
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) {
|
||||
this.handleError();
|
||||
LocalStorageUtil.updateObject('settings', {wallpaper: wallpaper, wallpaperSize: size, wallpaperBlur: blur});
|
||||
this.applyWallpaperSettings(wallpaper, size, blur);
|
||||
this.setState({wallpaper: wallpaper, wallpaperSize: size, wallpaperBlur: blur});
|
||||
this.applyWallpaperSettings(wallpaper, size, blur,
|
||||
this.state.colorSchema == 'auto' ? this.state.systemColorSchema : this.state.colorSchema);
|
||||
}
|
||||
|
||||
handleChangeTextSize(size) {
|
||||
@@ -1564,7 +1588,7 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
|
||||
// Reset color scheme.
|
||||
document.documentElement.style.colorScheme = DEFAULT_COLOR_SCHEME;
|
||||
document.documentElement.style.colorScheme = DEFAULT_COLOR_SCHEME == 'auto' ? 'light dark' : DEFAULT_COLOR_SCHEME;
|
||||
document.documentElement.style.setProperty('--message-text-size', `${DEFAULT_TEXT_SIZE}pt`);
|
||||
|
||||
clearInterval(this.reconnectCountdown);
|
||||
@@ -2061,6 +2085,7 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const colorSchema = this.state.colorSchema !== 'auto' ? this.state.colorSchema : this.state.systemColorSchema;
|
||||
return (
|
||||
<div id="app-container" ref={this.selfRef}>
|
||||
{this.state.contextMenuVisible ?
|
||||
@@ -2161,6 +2186,7 @@ class TinodeWeb extends React.Component {
|
||||
reqCredMethod={this.state.reqCredMethod}
|
||||
textSize={this.state.textSize}
|
||||
colorSchema={this.state.colorSchema}
|
||||
systemColorSchema={this.state.systemColorSchema}
|
||||
sendOnEnter={this.state.sendOnEnter}
|
||||
|
||||
onGlobalSettings={this.handleGlobalSettings}
|
||||
@@ -2222,7 +2248,7 @@ class TinodeWeb extends React.Component {
|
||||
serverVersion={this.state.serverVersion}
|
||||
serverAddress={this.state.serverAddress}
|
||||
applicationVisible={this.state.applicationVisible}
|
||||
colorSchema={this.state.colorSchema}
|
||||
colorSchema={colorSchema}
|
||||
sendOnEnter={this.state.sendOnEnter}
|
||||
wallpaper={this.state.wallpaper}
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ export default class WallpapersView extends React.PureComponent {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
tab: WALLPAPER_DEFAULTS.type, // 'patt' | 'img'
|
||||
tab: WALLPAPER_DEFAULTS.type, // currently selected tab: 'patt' | 'img'
|
||||
selectedType: WALLPAPER_DEFAULTS.type, // type of the selected wallpaper.
|
||||
wallpaper: imageIndex[WALLPAPER_DEFAULTS.type][WALLPAPER_DEFAULTS.index].name,
|
||||
blur: 0,
|
||||
};
|
||||
@@ -39,11 +40,11 @@ export default class WallpapersView extends React.PureComponent {
|
||||
e.preventDefault();
|
||||
type = this.state.tab;
|
||||
index = e.currentTarget.dataset.id;
|
||||
blur = this.state.blur;
|
||||
blur = type == 'patt' ? 0 : this.state.blur;
|
||||
}
|
||||
const fname = imageIndex[type][index].name;
|
||||
const size = type == 'patt' ? imageIndex[type][index].size : 0;
|
||||
this.setState({tab: type, wallpaper: fname, blur: 0});
|
||||
this.setState({tab: type, wallpaper: fname, selectedType: type, blur: blur});
|
||||
this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]);
|
||||
}
|
||||
|
||||
@@ -51,8 +52,10 @@ export default class WallpapersView extends React.PureComponent {
|
||||
e.preventDefault();
|
||||
const blur = e.currentTarget.value;
|
||||
this.setState({blur: blur});
|
||||
// Path relative to CSS file.
|
||||
this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]);
|
||||
if (this.state.selectedType == 'img') {
|
||||
// Apply blur to patterns only. Path relative to CSS file.
|
||||
this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -83,9 +86,10 @@ export default class WallpapersView extends React.PureComponent {
|
||||
<div className="image-grid">
|
||||
{imageIndex.patt.map((img, idx) => {
|
||||
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}`}
|
||||
onClick={this.handleWallpaperSelected}>
|
||||
<img src={WALLPAPER_DEFAULTS.path + img.name} alt={img.name}
|
||||
<img src={WALLPAPER_DEFAULTS.path + img.name} alt={img.name} className={dark}
|
||||
style={{ width: `${img.size}px`, height: `${img.size}px` }}/>
|
||||
</div>
|
||||
})}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,2 +1,2 @@
|
||||
"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%"}}))})))))}}}}]);
|
||||
"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%"}}))})))))}}}}]);
|
||||
//# sourceMappingURL=827.prod.js.map
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+57
-29
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
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
@@ -28,6 +28,7 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
super(props);
|
||||
this.state = {
|
||||
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,
|
||||
blur: 0
|
||||
};
|
||||
@@ -53,14 +54,15 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
e.preventDefault();
|
||||
type = this.state.tab;
|
||||
index = e.currentTarget.dataset.id;
|
||||
blur = this.state.blur;
|
||||
blur = type == 'patt' ? 0 : this.state.blur;
|
||||
}
|
||||
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;
|
||||
this.setState({
|
||||
tab: type,
|
||||
wallpaper: fname,
|
||||
blur: 0
|
||||
selectedType: type,
|
||||
blur: blur
|
||||
});
|
||||
this.props.onWallpaperSelected(`../${_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]);
|
||||
}
|
||||
@@ -70,7 +72,9 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
this.setState({
|
||||
blur: blur
|
||||
});
|
||||
this.props.onWallpaperSelected(`../${_config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[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]);
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
||||
@@ -121,6 +125,7 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
className: "image-grid"
|
||||
}, _img_bkg_index_json__WEBPACK_IMPORTED_MODULE_4__.patt.map((img, idx) => {
|
||||
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", {
|
||||
key: idx,
|
||||
"data-id": idx,
|
||||
@@ -129,6 +134,7 @@ class WallpapersView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", {
|
||||
src: _config_js__WEBPACK_IMPORTED_MODULE_3__.WALLPAPER_DEFAULTS.path + img.name,
|
||||
alt: img.name,
|
||||
className: dark,
|
||||
style: {
|
||||
width: `${img.size}px`,
|
||||
height: `${img.size}px`
|
||||
|
||||
File diff suppressed because one or more lines are too long
+8
-52
@@ -3753,38 +3753,6 @@ class TopicMe extends _topic_js__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
||||
getCredentials() {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
@@ -4347,12 +4315,6 @@ class Topic {
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
pinTopic(topic, pin) {
|
||||
return Promise.reject(new Error("Pinning topics is not supported here"));
|
||||
}
|
||||
pinnedTopicRank(topic) {
|
||||
return 0;
|
||||
}
|
||||
delMessages(ranges, hard) {
|
||||
if (!this._attached) {
|
||||
return Promise.reject(new Error("Cannot delete messages in inactive topic"));
|
||||
@@ -5044,14 +5006,10 @@ class Topic {
|
||||
acs: sub.acs
|
||||
});
|
||||
}
|
||||
if (!this._users[sub.user]) {
|
||||
this.subcnt++;
|
||||
}
|
||||
user = this._updateCachedUser(sub.user, sub);
|
||||
} else {
|
||||
delete this._users[sub.user];
|
||||
user = sub;
|
||||
this.subcnt--;
|
||||
}
|
||||
if (this.onMetaSub) {
|
||||
this.onMetaSub(user);
|
||||
@@ -5246,7 +5204,7 @@ function rfc3339DateString(d) {
|
||||
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';
|
||||
}
|
||||
function mergeObj(dst, src) {
|
||||
function mergeObj(dst, src, ignore) {
|
||||
if (typeof src != 'object') {
|
||||
if (src === undefined) {
|
||||
return dst;
|
||||
@@ -5257,7 +5215,7 @@ function mergeObj(dst, src) {
|
||||
return src;
|
||||
}
|
||||
if (src === null) {
|
||||
return dst;
|
||||
return src;
|
||||
}
|
||||
if (src instanceof Date && !isNaN(src)) {
|
||||
return !dst || !(dst instanceof Date) || isNaN(dst) || dst < src ? src : dst;
|
||||
@@ -5272,18 +5230,16 @@ function mergeObj(dst, src) {
|
||||
dst = src.constructor();
|
||||
}
|
||||
for (let prop in src) {
|
||||
if (src.hasOwnProperty(prop) && prop != '_noForwarding') {
|
||||
if (src.hasOwnProperty(prop) && (!ignore || !ignore[prop]) && prop != '_noForwarding') {
|
||||
try {
|
||||
dst[prop] = mergeObj(dst[prop], src[prop]);
|
||||
} catch (err) {
|
||||
console.warn("Error merging property:", prop, err);
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
function mergeToCache(cache, key, newval) {
|
||||
cache[key] = mergeObj(cache[key], newval);
|
||||
function mergeToCache(cache, key, newval, ignore) {
|
||||
cache[key] = mergeObj(cache[key], newval, ignore);
|
||||
return cache[key];
|
||||
}
|
||||
function simplify(obj) {
|
||||
@@ -5429,7 +5385,7 @@ function clipInRange(src, clip) {
|
||||
hi: Math.min(src.hi, clip.hi)
|
||||
};
|
||||
// removed by dead control flow
|
||||
|
||||
{}
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
@@ -5444,7 +5400,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION)
|
||||
/* harmony export */ });
|
||||
const PACKAGE_VERSION = "0.25.0-beta1";
|
||||
const PACKAGE_VERSION = "0.24.4";
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1194
-1520
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,3 +1,3 @@
|
||||
// This is a generated file. Don't edit.
|
||||
|
||||
const PACKAGE_VERSION = "0.25.0-beta1";
|
||||
const PACKAGE_VERSION = "0.25.0-beta2";
|
||||
|
||||
+8
-1
@@ -54,7 +54,14 @@ module.exports = (env, argv) => {
|
||||
},
|
||||
performance: {
|
||||
maxEntrypointSize: maxAssetSize,
|
||||
maxAssetSize: maxAssetSize
|
||||
maxAssetSize: maxAssetSize,
|
||||
assetFilter: function(assetFilename) {
|
||||
// Exclude all sourcemaps
|
||||
if (/\.map$/.test(assetFilename)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
|
||||
Reference in New Issue
Block a user