add install extension to gui.

This commit is contained in:
Miroslav Šedivý
2023-04-14 23:21:08 +02:00
parent 283ba9b71f
commit 4cf0e0c0c8
6 changed files with 33 additions and 5 deletions
+3
View File
@@ -501,6 +501,9 @@ components:
type: array
items:
$ref: '#/components/schemas/BrowserPolicyExtension'
install_extensions:
type: boolean
example: false
developer_tools:
type: boolean
example: true
+6
View File
@@ -68,6 +68,12 @@ export interface BrowserPolicyContent {
* @memberof BrowserPolicyContent
*/
'extensions'?: Array<BrowserPolicyExtension>;
/**
*
* @type {boolean}
* @memberof BrowserPolicyContent
*/
'install_extensions'?: boolean;
/**
*
* @type {boolean}
+1
View File
@@ -189,6 +189,7 @@
<template v-slot:default>
<tbody>
<tr><th> Extensions </th><td>{{ BrowserExtensions(settings.browser_policy.content.extensions).join(', ') }}</td></tr>
<tr><th> Install extensions </th><td>{{ settings.browser_policy.content.install_extensions }}</td></tr>
<tr><th> Developer tools </th><td>{{ settings.browser_policy.content.developer_tools }}</td></tr>
<tr><th> Persistent data </th><td>{{ settings.browser_policy.content.persistent_data }}</td></tr>
</tbody>
+17 -2
View File
@@ -406,12 +406,13 @@
<v-row align="center">
<v-col>
<v-checkbox
v-model="browserPolicyContent.developer_tools"
label="Enable developer tools"
v-model="browserPolicyContent.install_extensions"
label="Allow installing extensions"
hide-details
class="shrink ml-2 mt-0"
:disabled="!browserPolicyEnabled"
></v-checkbox>
<div style="margin-left: 41px;"><i>User can install any extension from the Chrome Web Store.</i></div>
</v-col>
<v-col>
<v-checkbox
@@ -421,8 +422,22 @@
class="shrink ml-2 mt-0"
:disabled="!browserPolicyEnabled"
></v-checkbox>
<div style="margin-left: 41px;"><i>All cookies, local storage, etc. will be persistent between restarts.</i></div>
</v-col>
</v-row>
<v-row align="center">
<v-col>
<v-checkbox
v-model="browserPolicyContent.developer_tools"
label="Enable developer tools"
hide-details
class="shrink ml-2 mt-0"
:disabled="!browserPolicyEnabled"
></v-checkbox>
</v-col>
</v-row>
</template>
<v-alert
border="left"
+2
View File
@@ -309,6 +309,8 @@ export const state = {
defaultBrowserPolicyContent: {
extensions: [],
// eslint-disable-next-line
install_extensions: false,
// eslint-disable-next-line
developer_tools: false,
// eslint-disable-next-line
persistent_data: false,
+4 -3
View File
@@ -14,9 +14,10 @@ type BrowserPolicy struct {
}
type BrowserPolicyContent struct {
Extensions []BrowserPolicyExtension `json:"extensions"`
DeveloperTools bool `json:"developer_tools"`
PersistentData bool `json:"persistent_data"`
Extensions []BrowserPolicyExtension `json:"extensions"`
InstallExtensions bool `json:"install_extensions"`
DeveloperTools bool `json:"developer_tools"`
PersistentData bool `json:"persistent_data"`
}
type BrowserPolicyExtension struct {