From 8bb5d775b4ce24193f8372a9b541e1ce270e839f Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Thu, 20 Feb 2020 20:47:24 +0200 Subject: update pleroma-dark and pleroma-light --- static/styles.json | 4 +- static/themes/pleroma-dark.json | 543 +++++++++++++++++++++++++++++++++++++ static/themes/pleroma-light.json | 570 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 1115 insertions(+), 2 deletions(-) create mode 100644 static/themes/pleroma-dark.json create mode 100644 static/themes/pleroma-light.json (limited to 'static') diff --git a/static/styles.json b/static/styles.json index 3349a837..23f57c65 100644 --- a/static/styles.json +++ b/static/styles.json @@ -1,6 +1,6 @@ { - "pleroma-dark": [ "Pleroma Dark", "#121a24", "#182230", "#b9b9ba", "#d8a070", "#d31014", "#0fa00f", "#0095ff", "#ffa500" ], - "pleroma-light": [ "Pleroma Light", "#f2f4f6", "#dbe0e8", "#304055", "#f86f0f", "#d31014", "#0fa00f", "#0095ff", "#ffa500" ], + "pleroma-dark": "/static/themes/pleroma-dark.json", + "pleroma-light": "/static/themes/pleroma-light.json", "pleroma-amoled": [ "Pleroma Dark AMOLED", "#000000", "#111111", "#b0b0b1", "#d8a070", "#aa0000", "#0fa00f", "#0095ff", "#d59500"], "classic-dark": [ "Classic Dark", "#161c20", "#282e32", "#b9b9b9", "#baaa9c", "#d31014", "#0fa00f", "#0095ff", "#ffa500" ], "bird": [ "Bird", "#f8fafd", "#e6ecf0", "#14171a", "#0084b8", "#e0245e", "#17bf63", "#1b95e0", "#fab81e"], diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json new file mode 100644 index 00000000..2de001da --- /dev/null +++ b/static/themes/pleroma-dark.json @@ -0,0 +1,543 @@ +{ + "_pleroma_theme_version": 2, + "name": "Pleroma Dark", + "theme": { + "themeEngineVersion": 3, + "shadows": { + "panel": [ + { + "x": "0", + "y": "0", + "blur": "3", + "spread": 0, + "color": "#000000", + "alpha": "0.5" + }, + { + "x": "0", + "y": "4", + "blur": "6", + "spread": "3", + "inset": false, + "color": "#000000", + "alpha": "0.3" + } + ], + "topBar": [ + { + "x": 0, + "y": "1", + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": "0.4" + }, + { + "x": 0, + "y": "2", + "blur": "7", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": "0.3" + } + ], + "popup": [ + { + "x": 2, + "y": 2, + "blur": 3, + "spread": 0, + "color": "#000000", + "alpha": 0.5 + } + ], + "avatar": [ + { + "x": 0, + "y": 1, + "blur": 8, + "spread": 0, + "color": "#000000", + "alpha": 0.7 + } + ], + "avatarStatus": [], + "panelHeader": [ + { + "x": 0, + "y": "1", + "blur": "3", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": "0.4" + }, + { + "x": "0", + "y": "1", + "blur": "0", + "spread": 0, + "inset": true, + "color": "#ffffff", + "alpha": "0.2" + } + ], + "button": [ + { + "x": 0, + "y": 0, + "blur": 2, + "spread": 0, + "color": "#000000", + "alpha": 1 + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "buttonHover": [ + { + "x": 0, + "y": 0, + "blur": "1", + "spread": "2", + "color": "#b9b9ba", + "alpha": "0.4", + "inset": true + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "buttonPressed": [ + { + "x": 0, + "y": 0, + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": 1, + "inset": true + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": 0, + "blur": "2", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": 1 + } + ], + "input": [ + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": 0, + "blur": 2, + "inset": true, + "spread": 0, + "color": "#000000", + "alpha": 1 + } + ] + }, + "colors": { + "underlay": "#090e14", + "bg": "#0f161e", + "fg": "#151e2b", + "cRed": "#d31014", + "cOrange": "#ffc459", + "cGreen": "#5dc94a", + "cBlue": "#81beea", + "accent": "#e2b188", + "link": "#e2b188", + "text": "#b9b9ba", + "badgeNotification": "#e15932", + "badgeNotificationText": "#ffffff", + "panel": "#151e2b", + "panelText": "#b9b9ba", + "alertNeutral": "#b9b9ba", + "alertNeutralPanelText": "#ffffff", + "alertNeutralText": "#ffffff", + "alertWarning": "#ffc459", + "alertWarningPanelText": "#ffffff", + "alertWarningText": "#ffffff", + "alertError": "#d31014", + "alertErrorPanelText": "#b9b9ba", + "alertErrorText": "#f0f0f0", + "fgText": "#b9b9ba", + "topBar": "#151e2b", + "topBarText": "#a0a5aa", + "input": "#151e2b", + "inputTopbarText": "#a0a5aa", + "inputPanelText": "#b9b9ba", + "inputText": "#b9b9ba", + "btn": "#151e2b", + "btnText": "#b9b9ba", + "btnTopBarText": "#b9b9ba", + "btnDisabled": "#111822", + "btnDisabledTopBarText": "#3b4148", + "btnPanelText": "#b9b9ba", + "btnDisabledPanelText": "#3b4148", + "btnDisabledText": "#3b4148", + "btnToggled": "#c08f60", + "btnToggledTopBarText": "#000000", + "btnToggledPanelText": "#000000", + "btnToggledText": "#000000", + "btnPressed": "#151e2b", + "btnPressedTopBarText": "#b9b9ba", + "btnPressedTopBar": "#151e2b", + "btnPressedPanelText": "#b9b9ba", + "btnPressedPanel": "#151e2b", + "btnPressedText": "#b9b9ba", + "tabActiveText": "#b9b9ba", + "tabText": "#b9b9ba", + "tab": "#151e2b", + "fgLink": "#e2b188", + "topBarLink": "#a0a5aa", + "panelLink": "#e2b188", + "panelFaint": "#b9b9ba", + "icon": "#64686c", + "poll": "#645449", + "pollText": "#ffffff", + "border": "#1b232d", + "postLink": "#e2b188", + "lightText": "#ededed", + "popover": "#0f161e", + "selectedMenuPopover": "#18232f", + "highlight": "#18232f", + "highlightText": "#b9b9ba", + "selectedMenu": "#18232f", + "selectedMenuText": "#b9b9ba", + "selectedMenuPopoverIcon": "#696e75", + "highlightLink": "#e2b188", + "selectedMenuLink": "#e2b188", + "selectedMenuPopoverLink": "#e2b188", + "selectedMenuPopoverText": "#b9b9ba", + "faintLink": "#e2b188", + "highlightFaintLink": "#e2b188", + "selectedMenuFaintLink": "#e2b188", + "selectedMenuPopoverFaintLink": "#e2b188", + "faint": "#b9b9ba", + "highlightFaintText": "#b9b9ba", + "selectedMenuFaintText": "#b9b9ba", + "selectedMenuPopoverFaintText": "#b9b9ba", + "highlightLightText": "#ededed", + "selectedMenuLightText": "#ededed", + "selectedMenuPopoverLightText": "#ededed", + "selectedMenuIcon": "#696e75", + "selectedPost": "#18232f", + "selectedPostText": "#b9b9ba", + "selectedPostIcon": "#696e75", + "selectedPostLink": "#e2b188", + "selectedPostFaintLink": "#e2b188", + "highlightPostLink": "#e2b188", + "selectedPostPostLink": "#e2b188", + "selectedPostLightText": "#ededed", + "selectedPostFaintText": "#b9b9ba", + "popoverText": "#b9b9ba", + "popoverIcon": "#64686c", + "popoverLink": "#e2b188", + "postFaintLink": "#e2b188", + "popoverPostFaintLink": "#e2b188", + "popoverFaintLink": "#e2b188", + "popoverFaintText": "#b9b9ba", + "popoverPostLink": "#e2b188", + "popoverLightText": "#ededed", + "highlightIcon": "#696e75", + "highlightPostFaintLink": "#e2b188", + "profileTint": "#0f161e", + "profileBg": "#070c11" + }, + "opacity": { + "underlay": 0.6, + "bg": 1, + "panel": 1, + "alert": 0.5, + "input": 0.5, + "btn": 1, + "faint": 0.5, + "border": 1, + "popover": 1, + "profileTint": 0.5 + }, + "radii": { + "btn": "3", + "input": "3", + "checkbox": 2, + "panel": "3", + "avatar": "3", + "avatarAlt": 50, + "tooltip": 2, + "attachment": "3" + }, + "fonts": { + "interface": { + "family": "sans-serif" + }, + "input": { + "family": "inherit" + }, + "post": { + "family": "inherit" + }, + "postCode": { + "family": "monospace" + } + } + }, + "source": { + "themeEngineVersion": 3, + "fonts": {}, + "shadows": { + "buttonHover": [ + { + "x": 0, + "y": 0, + "blur": "1", + "spread": "2", + "color": "#b9b9ba", + "alpha": "0.4", + "inset": true + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "buttonPressed": [ + { + "x": 0, + "y": 0, + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": 1, + "inset": true + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": 0, + "blur": "2", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": 1 + } + ], + "panelHeader": [ + { + "x": 0, + "y": "1", + "blur": "3", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": "0.4" + }, + { + "x": "0", + "y": "1", + "blur": "0", + "spread": 0, + "inset": true, + "color": "#ffffff", + "alpha": "0.2" + } + ], + "panel": [ + { + "x": "0", + "y": "0", + "blur": "3", + "spread": 0, + "color": "#000000", + "alpha": "0.5" + }, + { + "x": "0", + "y": "4", + "blur": "6", + "spread": "3", + "inset": false, + "color": "#000000", + "alpha": "0.3" + } + ], + "button": [ + { + "x": 0, + "y": 0, + "blur": 2, + "spread": 0, + "color": "#000000", + "alpha": 1 + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "topBar": [ + { + "x": 0, + "y": "1", + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": "0.4" + }, + { + "x": 0, + "y": "2", + "blur": "7", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": "0.3" + } + ] + }, + "opacity": { + "underlay": "0.6" + }, + "colors": { + "bg": "#0f161e", + "fg": "#151e2b", + "text": "#b9b9ba", + "underlay": "#090e14", + "accent": "#e2b188", + "cBlue": "#81beea", + "cRed": "#d31014", + "cGreen": "#5dc94a", + "cOrange": "#ffc459", + "border": "#1b232d", + "topBarText": "#a0a5aa", + "topBarLink": "#A0A5AA", + "btnToggled": "#c08f60", + "alertErrorText": "#f0f0f0", + "badgeNotification": "#e15932", + "badgeNotificationText": "#ffffff" + }, + "radii": { + "btn": "3", + "input": "3", + "panel": "3", + "avatar": "3", + "attachment": "3" + } + } +} diff --git a/static/themes/pleroma-light.json b/static/themes/pleroma-light.json new file mode 100644 index 00000000..f8cefc9b --- /dev/null +++ b/static/themes/pleroma-light.json @@ -0,0 +1,570 @@ +{ + "_pleroma_theme_version": 2, + "name": "Pleroma Light", + "theme": { + "themeEngineVersion": 3, + "shadows": { + "panel": [ + { + "x": "0", + "y": 1, + "blur": "3", + "spread": 0, + "color": "#000000", + "alpha": "0.5" + }, + { + "x": "0", + "y": "3", + "blur": "6", + "spread": "1", + "inset": false, + "color": "#000000", + "alpha": "0.2" + } + ], + "topBar": [ + { + "x": 0, + "y": 0, + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": 0.6 + } + ], + "popup": [ + { + "x": "1", + "y": "2", + "blur": "2", + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": "1", + "y": "3", + "blur": "7", + "spread": "0", + "inset": false, + "color": "#000000", + "alpha": "0.2" + } + ], + "avatar": [ + { + "x": 0, + "y": 1, + "blur": 8, + "spread": 0, + "color": "#000000", + "alpha": 0.7 + } + ], + "avatarStatus": [ + { + "x": 0, + "y": "1", + "blur": "4", + "spread": "0", + "inset": false, + "color": "#000000", + "alpha": "0.2" + } + ], + "panelHeader": [ + { + "x": 0, + "y": "1", + "blur": 0, + "spread": 0, + "inset": true, + "color": "#ffffff", + "alpha": "0.5" + }, + { + "x": 0, + "y": "1", + "blur": "3", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": "0.3" + } + ], + "button": [ + { + "x": 0, + "y": 0, + "blur": 2, + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": "0.5", + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "buttonHover": [ + { + "x": 0, + "y": 0, + "blur": "2", + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": 0, + "y": "0", + "blur": "1", + "spread": "2", + "color": "#ffc39f", + "alpha": "1", + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "buttonPressed": [ + { + "x": 0, + "y": 0, + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": 0, + "y": 1, + "blur": "1", + "spread": "2", + "color": "#000000", + "alpha": "0.3", + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + } + ], + "input": [ + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": 0, + "blur": "2", + "inset": true, + "spread": 0, + "color": "#000000", + "alpha": "0.15" + } + ] + }, + "colors": { + "underlay": "#5d6086", + "bg": "#f2f6f9", + "fg": "#d6dfed", + "cRed": "#d31014", + "cOrange": "#ffa500", + "cGreen": "#0fa00f", + "cBlue": "#0095ff", + "accent": "#f55b1b", + "link": "#f55b1b", + "text": "#304055", + "badgeNotification": "#e83802", + "badgeNotificationText": "#ffffff", + "panel": "#d6dfed", + "panelText": "#304055", + "alertNeutral": "#304055", + "alertNeutralPanelText": "#000000", + "alertNeutralText": "#000000", + "alertWarning": "#ffa500", + "alertWarningPanelText": "#304055", + "alertWarningText": "#304055", + "alertError": "#d31014", + "alertErrorPanelText": "#000000", + "alertErrorText": "#000000", + "fgText": "#304055", + "topBar": "#d6dfed", + "topBarText": "#304055", + "input": "#dee3ed", + "inputTopbarText": "#304055", + "inputPanelText": "#304055", + "inputText": "#304055", + "btn": "#d6dfed", + "btnText": "#304055", + "btnTopBarText": "#304055", + "btnDisabled": "#ebf1f6", + "btnDisabledTopBarText": "#bdc5ce", + "btnPanelText": "#304055", + "btnDisabledPanelText": "#bdc5ce", + "btnDisabledText": "#bdc5ce", + "btnToggled": "#db9d77", + "btnToggledTopBarText": "#304055", + "btnToggledPanelText": "#304055", + "btnToggledText": "#304055", + "btnPressed": "#d6dfed", + "btnPressedTopBarText": "#304055", + "btnPressedTopBar": "#d6dfed", + "btnPressedPanelText": "#304055", + "btnPressedPanel": "#d6dfed", + "btnPressedText": "#304055", + "tabActiveText": "#304055", + "tabText": "#304055", + "tab": "#d6dfed", + "fgLink": "#e44a0a", + "topBarLink": "#304055", + "panelLink": "#f55b1b", + "panelFaint": "#304055", + "icon": "#919ba7", + "poll": "#f4b8a1", + "pollText": "#304055", + "border": "#d8e6f9", + "postLink": "#e44a0a", + "lightText": "#0c0f14", + "popover": "#f2f6f9", + "selectedMenuPopover": "#e1eaf1", + "highlight": "#e1eaf1", + "highlightText": "#304055", + "selectedMenu": "#e1eaf1", + "selectedMenuText": "#304055", + "selectedMenuPopoverIcon": "#8995a3", + "highlightLink": "#e44a0a", + "selectedMenuLink": "#f55b1b", + "selectedMenuPopoverLink": "#e44a0a", + "selectedMenuPopoverText": "#304055", + "faintLink": "#f55b1b", + "highlightFaintLink": "#e44a0a", + "selectedMenuFaintLink": "#f55b1b", + "selectedMenuPopoverFaintLink": "#e44a0a", + "faint": "#304055", + "highlightFaintText": "#304055", + "selectedMenuFaintText": "#304055", + "selectedMenuPopoverFaintText": "#304055", + "highlightLightText": "#0c0f14", + "selectedMenuLightText": "#0c0f14", + "selectedMenuPopoverLightText": "#0c0f14", + "selectedMenuIcon": "#8995a3", + "selectedPost": "#e1eaf1", + "selectedPostText": "#304055", + "selectedPostIcon": "#8995a3", + "selectedPostLink": "#f55b1b", + "selectedPostFaintLink": "#f55b1b", + "highlightPostLink": "#f55b1b", + "selectedPostPostLink": "#e44a0a", + "selectedPostLightText": "#0c0f14", + "selectedPostFaintText": "#304055", + "popoverText": "#304055", + "popoverIcon": "#919ba7", + "popoverLink": "#e44a0a", + "postFaintLink": "#e44a0a", + "popoverPostFaintLink": "#f55b1b", + "popoverFaintLink": "#e44a0a", + "popoverFaintText": "#304055", + "popoverPostLink": "#f55b1b", + "popoverLightText": "#0c0f14", + "highlightIcon": "#8995a3", + "highlightPostFaintLink": "#f55b1b", + "profileTint": "#f2f6f9", + "profileBg": "#808992" + }, + "opacity": { + "underlay": 0.4, + "bg": 1, + "panel": 1, + "alert": 0.5, + "input": 0.5, + "btn": 1, + "faint": 0.5, + "border": 1, + "popover": 1, + "profileTint": 0.5 + }, + "radii": { + "btn": "3", + "input": "3", + "checkbox": 2, + "panel": "3", + "avatar": "3", + "avatarAlt": 50, + "tooltip": 2, + "attachment": "3" + }, + "fonts": { + "interface": { + "family": "sans-serif" + }, + "input": { + "family": "inherit" + }, + "post": { + "family": "inherit" + }, + "postCode": { + "family": "monospace" + } + } + }, + "source": { + "themeEngineVersion": 3, + "fonts": {}, + "shadows": { + "button": [ + { + "x": 0, + "y": 0, + "blur": 2, + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": "0.5", + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "buttonHover": [ + { + "x": 0, + "y": 0, + "blur": "2", + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": 0, + "y": "0", + "blur": "1", + "spread": "2", + "color": "#ffc39f", + "alpha": "1", + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + } + ], + "input": [ + { + "x": 0, + "y": 1, + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + }, + { + "x": 0, + "y": 0, + "blur": "2", + "inset": true, + "spread": 0, + "color": "#000000", + "alpha": "0.15" + } + ], + "panel": [ + { + "x": "0", + "y": 1, + "blur": "3", + "spread": 0, + "color": "#000000", + "alpha": "0.5" + }, + { + "x": "0", + "y": "3", + "blur": "6", + "spread": "1", + "inset": false, + "color": "#000000", + "alpha": "0.2" + } + ], + "panelHeader": [ + { + "x": 0, + "y": "1", + "blur": 0, + "spread": 0, + "inset": true, + "color": "#ffffff", + "alpha": "0.5" + }, + { + "x": 0, + "y": "1", + "blur": "3", + "spread": 0, + "inset": false, + "color": "#000000", + "alpha": "0.3" + } + ], + "buttonPressed": [ + { + "x": 0, + "y": 0, + "blur": 4, + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": 0, + "y": 1, + "blur": "1", + "spread": "2", + "color": "#000000", + "alpha": "0.3", + "inset": true + }, + { + "x": 0, + "y": -1, + "blur": 0, + "spread": 0, + "color": "#FFFFFF", + "alpha": 0.2, + "inset": true + } + ], + "popup": [ + { + "x": "1", + "y": "2", + "blur": "2", + "spread": 0, + "color": "#000000", + "alpha": "0.2" + }, + { + "x": "1", + "y": "3", + "blur": "7", + "spread": "0", + "inset": false, + "color": "#000000", + "alpha": "0.2" + } + ], + "avatarStatus": [ + { + "x": 0, + "y": "1", + "blur": "4", + "spread": "0", + "inset": false, + "color": "#000000", + "alpha": "0.2" + } + ] + }, + "opacity": { + "underlay": "0.4" + }, + "colors": { + "bg": "#f2f6f9", + "fg": "#d6dfed", + "text": "#304055", + "underlay": "#5d6086", + "accent": "#f55b1b", + "cBlue": "#0095ff", + "cRed": "#d31014", + "cGreen": "#0fa00f", + "cOrange": "#ffa500", + "border": "#d8e6f9", + "topBarText": "#304055", + "topBarLink": "#304055", + "btnToggled": "#db9d77", + "input": "#dee3ed", + "badgeNotification": "#e83802" + }, + "radii": { + "btn": "3", + "input": "3", + "panel": "3", + "avatar": "3", + "attachment": "3" + } + } +} -- cgit v1.2.3-70-g09d2 From 64a6ba219ac9a1614e87d3ac979454e6d016cd5e Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Thu, 20 Feb 2020 21:14:42 +0200 Subject: make panel header highlight less harsh --- static/themes/pleroma-dark.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static') diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json index 2de001da..c2ee9d1c 100644 --- a/static/themes/pleroma-dark.json +++ b/static/themes/pleroma-dark.json @@ -80,7 +80,7 @@ "spread": 0, "inset": true, "color": "#ffffff", - "alpha": "0.2" + "alpha": "0.1" } ], "button": [ -- cgit v1.2.3-70-g09d2 From e342dbcb10ad5da4a897ce683246b1aa2cd72b00 Mon Sep 17 00:00:00 2001 From: Shpuld Shpludson Date: Fri, 21 Feb 2020 14:09:21 +0000 Subject: Apply suggestion to static/themes/pleroma-dark.json --- static/themes/pleroma-dark.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static') diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json index c2ee9d1c..aee4a4fe 100644 --- a/static/themes/pleroma-dark.json +++ b/static/themes/pleroma-dark.json @@ -528,7 +528,7 @@ "topBarText": "#a0a5aa", "topBarLink": "#A0A5AA", "btnToggled": "#c08f60", - "alertErrorText": "#f0f0f0", + "alertErrorText": "--text,21.2", "badgeNotification": "#e15932", "badgeNotificationText": "#ffffff" }, -- cgit v1.2.3-70-g09d2 From 19cc739598034b796956a1fadc91d83ec6074723 Mon Sep 17 00:00:00 2001 From: Shpuld Shpludson Date: Fri, 21 Feb 2020 14:09:25 +0000 Subject: Apply suggestion to static/themes/pleroma-dark.json --- static/themes/pleroma-dark.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'static') diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json index aee4a4fe..a1b9a468 100644 --- a/static/themes/pleroma-dark.json +++ b/static/themes/pleroma-dark.json @@ -525,8 +525,8 @@ "cGreen": "#5dc94a", "cOrange": "#ffc459", "border": "#1b232d", - "topBarText": "#a0a5aa", - "topBarLink": "#A0A5AA", + "topBarText": "--text,-9.75", + "topBarLink": "--topBarText", "btnToggled": "#c08f60", "alertErrorText": "--text,21.2", "badgeNotification": "#e15932", -- cgit v1.2.3-70-g09d2 From c9935362de1effd03b06730cde1d6ebd81e5b777 Mon Sep 17 00:00:00 2001 From: Shpuld Shpludson Date: Fri, 21 Feb 2020 14:09:29 +0000 Subject: Apply suggestion to static/themes/pleroma-dark.json --- static/themes/pleroma-dark.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static') diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json index a1b9a468..9120f55f 100644 --- a/static/themes/pleroma-dark.json +++ b/static/themes/pleroma-dark.json @@ -527,7 +527,7 @@ "border": "#1b232d", "topBarText": "--text,-9.75", "topBarLink": "--topBarText", - "btnToggled": "#c08f60", + "btnToggled": "--accent,-24.2", "alertErrorText": "--text,21.2", "badgeNotification": "#e15932", "badgeNotificationText": "#ffffff" -- cgit v1.2.3-70-g09d2 From 8c454b94568218399b7805c1aa72cab0d5a18df7 Mon Sep 17 00:00:00 2001 From: Shpuld Shpludson Date: Fri, 21 Feb 2020 14:09:31 +0000 Subject: Apply suggestion to static/themes/pleroma-dark.json --- static/themes/pleroma-dark.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static') diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json index 9120f55f..48e28c74 100644 --- a/static/themes/pleroma-dark.json +++ b/static/themes/pleroma-dark.json @@ -524,7 +524,7 @@ "cRed": "#d31014", "cGreen": "#5dc94a", "cOrange": "#ffc459", - "border": "#1b232d", + "border": "--fg,3", "topBarText": "--text,-9.75", "topBarLink": "--topBarText", "btnToggled": "--accent,-24.2", -- cgit v1.2.3-70-g09d2 From b5c6b77ca80b635c907cd5f755ccdd7327396475 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sat, 22 Feb 2020 10:03:16 +0200 Subject: update using variables --- static/themes/pleroma-light.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'static') diff --git a/static/themes/pleroma-light.json b/static/themes/pleroma-light.json index f8cefc9b..55cbe28a 100644 --- a/static/themes/pleroma-light.json +++ b/static/themes/pleroma-light.json @@ -554,8 +554,8 @@ "cOrange": "#ffa500", "border": "#d8e6f9", "topBarText": "#304055", - "topBarLink": "#304055", - "btnToggled": "#db9d77", + "topBarLink": "--topBarText", + "btnToggled": "--accent,-24.2", "input": "#dee3ed", "badgeNotification": "#e83802" }, -- cgit v1.2.3-70-g09d2 From 1fb91b17955219fcf17320806a0d4bf61bf81f5b Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sat, 22 Feb 2020 10:34:54 +0200 Subject: remove bloat from themes --- static/themes/pleroma-dark.json | 352 --------------------------------------- static/themes/pleroma-light.json | 351 -------------------------------------- 2 files changed, 703 deletions(-) (limited to 'static') diff --git a/static/themes/pleroma-dark.json b/static/themes/pleroma-dark.json index 48e28c74..2703fba1 100644 --- a/static/themes/pleroma-dark.json +++ b/static/themes/pleroma-dark.json @@ -1,358 +1,6 @@ { "_pleroma_theme_version": 2, "name": "Pleroma Dark", - "theme": { - "themeEngineVersion": 3, - "shadows": { - "panel": [ - { - "x": "0", - "y": "0", - "blur": "3", - "spread": 0, - "color": "#000000", - "alpha": "0.5" - }, - { - "x": "0", - "y": "4", - "blur": "6", - "spread": "3", - "inset": false, - "color": "#000000", - "alpha": "0.3" - } - ], - "topBar": [ - { - "x": 0, - "y": "1", - "blur": 4, - "spread": 0, - "color": "#000000", - "alpha": "0.4" - }, - { - "x": 0, - "y": "2", - "blur": "7", - "spread": 0, - "inset": false, - "color": "#000000", - "alpha": "0.3" - } - ], - "popup": [ - { - "x": 2, - "y": 2, - "blur": 3, - "spread": 0, - "color": "#000000", - "alpha": 0.5 - } - ], - "avatar": [ - { - "x": 0, - "y": 1, - "blur": 8, - "spread": 0, - "color": "#000000", - "alpha": 0.7 - } - ], - "avatarStatus": [], - "panelHeader": [ - { - "x": 0, - "y": "1", - "blur": "3", - "spread": 0, - "inset": false, - "color": "#000000", - "alpha": "0.4" - }, - { - "x": "0", - "y": "1", - "blur": "0", - "spread": 0, - "inset": true, - "color": "#ffffff", - "alpha": "0.1" - } - ], - "button": [ - { - "x": 0, - "y": 0, - "blur": 2, - "spread": 0, - "color": "#000000", - "alpha": 1 - }, - { - "x": 0, - "y": 1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - } - ], - "buttonHover": [ - { - "x": 0, - "y": 0, - "blur": "1", - "spread": "2", - "color": "#b9b9ba", - "alpha": "0.4", - "inset": true - }, - { - "x": 0, - "y": 1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - } - ], - "buttonPressed": [ - { - "x": 0, - "y": 0, - "blur": 4, - "spread": 0, - "color": "#000000", - "alpha": 1, - "inset": true - }, - { - "x": 0, - "y": 1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": 0, - "blur": "2", - "spread": 0, - "inset": false, - "color": "#000000", - "alpha": 1 - } - ], - "input": [ - { - "x": 0, - "y": 1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": 0, - "blur": 2, - "inset": true, - "spread": 0, - "color": "#000000", - "alpha": 1 - } - ] - }, - "colors": { - "underlay": "#090e14", - "bg": "#0f161e", - "fg": "#151e2b", - "cRed": "#d31014", - "cOrange": "#ffc459", - "cGreen": "#5dc94a", - "cBlue": "#81beea", - "accent": "#e2b188", - "link": "#e2b188", - "text": "#b9b9ba", - "badgeNotification": "#e15932", - "badgeNotificationText": "#ffffff", - "panel": "#151e2b", - "panelText": "#b9b9ba", - "alertNeutral": "#b9b9ba", - "alertNeutralPanelText": "#ffffff", - "alertNeutralText": "#ffffff", - "alertWarning": "#ffc459", - "alertWarningPanelText": "#ffffff", - "alertWarningText": "#ffffff", - "alertError": "#d31014", - "alertErrorPanelText": "#b9b9ba", - "alertErrorText": "#f0f0f0", - "fgText": "#b9b9ba", - "topBar": "#151e2b", - "topBarText": "#a0a5aa", - "input": "#151e2b", - "inputTopbarText": "#a0a5aa", - "inputPanelText": "#b9b9ba", - "inputText": "#b9b9ba", - "btn": "#151e2b", - "btnText": "#b9b9ba", - "btnTopBarText": "#b9b9ba", - "btnDisabled": "#111822", - "btnDisabledTopBarText": "#3b4148", - "btnPanelText": "#b9b9ba", - "btnDisabledPanelText": "#3b4148", - "btnDisabledText": "#3b4148", - "btnToggled": "#c08f60", - "btnToggledTopBarText": "#000000", - "btnToggledPanelText": "#000000", - "btnToggledText": "#000000", - "btnPressed": "#151e2b", - "btnPressedTopBarText": "#b9b9ba", - "btnPressedTopBar": "#151e2b", - "btnPressedPanelText": "#b9b9ba", - "btnPressedPanel": "#151e2b", - "btnPressedText": "#b9b9ba", - "tabActiveText": "#b9b9ba", - "tabText": "#b9b9ba", - "tab": "#151e2b", - "fgLink": "#e2b188", - "topBarLink": "#a0a5aa", - "panelLink": "#e2b188", - "panelFaint": "#b9b9ba", - "icon": "#64686c", - "poll": "#645449", - "pollText": "#ffffff", - "border": "#1b232d", - "postLink": "#e2b188", - "lightText": "#ededed", - "popover": "#0f161e", - "selectedMenuPopover": "#18232f", - "highlight": "#18232f", - "highlightText": "#b9b9ba", - "selectedMenu": "#18232f", - "selectedMenuText": "#b9b9ba", - "selectedMenuPopoverIcon": "#696e75", - "highlightLink": "#e2b188", - "selectedMenuLink": "#e2b188", - "selectedMenuPopoverLink": "#e2b188", - "selectedMenuPopoverText": "#b9b9ba", - "faintLink": "#e2b188", - "highlightFaintLink": "#e2b188", - "selectedMenuFaintLink": "#e2b188", - "selectedMenuPopoverFaintLink": "#e2b188", - "faint": "#b9b9ba", - "highlightFaintText": "#b9b9ba", - "selectedMenuFaintText": "#b9b9ba", - "selectedMenuPopoverFaintText": "#b9b9ba", - "highlightLightText": "#ededed", - "selectedMenuLightText": "#ededed", - "selectedMenuPopoverLightText": "#ededed", - "selectedMenuIcon": "#696e75", - "selectedPost": "#18232f", - "selectedPostText": "#b9b9ba", - "selectedPostIcon": "#696e75", - "selectedPostLink": "#e2b188", - "selectedPostFaintLink": "#e2b188", - "highlightPostLink": "#e2b188", - "selectedPostPostLink": "#e2b188", - "selectedPostLightText": "#ededed", - "selectedPostFaintText": "#b9b9ba", - "popoverText": "#b9b9ba", - "popoverIcon": "#64686c", - "popoverLink": "#e2b188", - "postFaintLink": "#e2b188", - "popoverPostFaintLink": "#e2b188", - "popoverFaintLink": "#e2b188", - "popoverFaintText": "#b9b9ba", - "popoverPostLink": "#e2b188", - "popoverLightText": "#ededed", - "highlightIcon": "#696e75", - "highlightPostFaintLink": "#e2b188", - "profileTint": "#0f161e", - "profileBg": "#070c11" - }, - "opacity": { - "underlay": 0.6, - "bg": 1, - "panel": 1, - "alert": 0.5, - "input": 0.5, - "btn": 1, - "faint": 0.5, - "border": 1, - "popover": 1, - "profileTint": 0.5 - }, - "radii": { - "btn": "3", - "input": "3", - "checkbox": 2, - "panel": "3", - "avatar": "3", - "avatarAlt": 50, - "tooltip": 2, - "attachment": "3" - }, - "fonts": { - "interface": { - "family": "sans-serif" - }, - "input": { - "family": "inherit" - }, - "post": { - "family": "inherit" - }, - "postCode": { - "family": "monospace" - } - } - }, "source": { "themeEngineVersion": 3, "fonts": {}, diff --git a/static/themes/pleroma-light.json b/static/themes/pleroma-light.json index 55cbe28a..05fc300a 100644 --- a/static/themes/pleroma-light.json +++ b/static/themes/pleroma-light.json @@ -1,357 +1,6 @@ { "_pleroma_theme_version": 2, "name": "Pleroma Light", - "theme": { - "themeEngineVersion": 3, - "shadows": { - "panel": [ - { - "x": "0", - "y": 1, - "blur": "3", - "spread": 0, - "color": "#000000", - "alpha": "0.5" - }, - { - "x": "0", - "y": "3", - "blur": "6", - "spread": "1", - "inset": false, - "color": "#000000", - "alpha": "0.2" - } - ], - "topBar": [ - { - "x": 0, - "y": 0, - "blur": 4, - "spread": 0, - "color": "#000000", - "alpha": 0.6 - } - ], - "popup": [ - { - "x": "1", - "y": "2", - "blur": "2", - "spread": 0, - "color": "#000000", - "alpha": "0.2" - }, - { - "x": "1", - "y": "3", - "blur": "7", - "spread": "0", - "inset": false, - "color": "#000000", - "alpha": "0.2" - } - ], - "avatar": [ - { - "x": 0, - "y": 1, - "blur": 8, - "spread": 0, - "color": "#000000", - "alpha": 0.7 - } - ], - "avatarStatus": [ - { - "x": 0, - "y": "1", - "blur": "4", - "spread": "0", - "inset": false, - "color": "#000000", - "alpha": "0.2" - } - ], - "panelHeader": [ - { - "x": 0, - "y": "1", - "blur": 0, - "spread": 0, - "inset": true, - "color": "#ffffff", - "alpha": "0.5" - }, - { - "x": 0, - "y": "1", - "blur": "3", - "spread": 0, - "inset": false, - "color": "#000000", - "alpha": "0.3" - } - ], - "button": [ - { - "x": 0, - "y": 0, - "blur": 2, - "spread": 0, - "color": "#000000", - "alpha": "0.2" - }, - { - "x": 0, - "y": 1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": "0.5", - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - } - ], - "buttonHover": [ - { - "x": 0, - "y": 0, - "blur": "2", - "spread": 0, - "color": "#000000", - "alpha": "0.2" - }, - { - "x": 0, - "y": "0", - "blur": "1", - "spread": "2", - "color": "#ffc39f", - "alpha": "1", - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - } - ], - "buttonPressed": [ - { - "x": 0, - "y": 0, - "blur": 4, - "spread": 0, - "color": "#000000", - "alpha": "0.2" - }, - { - "x": 0, - "y": 1, - "blur": "1", - "spread": "2", - "color": "#000000", - "alpha": "0.3", - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": 0.2, - "inset": true - } - ], - "input": [ - { - "x": 0, - "y": 1, - "blur": 0, - "spread": 0, - "color": "#000000", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": -1, - "blur": 0, - "spread": 0, - "color": "#FFFFFF", - "alpha": 0.2, - "inset": true - }, - { - "x": 0, - "y": 0, - "blur": "2", - "inset": true, - "spread": 0, - "color": "#000000", - "alpha": "0.15" - } - ] - }, - "colors": { - "underlay": "#5d6086", - "bg": "#f2f6f9", - "fg": "#d6dfed", - "cRed": "#d31014", - "cOrange": "#ffa500", - "cGreen": "#0fa00f", - "cBlue": "#0095ff", - "accent": "#f55b1b", - "link": "#f55b1b", - "text": "#304055", - "badgeNotification": "#e83802", - "badgeNotificationText": "#ffffff", - "panel": "#d6dfed", - "panelText": "#304055", - "alertNeutral": "#304055", - "alertNeutralPanelText": "#000000", - "alertNeutralText": "#000000", - "alertWarning": "#ffa500", - "alertWarningPanelText": "#304055", - "alertWarningText": "#304055", - "alertError": "#d31014", - "alertErrorPanelText": "#000000", - "alertErrorText": "#000000", - "fgText": "#304055", - "topBar": "#d6dfed", - "topBarText": "#304055", - "input": "#dee3ed", - "inputTopbarText": "#304055", - "inputPanelText": "#304055", - "inputText": "#304055", - "btn": "#d6dfed", - "btnText": "#304055", - "btnTopBarText": "#304055", - "btnDisabled": "#ebf1f6", - "btnDisabledTopBarText": "#bdc5ce", - "btnPanelText": "#304055", - "btnDisabledPanelText": "#bdc5ce", - "btnDisabledText": "#bdc5ce", - "btnToggled": "#db9d77", - "btnToggledTopBarText": "#304055", - "btnToggledPanelText": "#304055", - "btnToggledText": "#304055", - "btnPressed": "#d6dfed", - "btnPressedTopBarText": "#304055", - "btnPressedTopBar": "#d6dfed", - "btnPressedPanelText": "#304055", - "btnPressedPanel": "#d6dfed", - "btnPressedText": "#304055", - "tabActiveText": "#304055", - "tabText": "#304055", - "tab": "#d6dfed", - "fgLink": "#e44a0a", - "topBarLink": "#304055", - "panelLink": "#f55b1b", - "panelFaint": "#304055", - "icon": "#919ba7", - "poll": "#f4b8a1", - "pollText": "#304055", - "border": "#d8e6f9", - "postLink": "#e44a0a", - "lightText": "#0c0f14", - "popover": "#f2f6f9", - "selectedMenuPopover": "#e1eaf1", - "highlight": "#e1eaf1", - "highlightText": "#304055", - "selectedMenu": "#e1eaf1", - "selectedMenuText": "#304055", - "selectedMenuPopoverIcon": "#8995a3", - "highlightLink": "#e44a0a", - "selectedMenuLink": "#f55b1b", - "selectedMenuPopoverLink": "#e44a0a", - "selectedMenuPopoverText": "#304055", - "faintLink": "#f55b1b", - "highlightFaintLink": "#e44a0a", - "selectedMenuFaintLink": "#f55b1b", - "selectedMenuPopoverFaintLink": "#e44a0a", - "faint": "#304055", - "highlightFaintText": "#304055", - "selectedMenuFaintText": "#304055", - "selectedMenuPopoverFaintText": "#304055", - "highlightLightText": "#0c0f14", - "selectedMenuLightText": "#0c0f14", - "selectedMenuPopoverLightText": "#0c0f14", - "selectedMenuIcon": "#8995a3", - "selectedPost": "#e1eaf1", - "selectedPostText": "#304055", - "selectedPostIcon": "#8995a3", - "selectedPostLink": "#f55b1b", - "selectedPostFaintLink": "#f55b1b", - "highlightPostLink": "#f55b1b", - "selectedPostPostLink": "#e44a0a", - "selectedPostLightText": "#0c0f14", - "selectedPostFaintText": "#304055", - "popoverText": "#304055", - "popoverIcon": "#919ba7", - "popoverLink": "#e44a0a", - "postFaintLink": "#e44a0a", - "popoverPostFaintLink": "#f55b1b", - "popoverFaintLink": "#e44a0a", - "popoverFaintText": "#304055", - "popoverPostLink": "#f55b1b", - "popoverLightText": "#0c0f14", - "highlightIcon": "#8995a3", - "highlightPostFaintLink": "#f55b1b", - "profileTint": "#f2f6f9", - "profileBg": "#808992" - }, - "opacity": { - "underlay": 0.4, - "bg": 1, - "panel": 1, - "alert": 0.5, - "input": 0.5, - "btn": 1, - "faint": 0.5, - "border": 1, - "popover": 1, - "profileTint": 0.5 - }, - "radii": { - "btn": "3", - "input": "3", - "checkbox": 2, - "panel": "3", - "avatar": "3", - "avatarAlt": 50, - "tooltip": 2, - "attachment": "3" - }, - "fonts": { - "interface": { - "family": "sans-serif" - }, - "input": { - "family": "inherit" - }, - "post": { - "family": "inherit" - }, - "postCode": { - "family": "monospace" - } - } - }, "source": { "themeEngineVersion": 3, "fonts": {}, -- cgit v1.2.3-70-g09d2 From 01b07f01e9340935faf51e5a3c8034cc90423989 Mon Sep 17 00:00:00 2001 From: eugenijm Date: Sat, 25 Apr 2020 07:04:39 +0300 Subject: Add support for follow request notifications --- CHANGELOG.md | 3 ++ src/components/notification/notification.js | 19 ++++++++++ src/components/notification/notification.vue | 44 ++++++++++++++++------ src/components/notifications/notifications.scss | 15 ++++++++ src/i18n/en.json | 5 ++- src/modules/config.js | 3 +- src/modules/statuses.js | 22 ++++++++++- src/services/api/api.service.js | 11 ++++++ .../entity_normalizer/entity_normalizer.service.js | 5 +-- .../notification_utils/notification_utils.js | 7 +++- static/fontello.json | 14 ++++++- 11 files changed, 128 insertions(+), 20 deletions(-) (limited to 'static') diff --git a/CHANGELOG.md b/CHANGELOG.md index f45561d0..685fe629 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Emoji autocomplete will match any part of the word and not just start, for example :drool will now helpfully suggest :blobcatdrool: and :blobcatdroolreach: +### Add +- Follow request notification support + ## [2.0.2] - 2020-04-08 ### Fixed - Favorite/Repeat avatars not showing up on private instances/non-public posts diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index e7bd769e..6deee7d5 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -2,6 +2,7 @@ import Status from '../status/status.vue' import UserAvatar from '../user_avatar/user_avatar.vue' import UserCard from '../user_card/user_card.vue' import Timeago from '../timeago/timeago.vue' +import { isStatusNotification } from '../../services/notification_utils/notification_utils.js' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' @@ -32,6 +33,21 @@ const Notification = { }, toggleMute () { this.unmuted = !this.unmuted + }, + approveUser () { + this.$store.state.api.backendInteractor.approveUser({ id: this.user.id }) + this.$store.dispatch('removeFollowRequest', this.user) + this.$store.dispatch('updateNotification', { + id: this.notification.id, + updater: notification => { + notification.type = 'follow' + } + }) + }, + denyUser () { + this.$store.state.api.backendInteractor.denyUser({ id: this.user.id }) + this.$store.dispatch('removeFollowRequest', this.user) + this.$store.dispatch('dismissNotification', { id: this.notification.id }) } }, computed: { @@ -57,6 +73,9 @@ const Notification = { }, needMute () { return this.user.muted + }, + isStatusNotification () { + return isStatusNotification(this.notification.type) } } } diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 51875747..02802776 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -74,6 +74,10 @@ {{ $t('notifications.followed_you') }} + + + {{ $t('notifications.follow_request') }} + {{ $t('notifications.migrated_to') }} @@ -87,30 +91,30 @@
- + - +
- + - +
{ each(notifications, (notification) => { - if (notification.type !== 'follow' && notification.type !== 'move') { + if (isStatusNotification(notification.type)) { notification.action = addStatusToGlobalStorage(state, notification.action).item notification.status = notification.status && addStatusToGlobalStorage(state, notification.status).item } @@ -361,13 +362,16 @@ const addNewNotifications = (state, { dispatch, notifications, older, visibleNot case 'move': i18nString = 'migrated_to' break + case 'follow_request': + i18nString = 'follow_request' + break } if (notification.type === 'pleroma:emoji_reaction') { notifObj.body = rootGetters.i18n.t('notifications.reacted_with', [notification.emoji]) } else if (i18nString) { notifObj.body = rootGetters.i18n.t('notifications.' + i18nString) - } else { + } else if (isStatusNotification(notification.type)) { notifObj.body = notification.status.text } @@ -521,6 +525,13 @@ export const mutations = { notification.seen = true }) }, + dismissNotification (state, { id }) { + state.notifications.data = state.notifications.data.filter(n => n.id !== id) + }, + updateNotification (state, { id, updater }) { + const notification = find(state.notifications.data, n => n.id === id) + notification && updater(notification) + }, queueFlush (state, { timeline, id }) { state.timelines[timeline].flushMarker = id }, @@ -680,6 +691,13 @@ const statuses = { credentials: rootState.users.currentUser.credentials }) }, + dismissNotification ({ rootState, commit }, { id }) { + rootState.api.backendInteractor.dismissNotification({ id }) + .then(() => commit('dismissNotification', { id })) + }, + updateNotification ({ rootState, commit }, { id, updater }) { + commit('updateNotification', { id, updater }) + }, fetchFavsAndRepeats ({ rootState, commit }, id) { Promise.all([ rootState.api.backendInteractor.fetchFavoritedByUsers({ id }), diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index ad2b2ad5..cda61ee2 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -29,6 +29,7 @@ const MASTODON_LOGIN_URL = '/api/v1/accounts/verify_credentials' const MASTODON_REGISTRATION_URL = '/api/v1/accounts' const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites' const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications' +const MASTODON_DISMISS_NOTIFICATION_URL = id => `/api/v1/notifications/${id}/dismiss` const MASTODON_FAVORITE_URL = id => `/api/v1/statuses/${id}/favourite` const MASTODON_UNFAVORITE_URL = id => `/api/v1/statuses/${id}/unfavourite` const MASTODON_RETWEET_URL = id => `/api/v1/statuses/${id}/reblog` @@ -1010,6 +1011,15 @@ const unmuteDomain = ({ domain, credentials }) => { }) } +const dismissNotification = ({ credentials, id }) => { + return promisedRequest({ + url: MASTODON_DISMISS_NOTIFICATION_URL(id), + method: 'POST', + payload: { id }, + credentials + }) +} + export const getMastodonSocketURI = ({ credentials, stream, args = {} }) => { return Object.entries({ ...(credentials @@ -1165,6 +1175,7 @@ const apiService = { denyUser, suggestions, markNotificationsAsSeen, + dismissNotification, vote, fetchPoll, fetchFavoritedByUsers, diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 84169a7b..6cacd0b8 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -1,4 +1,5 @@ import escape from 'escape-html' +import { isStatusNotification } from '../notification_utils/notification_utils.js' const qvitterStatusType = (status) => { if (status.is_post_verb) { @@ -346,9 +347,7 @@ export const parseNotification = (data) => { if (masto) { output.type = mastoDict[data.type] || data.type output.seen = data.pleroma.is_seen - output.status = output.type === 'follow' || output.type === 'move' - ? null - : parseStatus(data.status) + output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null output.action = output.status // TODO: Refactor, this is unneeded output.target = output.type !== 'move' ? null diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index b17bd7bf..eb479227 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -1,4 +1,4 @@ -import { filter, sortBy } from 'lodash' +import { filter, sortBy, includes } from 'lodash' export const notificationsFromStore = store => store.state.statuses.notifications.data @@ -7,10 +7,15 @@ export const visibleTypes = store => ([ store.state.config.notificationVisibility.mentions && 'mention', store.state.config.notificationVisibility.repeats && 'repeat', store.state.config.notificationVisibility.follows && 'follow', + store.state.config.notificationVisibility.followRequest && 'follow_request', store.state.config.notificationVisibility.moves && 'move', store.state.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction' ].filter(_ => _)) +const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction'] + +export const isStatusNotification = (type) => includes(statusNotifications, type) + const sortById = (a, b) => { const seqA = Number(a.id) const seqB = Number(b.id) diff --git a/static/fontello.json b/static/fontello.json index 5a7086a2..5963b68b 100755 --- a/static/fontello.json +++ b/static/fontello.json @@ -345,6 +345,18 @@ "css": "link", "code": 59427, "src": "fontawesome" + }, + { + "uid": "8b80d36d4ef43889db10bc1f0dc9a862", + "css": "user", + "code": 59428, + "src": "fontawesome" + }, + { + "uid": "12f4ece88e46abd864e40b35e05b11cd", + "css": "ok", + "code": 59431, + "src": "fontawesome" } ] -} +} \ No newline at end of file -- cgit v1.2.3-70-g09d2