font-awesome is used as default icon font for the entire system

This commit is contained in:
Xuan Sang LE 2018-03-11 12:32:37 +01:00
parent 800c95830d
commit 10015d99b0
21 changed files with 240 additions and 17 deletions

View File

@ -69,7 +69,7 @@ genlang:
read -r -p "Enter locale: " LOCAL;\
./src/core/languages/gen.sh ./src ./src/core/languages/$$LOCAL.json
build_themes: antos_themes_build
cp -r src/themes/system $(BUILDDIR)/resources/themes/
antos_themes_build:
@echo "$(BLUE)Building themes name: antos$(NC)"
@ -112,6 +112,7 @@ uglify:
# npm install minify -g
# uglify the css
minify --output $(BUILDDIR)/resources/themes/antos/antos.css $(BUILDDIR)/resources/themes/antos/antos.css
minify --output $(BUILDDIR)/resources/themes/system/font-awesome.css $(BUILDDIR)/resources/themes/system/font-awesome.css
#uglify each packages
for d in $(packages); do\

View File

@ -59,7 +59,7 @@ class BasicDialog extends BaseDialog
html += "<#{v.tag} #{v.att} style = 'margin-left:5px; margin-right:5px;' data-id = 'content#{k}'></#{v.tag}>" for k,v of @conf.tags
html += "<div data-height = '35' style=' text-align:right;padding-top:3px;'>"
html += "<afx-button data-id = 'bt#{k}' text = '#{v.label}' style='margin-right:5px;'></afx-button>" for k,v of @conf.buttons
html += "</div></afx-vbox></afx-app-window>"
html += "</div><div data-height='5'></div></afx-vbox></afx-app-window>"
#render the html
_GUI.htmlToScheme html, @, @host

View File

@ -161,7 +161,7 @@ self.OS.GUI =
app: app
onbtclick: () -> app.toggle()
# TODO: this path is not good, need to create a blob of it
data.icon = "#{_API.handler.get}/#{meta.path}/#{meta.icon}" if meta.icon
data.icon = "#{meta.path}/#{meta.icon}" if meta.icon
# TODO: add default app icon class in system setting
# so that it can be themed
data.iconclass = "fa fa-cogs" if (not meta.icon) and (not meta.iconclass)
@ -402,6 +402,7 @@ self.OS.GUI =
v.filename = k
v.type = "app"
v.mime = "antos/app"
v.icon = "#{v.path}/#{v.icon}" if v.icon
v.iconclass = "fa fa-adn" unless v.iconclass or v.icon
_OS.setting.system.packages = if r.result then r.result else
_GUI.refreshSystemMenu()

View File

@ -214,4 +214,6 @@
"Wrong format: it should be [name] url":"Wrong format: it should be [name] url",
"Yes":"Yes",
"{0} is not a directory":"{0} is not a directory"
,
}

View File

@ -0,0 +1,217 @@
{
"About":"About",
"About: {0}":"About: {0}",
"Add category":"Add category",
"Add repository":"Add repository",
"Address":"Address",
"Alive (ms)":"Alive (ms)",
"Application installed":"Application installed",
"Application {0} is not executable":"Application {0} is not executable",
"Application":"Application",
"Applications":"Applications",
"April":"April",
"August":"August",
"Authentication":"Authentication",
"Cancel":"Cancel",
"Cannot Edit category":"Cannot Edit category",
"Cannot add new category":"Cannot add new category",
"Cannot create {0}":"Cannot create {0}",
"Cannot delete all content of: {0} [{1}]":"Cannot delete all content of: {0} [{1}]",
"Cannot delete the category: {0} [{1}]":"Cannot delete the category: {0} [{1}]",
"Cannot delete the section: {0}":"Cannot delete the section: {0}",
"Cannot delete: {0}":"Cannot delete: {0}",
"Cannot down load the app {0}":"Cannot down load the app {0}",
"Cannot export file for embedding to text":"Cannot export file for embedding to text",
"Cannot fetch CV categories":"Cannot fetch CV categories",
"Cannot fetch the entry content":"Cannot fetch the entry content",
"Cannot fetch user data":"Cannot fetch user data",
"Cannot install {0}":"Cannot install {0}",
"Cannot load 3rd library at: {0}":"Cannot load 3rd library at: {0}",
"Cannot move section":"Cannot move section",
"Cannot read service script: {0}":"Cannot read service script: {0}",
"Cannot render the PDF file":"Cannot render the PDF file",
"Cannot save blog: {0}":"Cannot save blog: {0}",
"Cannot save section: {0}":"Cannot save section: {0}",
"Cannot save system setting":"Cannot save system setting",
"Cannot save user data":"Cannot save user data",
"Cannot share file: {0}":"Cannot share file: {0}",
"Cannot uninstall package: {0}":"Cannot uninstall package: {0}",
"Categories":"Categories",
"Clear all":"Clear all",
"Close tab":"Close tab",
"Close without saving ?":"Close without saving ?",
"Close":"Close",
"Copy not yet implemented":"Copy not yet implemented",
"Copy":"Copy",
"Created: {0}":"Created: {0}",
"Cut":"Cut",
"December":"December",
"Delete a post":"Delete a post",
"Delete category":"Delete category",
"Delete section":"Delete section",
"Delete":"Delete",
"Desktop":"Desktop",
"Dialog {0} not found":"Dialog {0} not found",
"Do you really want to delete this post ?":"Do you really want to delete this post ?",
"Do you really want to delete: {0}?":"Do you really want to delete: {0}?",
"Download":"Download",
"Edit category":"Edit category",
"Edit repository":"Edit repository",
"Edit":"Edit",
"Email":"Email",
"Error find app by mimes {0}":"Error find app by mimes {0}",
"Error reading package meta data: {0}":"Error reading package meta data: {0}",
"Error saving file {0}":"Error saving file {0}",
"Exit":"Exit",
"Fail to create directory: {0}":"Fail to create directory: {0}",
"Fail to create {0}: {1}":"Fail to create {0}: {1}",
"Fail to delete {0}: {1}":"Fail to delete {0}: {1}",
"Fail to delete: {0}":"Fail to delete: {0}",
"Fail to fetch packages list from: {0}":"Fail to fetch packages list from: {0}",
"Fail to get file meta data: {0}":"Fail to get file meta data: {0}",
"Fail to make request: {0}":"Fail to make request: {0}",
"Fail to move file: {0} -> {1}":"Fail to move file: {0} -> {1}",
"Fail to paste: {0}":"Fail to paste: {0}",
"Fail to publish file: {0}":"Fail to publish file: {0}",
"Fail to query data from database: {0}":"Fail to query data from database: {0}",
"Fail to read file: {0}":"Fail to read file: {0}",
"Fail to rename to {0}: {1}":"Fail to rename to {0}: {1}",
"Fail to scan directory: {0}":"Fail to scan directory: {0}",
"Fail to upload file to: {0}":"Fail to upload file to: {0}",
"Fail to upload to {0}: {1}":"Fail to upload to {0}: {1}",
"Fail to write to file: {0}":"Fail to write to file: {0}",
"Fail to {0} package":"Fail to {0} package",
"February":"February",
"File name":"File name",
"File not found {0}":"File not found {0}",
"File {0} copied":"File {0} copied",
"File {0} cut":"File {0} cut",
"File":"File",
"Folder name":"Folder name",
"Format : [name] url":"Format : [name] url",
"Found {0} sections":"Found {0} sections",
"Fri":"Fri",
"From":"From",
"Full name must be entered":"Full name must be entered",
"Full name":"Full name",
"Google Drive":"Google Drive",
"Hidden files":"Hidden files",
"Home":"Home",
"Icon view":"Icon view",
"Ignore all {0} unsaved files ?":"Ignore all {0} unsaved files ?",
"Install":"Install",
"Invalid package: Meta data file not found":"Invalid package: Meta data file not found",
"January":"January",
"July":"July",
"June":"June",
"Kill process":"Kill process",
"Language file {0} not found":"Language file {0} not found",
"Launch":"Launch",
"List view":"List view",
"Location":"Location",
"Log out":"Log out",
"Logout":"Logout",
"March":"March",
"May":"May",
"Mime type {0} is not supported":"Mime type {0} is not supported",
"Modify section entry":"Modify section entry",
"Mon":"Mon",
"Move to":"Move to",
"Name":"Name",
"Navigation bar":"Navigation bar",
"New file":"New file",
"New folder":"New folder",
"New section entry for {0}":"New section entry for {0}",
"New":"New",
"No application available to open {0}":"No application available to open {0}",
"No post found: {0}":"No post found: {0}",
"No":"No",
"November":"November",
"OS":"OS",
"October":"October",
"Ok":"Ok",
"Only {0} could be selected":"Only {0} could be selected",
"Open file":"Open file",
"Open with":"Open with",
"Open":"Open",
"Options":"Options",
"Package uninstalled":"Package uninstalled",
"Parent can not be the category itself":"Parent can not be the category itself",
"Paste":"Paste",
"Phone":"Phone",
"Pid":"Pid",
"Please enter category name":"Please enter category name",
"Please enter tags":"Please enter tags",
"Please insert a title in the text: beginning with heading":"Please insert a title in the text: beginning with heading",
"Please select a category":"Please select a category",
"Please select a date":"Please select a date",
"Please select a file":"Please select a file",
"Please select a parent category":"Please select a parent category",
"Please select a section to edit":"Please select a section to edit",
"Please select a section to move":"Please select a section to move",
"Preview":"Preview",
"Properties":"Properties",
"Quit without saving ?":"Quit without saving ?",
"Quit":"Quit",
"Read more":"Read more",
"Refresh":"Refresh",
"Rename":"Rename",
"Repositories":"Repositories",
"Resource not found {0}":"Resource not found {0}",
"Resource not found: {0}":"Resource not found: {0}",
"Row {0}, col {1}, lines: {2}":"Row {0}, col {1}, lines: {2}",
"Sat":"Sat",
"Save as":"Save as",
"Save":"Save",
"Section list is empty, please add one":"Section list is empty, please add one",
"Select image file":"Select image file",
"Selected: {0} ({1} bytes)":"Selected: {0} ({1} bytes)",
"September":"September",
"Service":"Service",
"Share file":"Share file",
"Shared url: {0}":"Shared url: {0}",
"Shared":"Shared",
"Short biblio":"Short biblio",
"Sidebar":"Sidebar",
"Size":"Size",
"Subtitle":"Subtitle",
"Sun":"Sun",
"System fail: Cannot init desktop manager":"System fail: Cannot init desktop manager",
"System fail: Cannot init login screen":"System fail: Cannot init login screen",
"Tags":"Tags",
"This feature is not implemented yet":"This feature is not implemented yet",
"Thu":"Thu",
"Title or content must not be blank":"Title or content must not be blank",
"Title":"Title",
"Toggle Full screen":"Toggle Full screen",
"Tree view":"Tree view",
"Tue":"Tue",
"Type":"Type",
"Uninstall : {0}?":"Uninstall : {0}?",
"Uninstall":"Uninstall",
"Unknown API setting for {0}":"Unknown API setting for {0}",
"Updated: {0}":"Updated: {0}",
"Upload":"Upload",
"Url":"Url",
"User abort the authentication":"User abort the authentication",
"User data updated":"User data updated",
"VDB Unknown condition for delete command":"VDB Unknown condition for delete command",
"VFS Cannot encode file: {0}":"VFS Cannot encode file: {0}",
"VFS cannot create : {0}":"VFS cannot create : {0}",
"VFS cannot delete : {0}":"VFS cannot delete : {0}",
"VFS cannot download file : {0}":"VFS cannot download file : {0}",
"VFS cannot get meta data for {0}":"VFS cannot get meta data for {0}",
"VFS cannot init {0}: {1}":"VFS cannot init {0}: {1}",
"VFS cannot move : {0}":"VFS cannot move : {0}",
"VFS cannot read : {0}":"VFS cannot read : {0}",
"VFS cannot save : {0}":"VFS cannot save : {0}",
"VFS cannot write : {0}":"VFS cannot write : {0}",
"VFS unknown action: {0}":"VFS unknown action: {0}",
"VFS unknown handler: {0}":"VFS unknown handler: {0}",
"View":"View",
"Wed":"Wed",
"Would you like to login to {0}?":"Would you like to login to {0}?",
"Wrong format: it should be [name] url":"Wrong format: it should be [name] url",
"Yes":"Yes",
"{0} is not a directory":"{0} is not a directory"
}

View File

@ -1,7 +1,7 @@
<afx-label>
<span style = {color?"color:" + color:""} >
<i if={iconclass} class = {iconclass} ></i>
<i if={icon} class="icon-style" style = { "background: url("+icon+");background-size: 100% 100%;background-repeat: no-repeat;" }></i>
<i if={icon} class="icon-style" style = { "background: url("+window.OS.API.handler.get+"/"+icon+");background-size: 100% 100%;background-repeat: no-repeat;" }></i>
{ text?text.__():"" }
</span>
<script>

View File

@ -1,4 +1,4 @@
<afx-tab-container>
<afx-tab-bar>
<afx-list-view ref = "list" />
<script>
var self = this
@ -71,4 +71,4 @@
}
</script>
</afx-tab-container>
</afx-tab-bar>

View File

@ -4,6 +4,7 @@
<title>AntOS webOS</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="resources/themes/system/font-awesome.css" rel="stylesheet">
<link id="ostheme" rel="stylesheet" href="">
<!--link href="theme/antos/style.css" rel="stylesheet"-->
<script src="scripts/jquery-3.2.1.min.js"></script>

View File

@ -10,6 +10,6 @@
},
"version":"0.1a",
"category":"System",
"iconclass":"fa fa-user-circle-o",
"icon": "icon.png",
"mimes":["none"]
}

View File

@ -2,7 +2,7 @@
<afx-hbox>
<afx-switch enable= true data-width="50"></afx-switch>
<afx-vbox>
<afx-tab-container data-height = "50" data-id="mytabs" closable = true></afx-tab-container>
<afx-tab-bar data-height = "50" data-id="mytabs" closable = true></afx-tab-bar>
<afx-tree-view data-id="mytree"> </afx-tree-view>
</afx-vbox>
<afx-resizer data-width = "5" ></afx-resizer>

View File

@ -22,7 +22,7 @@ afx-app-window[data-id="notepad"] .afx-window-content {
background-color: #f6F6F6;
}
afx-tab-container[data-id="tabarea"] afx-list-view > div.list-container > ul > li {
afx-tab-bar[data-id="tabarea"] afx-list-view > div.list-container > ul > li {
background-color: #dfdfdf;
color:#272822;
border: 0;
@ -30,16 +30,16 @@ afx-tab-container[data-id="tabarea"] afx-list-view > div.list-container > ul >
border-right: 1px solid #a6a6a6;
border-radius: 0;
}
afx-tab-container[data-id="tabarea"] afx-list-view{
afx-tab-bar[data-id="tabarea"] afx-list-view{
padding:0;
margin: 0;
border-left: 0;
border-bottom: 1px solid #a6a6a6;
}
/*afx-tab-container[data-id="tabarea"] afx-list-view i.closable:before{
/*afx-tab-bar[data-id="tabarea"] afx-list-view i.closable:before{
color: white;
}*/
afx-tab-container[data-id="tabarea"] afx-list-view > div.list-container > ul > li.selected {
afx-tab-bar[data-id="tabarea"] afx-list-view > div.list-container > ul > li.selected {
background-color: #f6F6F6;
border-radius: 0;
}

View File

@ -6,7 +6,7 @@
</afx-vbox>
<afx-resizer data-width = "3" ></afx-resizer>
<afx-vbox>
<afx-tab-container data-id="tabarea" data-height="26" closable = true></afx-tab-container>
<afx-tab-bar data-id="tabarea" data-height="26" closable = true></afx-tab-bar>
<div data-id="datarea"></div>
<afx-hbox data-height="30" data-id="bottom-vbox">
<afx-label data-id="editorstat"></afx-label>

View File

@ -22,9 +22,10 @@ afx-apps-dock afx-button button{
background-color: transparent;
border:0;
}
afx-apps-dock afx-button .icon-style{
afx-apps-dock afx-button afx-label i.icon-style{
width: 24px;
height: 24px;
margin-left: 2px;
margin-bottom: 0px;
border:0;
}

View File

@ -1,13 +1,13 @@
afx-tab-container {
afx-tab-bar {
display: block;
width: 100%;
}
afx-tab-container afx-list-view {
afx-tab-bar afx-list-view {
padding:0;
margin:0;
}
afx-tab-container afx-list-view > div.list-container > ul > li{
afx-tab-bar afx-list-view > div.list-container > ul > li{
float:left;
border-top-left-radius: 5px;
border-top-right-radius: 5px;

View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB