forked from Shinonome/dots-hyprland
sidebar: add option to disable translator tab
This commit is contained in:
@@ -346,6 +346,7 @@ Singleton {
|
|||||||
property JsonObject sidebar: JsonObject {
|
property JsonObject sidebar: JsonObject {
|
||||||
property bool keepRightSidebarLoaded: true
|
property bool keepRightSidebarLoaded: true
|
||||||
property JsonObject translator: JsonObject {
|
property JsonObject translator: JsonObject {
|
||||||
|
property bool enable: false
|
||||||
property int delay: 300 // Delay before sending request. Reduces (potential) rate limits and lag.
|
property int delay: 300 // Delay before sending request. Reduces (potential) rate limits and lag.
|
||||||
}
|
}
|
||||||
property JsonObject ai: JsonObject {
|
property JsonObject ai: JsonObject {
|
||||||
|
|||||||
@@ -569,6 +569,15 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigSwitch {
|
||||||
|
buttonIcon: "translate"
|
||||||
|
text: Translation.tr('Enable translator')
|
||||||
|
checked: Config.options.sidebar.translator.enable
|
||||||
|
onCheckedChanged: {
|
||||||
|
Config.options.sidebar.translator.enable = checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
title: Translation.tr("Corner open")
|
title: Translation.tr("Corner open")
|
||||||
tooltip: Translation.tr("Allows you to open sidebars by clicking or hovering screen corners regardless of bar position")
|
tooltip: Translation.tr("Allows you to open sidebars by clicking or hovering screen corners regardless of bar position")
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
property var tabButtonList: [
|
property var tabButtonList: [
|
||||||
...(Config.options.policies.ai !== 0 ? [{"icon": "neurology", "name": Translation.tr("Intelligence")}] : []),
|
...(Config.options.policies.ai !== 0 ? [{"icon": "neurology", "name": Translation.tr("Intelligence")}] : []),
|
||||||
{"icon": "translate", "name": Translation.tr("Translator")},
|
...(Config.options.sidebar.translator.enable ? [{"icon": "translate", "name": Translation.tr("Translator")}] : []),
|
||||||
...(Config.options.policies.weeb === 1 ? [{"icon": "bookmark_heart", "name": Translation.tr("Anime")}] : [])
|
...(Config.options.policies.weeb === 1 ? [{"icon": "bookmark_heart", "name": Translation.tr("Anime")}] : [])
|
||||||
]
|
]
|
||||||
property int selectedTab: 0
|
property int selectedTab: 0
|
||||||
@@ -84,7 +84,7 @@ Item {
|
|||||||
|
|
||||||
contentChildren: [
|
contentChildren: [
|
||||||
...(Config.options.policies.ai !== 0 ? [aiChat.createObject()] : []),
|
...(Config.options.policies.ai !== 0 ? [aiChat.createObject()] : []),
|
||||||
translator.createObject(),
|
...(Config.options.sidebar.translator.enable ? [translator.createObject()] : []),
|
||||||
...(Config.options.policies.weeb === 0 ? [] : [anime.createObject()])
|
...(Config.options.policies.weeb === 0 ? [] : [anime.createObject()])
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user