First commit
This commit is contained in:
76
framework/server/themeGroups.js
Normal file
76
framework/server/themeGroups.js
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2020, 2023, The Unified Company.
|
||||
|
||||
This code is part of Unify.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the ESA Software Community License - Strong Copyleft LICENSE,
|
||||
as published by the ESA.
|
||||
See the ESA Software Community License - Strong Copyleft LICENSE, for more details.
|
||||
|
||||
https://unifyjs.org
|
||||
|
||||
*/
|
||||
|
||||
class themeGroup{
|
||||
|
||||
name;
|
||||
|
||||
items = new Array();
|
||||
|
||||
add( group ) {
|
||||
|
||||
this.items.push( group );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var platforms = new Array("Windows", "Android", "Linux", "Ios", "Macos");
|
||||
|
||||
var devices = new Array("Mobile", "Tablet", "Pc");
|
||||
|
||||
var tints = new Array("Light", "Dark");
|
||||
|
||||
|
||||
var groupsFlat = new Array();
|
||||
|
||||
|
||||
for (var i = 0; i < platforms.length; i++) {
|
||||
|
||||
var os = platforms[i];
|
||||
|
||||
for (var j = 0; j < devices.length; j++) {
|
||||
|
||||
var device = devices[j]
|
||||
|
||||
for (var k = 0; k < tints.length; k++) {
|
||||
|
||||
var tint = tints[k]
|
||||
|
||||
|
||||
var currentGroup = new themeGroup();
|
||||
|
||||
|
||||
currentGroup.level = 3;
|
||||
|
||||
currentGroup.os = os;
|
||||
|
||||
currentGroup.device = device;
|
||||
|
||||
currentGroup.tint = tint;
|
||||
|
||||
|
||||
currentGroup.path = "/" + os + "/" + device + "/" + tint;
|
||||
|
||||
groupsFlat.push( currentGroup );
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default groupsFlat;
|
||||
Reference in New Issue
Block a user