]> git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/Schema.js
file browser: unify file type schema and avoid switch-case bloat
[proxmox-widget-toolkit.git] / src / Schema.js
1 Ext.define('Proxmox.Schema', { // a singleton
2 singleton: true,
3
4 authDomains: {
5 pam: {
6 name: 'Linux PAM',
7 add: false,
8 edit: false,
9 pwchange: true,
10 },
11 openid: {
12 name: gettext('OpenID Connect Server'),
13 ipanel: 'pmxAuthOpenIDPanel',
14 add: true,
15 edit: true,
16 tfa: false,
17 pwchange: false,
18 iconCls: 'pmx-itype-icon-openid-logo',
19 },
20 },
21 // to add or change existing for product specific ones
22 overrideAuthDomains: function(extra) {
23 for (const [key, value] of Object.entries(extra)) {
24 Proxmox.Schema.authDomains[key] = value;
25 }
26 },
27
28 pxarFileTypes: {
29 b: { icon: 'cube', label: gettext('Block Device') },
30 c: { icon: 'tty', label: gettext('Character Device') },
31 d: { icon: 'folder-o', label: gettext('Directory') },
32 f: { icon: 'file-label-o', label: gettext('File') },
33 h: { icon: 'file-o', label: gettext('Hardlink') },
34 l: { icon: 'link', label: gettext('Softlink') },
35 p: { icon: 'exchange', label: gettext('Pipe/Fifo') },
36 s: { icon: 'plug', label: gettext('Socket') },
37 v: { icon: 'cube', label: gettext('Virtual') },
38 },
39 });