added missings

This commit is contained in:
SrGooglo 2023-06-13 22:41:46 +00:00
parent 9fcabfc2ad
commit ed51b91e3d
6 changed files with 143 additions and 133 deletions

View File

@ -8,7 +8,7 @@
"longPressDelay": 600, "longPressDelay": 600,
"autoCollapseDelay": 500, "autoCollapseDelay": 500,
"autoCollapseDelayEnabled": true, "autoCollapseDelayEnabled": true,
"haptic_feedback": false, "haptic_feedback": true,
"collapseOnLooseFocus": true, "collapseOnLooseFocus": true,
"style.auto_darkMode": true, "style.auto_darkMode": true,
"feed_max_fetch": 20, "feed_max_fetch": 20,

View File

@ -21,6 +21,7 @@ export default {
group: "layout", group: "layout",
emitEvent: "app.softReload", emitEvent: "app.softReload",
storaged: true, storaged: true,
mobile: false,
}, },
{ {
id: "style.reduceAnimations", id: "style.reduceAnimations",

View File

@ -1,6 +1,4 @@
import React from "react"
import config from "config" import config from "config"
import { Select } from "antd"
export default { export default {
id: "general", id: "general",
@ -10,38 +8,42 @@ export default {
order: 0, order: 0,
settings: [ settings: [
{ {
"id": "language", id: "language",
"storaged": true, storaged: true,
"group": "general", group: "general",
"component": "Select", component: "Select",
"icon": "MdTranslate", icon: "MdTranslate",
"title": "Language", title: "Language",
"description": "Choose a language for the application", description: "Choose a language for the application",
"props": { props: {
children: config.i18n.languages.map((language) => { options: config.i18n.languages.map((language) => {
return <Select.Option value={language.locale}>{language.name}</Select.Option> return {
label: language.name,
value: language.locale
}
}) })
}, },
"emitEvent": "changeLanguage" emitEvent: "changeLanguage"
}, },
{ {
"id": "haptic_feedback", id: "haptic_feedback",
"storaged": true, storaged: true,
"group": "general", group: "general",
"component": "Switch", component: "Switch",
"icon": "MdVibration", icon: "MdVibration",
"title": "Haptic Feedback", title: "Haptic Feedback",
"description": "Enable haptic feedback on touch events.", description: "Enable haptic feedback on touch events.",
desktop: false
}, },
{ {
"id": "longPressDelay", id: "longPressDelay",
"storaged": true, storaged: true,
"group": "general", group: "general",
"component": "Slider", component: "Slider",
"icon": "MdTimer", icon: "MdTimer",
"title": "Long press delay", title: "Long press delay",
"description": "Set the delay before long press trigger is activated.", description: "Set the delay before long press trigger is activated.",
"props": { props: {
min: 300, min: 300,
max: 2000, max: 2000,
step: 100, step: 100,
@ -55,24 +57,29 @@ export default {
} }
}, },
{ {
"id": "clear_internal_storage", id: "clear_internal_storage",
"storaged": false, storaged: false,
"group": "general", group: "general",
"component": "Button", component: "Button",
"icon": "MdDelete", icon: "MdDelete",
"title": "Clear internal storage", title: "Clear internal storage",
"description": "Clear all the data stored in the internal storage, including your current session. It will not affect the data stored in the cloud.", description: "Clear all the data stored in the internal storage, including your current session. It will not affect the data stored in the cloud.",
"emitEvent": "app.clearInternalStorage" emitEvent: "app.clearInternalStorage",
props: {
danger: true,
children: "Clear"
},
}, },
{ {
"id": "low_performance_mode", id: "low_performance_mode",
"storaged": true, storaged: true,
"group": "general", group: "general",
"component": "Switch", component: "Switch",
"icon": "MdSlowMotionVideo", icon: "MdSlowMotionVideo",
"title": "Low performance mode", title: "Low performance mode",
"description": "Enable low performance mode to reduce the memory usage and improve the performance in low-end devices. This will disable some animations and other decorative features.", description: "Enable low performance mode to reduce the memory usage and improve the performance in low-end devices. This will disable some animations and other decorative features.",
"emitEvent": "app.lowPerformanceMode", emitEvent: "app.lowPerformanceMode",
experimental: true,
disabled: true, disabled: true,
}, },
{ {
@ -83,6 +90,7 @@ export default {
icon: "MdVolumeUp", icon: "MdVolumeUp",
title: "UI effects", title: "UI effects",
description: "Enable the UI effects.", description: "Enable the UI effects.",
mobile: false,
}, },
{ {
id: "ui.general_volume", id: "ui.general_volume",
@ -100,64 +108,68 @@ export default {
max: 100, max: 100,
step: 10, step: 10,
}, },
emitEvent: "change:app.general_ui_volume" emitEvent: "change:app.general_ui_volume",
mobile: false,
}, },
{ {
"id": "notifications_sound", id: "notifications_sound",
"storaged": true, storaged: true,
"group": "notifications", group: "notifications",
"component": "Switch", component: "Switch",
"icon": "MdVolumeUp", icon: "MdVolumeUp",
"title": "Notifications Sound", title: "Notifications Sound",
"description": "Play a sound when a notification is received.", description: "Play a sound when a notification is received.",
}, },
{ {
"id": "notifications_vibrate", id: "notifications_vibrate",
"storaged": true, storaged: true,
"group": "notifications", group: "notifications",
"component": "Switch", component: "Switch",
"icon": "MdVibration", icon: "MdVibration",
"title": "Vibration", title: "Vibration",
"description": "Vibrate the device when a notification is received.", description: "Vibrate the device when a notification is received.",
"emitEvent": "changeNotificationsVibrate" emitEvent: "changeNotificationsVibrate",
desktop: false,
}, },
{ {
"id": "notifications_sound_volume", id: "notifications_sound_volume",
"storaged": true, storaged: true,
"group": "notifications", group: "notifications",
"component": "Slider", component: "Slider",
"icon": "MdVolumeUp", icon: "MdVolumeUp",
"title": "Sound Volume", title: "Sound Volume",
"description": "Set the volume of the sound when a notification is received.", description: "Set the volume of the sound when a notification is received.",
"props": { props: {
tipFormatter: (value) => { tipFormatter: (value) => {
return `${value}%` return `${value}%`
} }
}, },
"emitEvent": "changeNotificationsSoundVolume" emitEvent: "changeNotificationsSoundVolume",
mobile: false,
}, },
{ {
"id": "collapseOnLooseFocus", id: "collapseOnLooseFocus",
"storaged": true, storaged: true,
"group": "sidebar", group: "sidebar",
"component": "Switch", component: "Switch",
"icon": "Columns", icon: "Columns",
"title": "Auto Collapse", title: "Auto Collapse",
"description": "Collapse the sidebar when loose focus", description: "Collapse the sidebar when loose focus",
"emitEvent": "settingChanged.sidebar_collapse", emitEvent: "settingChanged.sidebar_collapse",
mobile: false,
}, },
{ {
"id": "autoCollapseDelay", id: "autoCollapseDelay",
"storaged": true, storaged: true,
"group": "sidebar", group: "sidebar",
"component": "Slider", component: "Slider",
"icon": "MdTimer", icon: "MdTimer",
"dependsOn": { dependsOn: {
"collapseOnLooseFocus": true "collapseOnLooseFocus": true
}, },
"title": "Auto Collapse timeout", title: "Auto Collapse timeout",
"description": "Set the delay before the sidebar is collapsed", description: "Set the delay before the sidebar is collapsed",
"props": { props: {
min: 0, min: 0,
max: 2000, max: 2000,
step: 100, step: 100,
@ -168,41 +180,21 @@ export default {
1500: "1.5s", 1500: "1.5s",
2000: "2s", 2000: "2s",
} }
} },
mobile: false,
}, },
{ {
"id": "feed_max_fetch", id: "feed_max_fetch",
"title": "Fetch max items", title: "Fetch max items",
"description": "Set the maximum number of items to load per fetch in the feed list", description: "Set the maximum number of items to load per fetch in the feed list",
"component": "Slider", component: "Slider",
"icon": "MdFormatListNumbered", icon: "MdFormatListNumbered",
"group": "posts", group: "posts",
"props": { props: {
min: 5, min: 5,
max: 50, max: 50,
}, },
"storaged": true, storaged: true,
},
{
"id": "postCard_carrusel_auto",
"title": "Post autoplay",
"description": "Automatically play the post medias when the post has multiple medias",
"component": "Switch",
"icon": "MdPhotoCameraBack",
"group": "posts",
"storaged": true,
"emitEvent": "router.forceUpdate",
"disabled": true
},
{
"id": "postCard_expansible_actions",
"title": "Expansible actions",
"description": "Automatically show or hide the actions bar",
"component": "Switch",
"icon": "MdCallToAction",
"group": "posts",
"storaged": true,
"emitEvent": "router.forceUpdate"
}, },
] ]
} }

View File

@ -92,6 +92,33 @@ export default {
"player.compressor": true "player.compressor": true
}, },
storaged: false, storaged: false,
},
{
id: "player.gain",
title: "Gain",
icon: "MdGraphicEq",
group: "general",
description: "Adjust gain for audio output",
component: "Slider",
props: {
min: 1,
max: 2,
step: 0.1,
marks: {
1: "Off",
1.5: "50%",
2: "100%"
}
},
defaultValue: () => {
return app.cores.player.gain.values().gain
},
onUpdate: (value) => {
app.cores.player.gain.modifyValues({
gain: value
})
},
storaged: false,
} }
] ]
} }

View File

@ -51,7 +51,7 @@ export default {
}) })
if (result) { if (result) {
return result return value
} }
}, },
extraActions: [ extraActions: [
@ -89,7 +89,7 @@ export default {
}) })
if (result) { if (result) {
return result return value
} }
}, },
"debounced": true, "debounced": true,
@ -105,6 +105,7 @@ export default {
UploadButton UploadButton
], ],
"defaultValue": (ctx) => { "defaultValue": (ctx) => {
console.log(ctx)
return ctx.userData.avatar return ctx.userData.avatar
}, },
"onUpdate": async (value) => { "onUpdate": async (value) => {
@ -114,7 +115,7 @@ export default {
if (result) { if (result) {
app.message.success("Avatar updated") app.message.success("Avatar updated")
return result return value
} }
}, },
"debounced": true, "debounced": true,
@ -139,7 +140,7 @@ export default {
if (result) { if (result) {
app.message.success("Cover updated") app.message.success("Cover updated")
return result return value
} }
}, },
"debounced": true, "debounced": true,
@ -166,7 +167,7 @@ export default {
}) })
if (result) { if (result) {
return result return value
} }
}, },
"debounced": true, "debounced": true,

View File

@ -34,17 +34,6 @@ export default {
"icon": "Monitor", "icon": "Monitor",
"component": loadable(() => import("../components/sessions")), "component": loadable(() => import("../components/sessions")),
"storaged": false "storaged": false
},
{
"id": "logout",
"group": "security.other",
"component": "Button",
"icon": "LogOut",
"title": "Logout",
"description": "Logout from your account",
onUpdate: async () => {
await AuthModel.logout()
}
} }
] ]
} }