Compare commits
No commits in common. "3b5b00f5b070e2c45d55be5fc4b4e1815e8a5b17" and "559c22f6269b2a3035fa1d4d27dc6501ffb2b42b" have entirely different histories.
3b5b00f5b0
...
559c22f626
@ -1,17 +1,14 @@
|
|||||||
package blogwriter
|
package blogwriter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"personalwebsite/apps"
|
|
||||||
"personalwebsite/webfilesystem"
|
"personalwebsite/webfilesystem"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BlogWriterApplication struct {
|
type BlogWriterApplication struct {
|
||||||
fs *webfilesystem.WebFileSystem
|
fs *webfilesystem.WebFileSystem
|
||||||
appID string
|
appID string
|
||||||
path string
|
|
||||||
manifest apps.ApplicationManifest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewBlogWriterApp(webfs *webfilesystem.WebFileSystem) *BlogWriterApplication {
|
func NewBlogWriterApp(webfs *webfilesystem.WebFileSystem) *BlogWriterApplication {
|
||||||
@ -20,17 +17,11 @@ func NewBlogWriterApp(webfs *webfilesystem.WebFileSystem) *BlogWriterApplication
|
|||||||
appID: "BlogWriter",
|
appID: "BlogWriter",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (bw *BlogWriterApplication) GetManifest() apps.ApplicationManifest {
|
|
||||||
return bw.manifest
|
|
||||||
}
|
|
||||||
func (bw *BlogWriterApplication) GetAppID() string {
|
func (bw *BlogWriterApplication) GetAppID() string {
|
||||||
return bw.appID
|
return bw.appID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bw *BlogWriterApplication) GetPath() string {
|
|
||||||
return bw.path
|
|
||||||
}
|
|
||||||
|
|
||||||
func (bw *BlogWriterApplication) PublicRoutes(routes *gin.RouterGroup) {}
|
func (bw *BlogWriterApplication) PublicRoutes(routes *gin.RouterGroup) {}
|
||||||
func (bw *BlogWriterApplication) PrivateRoutes(routes *gin.RouterGroup) {
|
func (bw *BlogWriterApplication) PrivateRoutes(routes *gin.RouterGroup) {
|
||||||
|
|
||||||
|
@ -5,11 +5,9 @@ import (
|
|||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"personalwebsite/apps"
|
|
||||||
"personalwebsite/apps/appCtx"
|
"personalwebsite/apps/appCtx"
|
||||||
"personalwebsite/errormessage"
|
"personalwebsite/errormessage"
|
||||||
"personalwebsite/libs"
|
"personalwebsite/libs"
|
||||||
"personalwebsite/wde"
|
|
||||||
"personalwebsite/webfilesystem"
|
"personalwebsite/webfilesystem"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -17,38 +15,19 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type AboutMeApp struct {
|
type AboutMeApp struct {
|
||||||
fs *webfilesystem.WebFileSystem
|
fs *webfilesystem.WebFileSystem
|
||||||
appID string
|
appID string
|
||||||
mLib libs.MarkdownLib
|
mLib libs.MarkdownLib
|
||||||
titleBarConfig wde.TitleBarConfig //TODO to app manifest?
|
|
||||||
path string
|
|
||||||
manifest apps.ApplicationManifest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAboutMeApp(webFs *webfilesystem.WebFileSystem) *AboutMeApp {
|
func NewAboutMeApp(webFs *webfilesystem.WebFileSystem) *AboutMeApp {
|
||||||
manifest := apps.ApplicationManifest{}
|
|
||||||
_, err := webFs.Read(path.Join("/Applications/AboutMe.app", ".appmanifest"), &manifest)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
newApp := AboutMeApp{
|
newApp := AboutMeApp{
|
||||||
fs: webFs,
|
fs: webFs,
|
||||||
appID: "AboutMe",
|
appID: "AboutMe",
|
||||||
path: "/Applications/AboutMe.app",
|
|
||||||
titleBarConfig: wde.TitleBarConfig{
|
|
||||||
Lable: "About Me",
|
|
||||||
CloseButton: true,
|
|
||||||
},
|
|
||||||
manifest: manifest,
|
|
||||||
}
|
}
|
||||||
return &newApp
|
return &newApp
|
||||||
}
|
}
|
||||||
func (p *AboutMeApp) GetPath() string {
|
|
||||||
return p.path
|
|
||||||
}
|
|
||||||
func (p *AboutMeApp) GetManifest() apps.ApplicationManifest {
|
|
||||||
return p.manifest
|
|
||||||
}
|
|
||||||
func (p *AboutMeApp) PublicRoutes(route *gin.RouterGroup) {
|
func (p *AboutMeApp) PublicRoutes(route *gin.RouterGroup) {
|
||||||
route.POST("render", func(ctx *gin.Context) {
|
route.POST("render", func(ctx *gin.Context) {
|
||||||
filePath := ctx.Query("path")
|
filePath := ctx.Query("path")
|
||||||
@ -274,10 +253,9 @@ func (p *AboutMeApp) Render(appCtx appCtx.AppContext, filePath string) (gin.H, e
|
|||||||
}
|
}
|
||||||
|
|
||||||
return gin.H{
|
return gin.H{
|
||||||
"TitleBarConfig": p.titleBarConfig,
|
"HeaderProps": propsData.Header,
|
||||||
"HeaderProps": propsData.Header,
|
"Links": absoluteLinks,
|
||||||
"Links": absoluteLinks,
|
"Islands": renderedIslands,
|
||||||
"Islands": renderedIslands,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"personalwebsite/apps"
|
|
||||||
"personalwebsite/apps/appCtx"
|
"personalwebsite/apps/appCtx"
|
||||||
"personalwebsite/errormessage"
|
"personalwebsite/errormessage"
|
||||||
"personalwebsite/libs"
|
"personalwebsite/libs"
|
||||||
@ -15,11 +14,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type BlogViewerApplication struct {
|
type BlogViewerApplication struct {
|
||||||
fs *webfilesystem.WebFileSystem
|
fs *webfilesystem.WebFileSystem
|
||||||
appID string
|
appID string
|
||||||
mLib libs.MarkdownLib
|
mLib libs.MarkdownLib
|
||||||
path string
|
|
||||||
manifest apps.ApplicationManifest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewBlogViewerApp(webFs *webfilesystem.WebFileSystem) *BlogViewerApplication {
|
func NewBlogViewerApp(webFs *webfilesystem.WebFileSystem) *BlogViewerApplication {
|
||||||
@ -29,18 +26,10 @@ func NewBlogViewerApp(webFs *webfilesystem.WebFileSystem) *BlogViewerApplication
|
|||||||
mLib: libs.MarkdownLib{},
|
mLib: libs.MarkdownLib{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (b *BlogViewerApplication) GetManifest() apps.ApplicationManifest {
|
|
||||||
return b.manifest
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BlogViewerApplication) GetAppID() string {
|
func (b *BlogViewerApplication) GetAppID() string {
|
||||||
return b.appID
|
return b.appID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BlogViewerApplication) GetPath() string {
|
|
||||||
return b.path
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BlogViewerApplication) PrivateRoutes(route *gin.RouterGroup) {
|
func (b *BlogViewerApplication) PrivateRoutes(route *gin.RouterGroup) {
|
||||||
b.PublicRoutes(route)
|
b.PublicRoutes(route)
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package finder
|
package finder
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
|
||||||
"personalwebsite/apps"
|
|
||||||
"personalwebsite/apps/appCtx"
|
"personalwebsite/apps/appCtx"
|
||||||
"personalwebsite/wde"
|
"personalwebsite/wde"
|
||||||
"personalwebsite/webfilesystem"
|
"personalwebsite/webfilesystem"
|
||||||
@ -11,46 +9,24 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type FinderApplication struct {
|
type FinderApplication struct {
|
||||||
fs *webfilesystem.WebFileSystem
|
fs *webfilesystem.WebFileSystem
|
||||||
appID string
|
appID string
|
||||||
titleBarConfig wde.TitleBarConfig
|
|
||||||
path string
|
|
||||||
manifest apps.ApplicationManifest
|
|
||||||
// manifest apps.ApplicationManifest
|
// manifest apps.ApplicationManifest
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFinderApplication(webFs *webfilesystem.WebFileSystem) *FinderApplication {
|
func NewFinderApplication(webFs *webfilesystem.WebFileSystem) *FinderApplication {
|
||||||
manifest := apps.ApplicationManifest{}
|
|
||||||
_, err := webFs.Read(path.Join("/Applications/Finder.app", ".appmanifest"), &manifest)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return &FinderApplication{
|
return &FinderApplication{
|
||||||
fs: webFs,
|
fs: webFs,
|
||||||
path: "/Applications/Finder.app",
|
|
||||||
appID: "Finder",
|
appID: "Finder",
|
||||||
titleBarConfig: wde.TitleBarConfig{
|
|
||||||
Lable: "Finder",
|
|
||||||
CloseButton: true,
|
|
||||||
},
|
|
||||||
manifest: manifest,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (f *FinderApplication) GetManifest() apps.ApplicationManifest {
|
|
||||||
return f.manifest
|
|
||||||
}
|
|
||||||
func (f *FinderApplication) GetAppID() string {
|
func (f *FinderApplication) GetAppID() string {
|
||||||
return f.appID
|
return f.appID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FinderApplication) GetPath() string {
|
|
||||||
return f.path
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *FinderApplication) Render(appCtx appCtx.AppContext) gin.H {
|
func (f *FinderApplication) Render(appCtx appCtx.AppContext) gin.H {
|
||||||
return gin.H{
|
return gin.H{}
|
||||||
"TitleBarConfig": f.titleBarConfig,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FinderApplication) RenderPublicContextMenu(context string, filePath string, data string) gin.H {
|
func (f *FinderApplication) RenderPublicContextMenu(context string, filePath string, data string) gin.H {
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"personalwebsite/apps/appCtx"
|
"personalwebsite/apps/appCtx"
|
||||||
"personalwebsite/errormessage"
|
"personalwebsite/errormessage"
|
||||||
|
|
||||||
mobile "github.com/floresj/go-contrib-mobile"
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -19,15 +18,7 @@ func (f *FinderApplication) PublicRoutes(routes *gin.RouterGroup) {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
d := mobile.GetDevice(ctx)
|
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(appCtx))
|
||||||
switch {
|
|
||||||
case d.Mobile():
|
|
||||||
ctx.HTML(http.StatusOK, "templates/finder/mobile-app.tmpl", gin.H{
|
|
||||||
// "autostart": autostart,
|
|
||||||
})
|
|
||||||
default:
|
|
||||||
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(appCtx))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
//Obsolete
|
//Obsolete
|
||||||
@ -77,13 +68,7 @@ func (f *FinderApplication) PrivateRoutes(routes *gin.RouterGroup) {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
d := mobile.GetDevice(ctx)
|
ctx.HTML(http.StatusOK, "finder/admin-app.tmpl", f.Render(appCtx))
|
||||||
switch {
|
|
||||||
case d.Mobile():
|
|
||||||
ctx.HTML(http.StatusOK, "finder/mobile-app.tmpl", f.Render(appCtx))
|
|
||||||
default:
|
|
||||||
ctx.HTML(http.StatusOK, "finder/admin-app.tmpl", f.Render(appCtx))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
routes.GET("renderMobileDesktop", func(ctx *gin.Context) {
|
routes.GET("renderMobileDesktop", func(ctx *gin.Context) {
|
||||||
|
@ -2,17 +2,14 @@ package imgviewer
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"personalwebsite/apps"
|
|
||||||
"personalwebsite/webfilesystem"
|
"personalwebsite/webfilesystem"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ImgViewerApp struct {
|
type ImgViewerApp struct {
|
||||||
fs *webfilesystem.WebFileSystem
|
fs *webfilesystem.WebFileSystem
|
||||||
appID string
|
appID string
|
||||||
path string
|
|
||||||
manifest apps.ApplicationManifest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewImgViewerApp(webFs *webfilesystem.WebFileSystem) *ImgViewerApp {
|
func NewImgViewerApp(webFs *webfilesystem.WebFileSystem) *ImgViewerApp {
|
||||||
@ -25,9 +22,6 @@ func NewImgViewerApp(webFs *webfilesystem.WebFileSystem) *ImgViewerApp {
|
|||||||
func (p *ImgViewerApp) PrivateRoutes(route *gin.RouterGroup) {
|
func (p *ImgViewerApp) PrivateRoutes(route *gin.RouterGroup) {
|
||||||
p.PublicRoutes(route)
|
p.PublicRoutes(route)
|
||||||
}
|
}
|
||||||
func (i *ImgViewerApp) GetManifest() apps.ApplicationManifest {
|
|
||||||
return i.manifest
|
|
||||||
}
|
|
||||||
func (p *ImgViewerApp) PublicRoutes(route *gin.RouterGroup) {
|
func (p *ImgViewerApp) PublicRoutes(route *gin.RouterGroup) {
|
||||||
route.GET("render", func(ctx *gin.Context) {
|
route.GET("render", func(ctx *gin.Context) {
|
||||||
isMobileParam := ctx.Query("isMobile")
|
isMobileParam := ctx.Query("isMobile")
|
||||||
@ -50,10 +44,6 @@ func (p *ImgViewerApp) PublicRoutes(route *gin.RouterGroup) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ImgViewerApp) GetPath() string {
|
|
||||||
return p.path
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ImgViewerApp) GetAppID() string {
|
func (p *ImgViewerApp) GetAppID() string {
|
||||||
return p.appID
|
return p.appID
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,7 @@ package sunboard
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
|
||||||
"personalwebsite/apps"
|
"personalwebsite/apps"
|
||||||
"personalwebsite/wde"
|
|
||||||
"personalwebsite/webfilesystem"
|
"personalwebsite/webfilesystem"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -12,26 +10,15 @@ import (
|
|||||||
|
|
||||||
type SunboardApp struct {
|
type SunboardApp struct {
|
||||||
fs *webfilesystem.WebFileSystem
|
fs *webfilesystem.WebFileSystem
|
||||||
wde *wde.WDE
|
|
||||||
appID string
|
appID string
|
||||||
appStorage *apps.ApplicationsStorage
|
appStorage *apps.ApplicationsStorage
|
||||||
path string
|
|
||||||
manifest apps.ApplicationManifest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSunboardApp(webFs *webfilesystem.WebFileSystem, wde *wde.WDE, appStorage *apps.ApplicationsStorage) *SunboardApp {
|
func NewSunboardApp(webFs *webfilesystem.WebFileSystem, appStorage *apps.ApplicationsStorage) *SunboardApp {
|
||||||
manifest := apps.ApplicationManifest{}
|
|
||||||
_, err := webFs.Read(path.Join("/Applications/Sunboard.app", ".appmanifest"), &manifest)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
newApp := SunboardApp{
|
newApp := SunboardApp{
|
||||||
fs: webFs,
|
fs: webFs,
|
||||||
wde: wde,
|
|
||||||
appID: "Sunboard",
|
appID: "Sunboard",
|
||||||
appStorage: appStorage,
|
appStorage: appStorage,
|
||||||
path: "/Applications/Sunboard.app",
|
|
||||||
manifest: manifest,
|
|
||||||
}
|
}
|
||||||
return &newApp
|
return &newApp
|
||||||
}
|
}
|
||||||
@ -43,32 +30,21 @@ func (a *SunboardApp) GetAppID() string {
|
|||||||
func (a *SunboardApp) PublicRoutes(route *gin.RouterGroup) {
|
func (a *SunboardApp) PublicRoutes(route *gin.RouterGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *SunboardApp) GetPath() string {
|
|
||||||
return a.path
|
|
||||||
}
|
|
||||||
func (a *SunboardApp) GetManifest() apps.ApplicationManifest {
|
|
||||||
return a.manifest
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *SunboardApp) PrivateRoutes(router *gin.RouterGroup) {
|
func (a *SunboardApp) PrivateRoutes(router *gin.RouterGroup) {
|
||||||
|
|
||||||
router.POST("render", func(ctx *gin.Context) {
|
router.POST("render", func(ctx *gin.Context) {
|
||||||
appIcons := []appIcon{}
|
appIcons := []appIcon{}
|
||||||
for _, app := range a.appStorage.Apps {
|
for _, app := range a.appStorage.Apps {
|
||||||
if app.GetAppID() == "Sunboard" { //FIXME
|
if app.GetAppID() == "Sunboard" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if app.GetManifest().Iconpath == "" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
println(app.GetAppID() + " : " + app.GetPath())
|
|
||||||
// iconPath := path.Join(, "icon.icn")
|
|
||||||
appIcons = append(appIcons, appIcon{
|
appIcons = append(appIcons, appIcon{
|
||||||
Type: "Icon",
|
Type: "Icon",
|
||||||
Icon: "/system/libs/img/icon/get?path=" + app.GetManifest().Iconpath + "&size=32",
|
Icon: "",
|
||||||
Lable: app.GetAppID(),
|
Lable: app.GetAppID(),
|
||||||
AppId: app.GetAppID(),
|
AppId: app.GetAppID(),
|
||||||
Path: app.GetPath(),
|
Path: "/Applications/" + app.GetAppID() + ".app", //FIXME
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ctx.HTML(http.StatusOK, "sunboard/sunboard.html", gin.H{
|
ctx.HTML(http.StatusOK, "sunboard/sunboard.html", gin.H{
|
||||||
|
@ -15,17 +15,15 @@ type WebDEApplication interface {
|
|||||||
GetAppID() string
|
GetAppID() string
|
||||||
PublicRoutes(*gin.RouterGroup)
|
PublicRoutes(*gin.RouterGroup)
|
||||||
PrivateRoutes(*gin.RouterGroup)
|
PrivateRoutes(*gin.RouterGroup)
|
||||||
GetPath() string
|
// GetManifest() ApplicationManifest //TODO: Delete
|
||||||
GetManifest() ApplicationManifest
|
|
||||||
// GEtHtml()
|
// GEtHtml()
|
||||||
// GetId() string
|
// GetId() string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApplicationManifest struct {
|
type ApplicationManifest struct {
|
||||||
AppId string `bson:"appid" json:"appId"`
|
AppId string `bson:"appid" json:"appId"`
|
||||||
Js []string `bson:"js" json:"js"`
|
Js []string `bson:"js" json:"js"`
|
||||||
Css []string `bson:"css" json:"css"`
|
Css []string `bson:"css" json:"css"`
|
||||||
Iconpath string `bson:"iconpath" json:"iconpath"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewApplicationsStorage(apps map[string]WebDEApplication, webfs *webfilesystem.WebFileSystem) *ApplicationsStorage {
|
func NewApplicationsStorage(apps map[string]WebDEApplication, webfs *webfilesystem.WebFileSystem) *ApplicationsStorage {
|
||||||
|
@ -1,5 +1,27 @@
|
|||||||
@import "../../theme.less";
|
/* TODO Move this to body? */
|
||||||
|
/*.ScrollContent {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: scroll;
|
||||||
|
overflow-x: hidden;
|
||||||
|
/* Firefox */
|
||||||
|
/* scrollbar-width: none; */
|
||||||
|
/* Internet Explorer 10+ */
|
||||||
|
/* -ms-overflow-style: none; */
|
||||||
|
|
||||||
|
/* Auto layout */
|
||||||
|
/*display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 0px;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/* WebKit */
|
||||||
|
/* .ScrollContent::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
} */
|
||||||
.PersPropsContent{
|
.PersPropsContent{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -79,9 +101,10 @@
|
|||||||
gap:1px;
|
gap:1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ShortBio > .Text > .Name{
|
.ShortBio .Name{
|
||||||
&:extend(.large-system-font);
|
font-family: "Virtue";
|
||||||
// background-color: aqua;
|
/* FIXME */
|
||||||
|
letter-spacing: 0.35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.PropertiesList .Links {
|
.PropertiesList .Links {
|
||||||
@ -92,28 +115,12 @@
|
|||||||
height: auto;
|
height: auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
// background-color: aqua;
|
|
||||||
/* Auto layout */
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: end;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 0px;
|
|
||||||
// gap:4px;
|
|
||||||
}
|
|
||||||
.Links > a{
|
|
||||||
/* Auto layout */
|
/* Auto layout */
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: end;
|
align-items: left;
|
||||||
justify-content: center;
|
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
gap: 2px;
|
gap:4px;
|
||||||
}
|
|
||||||
.Links > a > .link-lable{
|
|
||||||
// background-color: aqua;
|
|
||||||
// line-height: 60px;
|
|
||||||
// display:table
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.PropertiesList .Links .Link {
|
.PropertiesList .Links .Link {
|
||||||
@ -138,8 +145,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.Island .Title {
|
.Island .Title {
|
||||||
//FIXME
|
font-family: "Virtue";
|
||||||
&:extend(.large-system-font);
|
/* FIXME */
|
||||||
|
letter-spacing: 0.35px;
|
||||||
position:relative;
|
position:relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -148,6 +156,10 @@
|
|||||||
top: -9px;
|
top: -9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Focused .Island .Title{
|
||||||
|
background-color: #CCCCCC;
|
||||||
|
}
|
||||||
|
|
||||||
.Island .Content{
|
.Island .Content{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* top: 0px; */
|
/* top: 0px; */
|
||||||
@ -171,10 +183,9 @@
|
|||||||
}
|
}
|
||||||
.Island .Key{
|
.Island .Key{
|
||||||
position: relative;
|
position: relative;
|
||||||
&:extend(.large-system-font);
|
font-family: "Virtue";
|
||||||
// font-family: "Virtue";
|
font-size: 11px;
|
||||||
// font-size: 11px;
|
letter-spacing: 0.35px;
|
||||||
// letter-spacing: 0.35px;
|
|
||||||
text-align: end;
|
text-align: end;
|
||||||
width: 34%;
|
width: 34%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -87,9 +87,8 @@ export default class FinderWindow{
|
|||||||
|
|
||||||
let newWindow = this.#wde.Decorat.CreateNewWindow(this.#appId, 500, 350 )
|
let newWindow = this.#wde.Decorat.CreateNewWindow(this.#appId, 500, 350 )
|
||||||
newWindow.innerHTML = html
|
newWindow.innerHTML = html
|
||||||
newWindow.querySelector(".title-bar").querySelector(".icon").setAttribute("src","/system/libs/img/icon/get?path=/Icons/GenericFolder.icn&size=16")
|
|
||||||
|
|
||||||
// console.log(newWindow.querySelector(".FileTileView"))
|
console.log(newWindow.querySelector(".FileTileView"))
|
||||||
|
|
||||||
this.fileView = new this.#wde.FileView(
|
this.fileView = new this.#wde.FileView(
|
||||||
newWindow.querySelector(".FileTileView"),
|
newWindow.querySelector(".FileTileView"),
|
||||||
@ -191,7 +190,7 @@ export default class FinderWindow{
|
|||||||
if (event.dataTransfer.getData("dropType") == "move"){
|
if (event.dataTransfer.getData("dropType") == "move"){
|
||||||
const sourcePath= event.dataTransfer.getData("filePath")
|
const sourcePath= event.dataTransfer.getData("filePath")
|
||||||
const targetPath = this.curPath + "/" + event.dataTransfer.getData("fileName")
|
const targetPath = this.curPath + "/" + event.dataTransfer.getData("fileName")
|
||||||
const res = await this.#finder.WDE().WebFS().MoveFile(sourcePath, targetPath)
|
const res = await WebFS.MoveFile(sourcePath, targetPath)
|
||||||
if (res){
|
if (res){
|
||||||
this.ReRenderDir()
|
this.ReRenderDir()
|
||||||
} else {
|
} else {
|
||||||
@ -204,7 +203,7 @@ export default class FinderWindow{
|
|||||||
const file = files[i];
|
const file = files[i];
|
||||||
console.log("file:" + file.name)
|
console.log("file:" + file.name)
|
||||||
|
|
||||||
const res = await this.#finder.WDE().WebFS().UploadFile(file, this.curPath)
|
const res = await WebFS.UploadFile(file, this.curPath)
|
||||||
if (res){
|
if (res){
|
||||||
this.ReRenderDir()
|
this.ReRenderDir()
|
||||||
}
|
}
|
||||||
@ -234,14 +233,6 @@ export default class FinderWindow{
|
|||||||
this.OpenFile(this.curPath, event.target.getAttribute("name"), event.target.getAttribute("filetype"))
|
this.OpenFile(this.curPath, event.target.getAttribute("name"), event.target.getAttribute("filetype"))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {string} fileName
|
|
||||||
*/
|
|
||||||
getFileExtension(fileName){
|
|
||||||
return fileName.split(".")[fileName.split(".").length - 1] //FIXME
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} filePath
|
* @param {string} filePath
|
||||||
*/
|
*/
|
||||||
@ -249,12 +240,11 @@ export default class FinderWindow{
|
|||||||
// console.log(parentPath, fileName, fileType)
|
// console.log(parentPath, fileName, fileType)
|
||||||
// const splittedPath = filePath.split("/")
|
// const splittedPath = filePath.split("/")
|
||||||
// const fileName = splittedPath[splittedPath.length - 1]
|
// const fileName = splittedPath[splittedPath.length - 1]
|
||||||
|
const fileExtension = fileName.split(".")[fileName.split(".").length - 1] //FIXME
|
||||||
const fileExtension = this.getFileExtension(fileName)
|
|
||||||
console.log(fileExtension)
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case fileType == "objectlink":
|
case fileType == "objectlink":
|
||||||
this.#finder.WDE().Alert("Links not supported yet")
|
this.#wde.Alert("Links not supported yet")
|
||||||
break
|
break
|
||||||
case fileType == "pathlink":
|
case fileType == "pathlink":
|
||||||
let res = await WebFS.ReadPathLink(`${parentPath}/${fileName}`)
|
let res = await WebFS.ReadPathLink(`${parentPath}/${fileName}`)
|
||||||
@ -262,22 +252,22 @@ export default class FinderWindow{
|
|||||||
this.OpenFile(res.parentPath, res.name, res.filetype)
|
this.OpenFile(res.parentPath, res.name, res.filetype)
|
||||||
break
|
break
|
||||||
case fileExtension == "app":
|
case fileExtension == "app":
|
||||||
this.#finder.WDE().Open(`${parentPath}/${fileName}`, [])
|
this.#wde.Open(`${parentPath}/${fileName}`, [])
|
||||||
break
|
break
|
||||||
case fileExtension == "blog":
|
case fileExtension == "blog":
|
||||||
this.#finder.WDE().Open(`/Applications/BlogViewer.app`, [`${parentPath}/${fileName}`])
|
this.#wde.Open(`/Applications/BlogViewer.app`, [`${parentPath}/${fileName}`])
|
||||||
break
|
break
|
||||||
case fileType == "directory":
|
case fileType == "directory":
|
||||||
this.#finder.WDE().Open(`/Applications/Finder.app`, [`${parentPath}/${fileName}`])
|
this.#wde.Open(`/Applications/Finder.app`, [`${parentPath}/${fileName}`])
|
||||||
break
|
break
|
||||||
case fileExtension == "blog":
|
case fileExtension == "blog":
|
||||||
this.#finder.WDE().Open("/Applications/BlogViewer.app", [`${parentPath}/${fileName}`])
|
this.#wde.Open("/Applications/BlogViewer.app", [`${parentPath}/${fileName}`])
|
||||||
break
|
break
|
||||||
case fileExtension == "jpeg" | fileExtension == "png":
|
case fileExtension == "jpeg" | fileExtension == "png":
|
||||||
this.#finder.WDE().Open("img-viewer", [`${parentPath}/${fileName}`])
|
this.#wde.Open("img-viewer", [`${parentPath}/${fileName}`])
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.#finder.WDE().Alert("Unsupported file type")
|
this.#wde.Alert("Unsupported file type")
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,42 @@
|
|||||||
@import "./wde/primitives.less";
|
@import "./wde/primitives.less";
|
||||||
@import "./wde/widgets/file-view/file-view.less";
|
@import "./wde/widgets/file-view/file-view.less";
|
||||||
@import "./wde/widgets/scrollbar/scrollbar.less";
|
@import "./wde/widgets/scrollbar/scrollbar.less";
|
||||||
@import "./wde/widgets/button/button.less";
|
|
||||||
// @import "./wde/legacy-ui.less";
|
// @import "./wde/legacy-ui.less";
|
||||||
@import "./wde/widgets/basic-widgets.less";
|
@import "./wde/widgets/basic-widgets.less";
|
||||||
@import "./theme.less";
|
@import "./theme.less";
|
||||||
@import "./wde/window-frame.less";
|
@import "./wde/window-frame.less";
|
||||||
@import "./wde/widgets/title-bar/title-bar.less";
|
@import "./wde/widgets/title-bar/title-bar.less";
|
||||||
|
|
||||||
|
// @font-face{
|
||||||
|
// font-family: "Virtue";
|
||||||
|
// src:url("/res/dev-fs/fonts/virtue.ttf");
|
||||||
|
// }
|
||||||
|
|
||||||
|
/* @font-face{
|
||||||
|
font-family: "Virtue";
|
||||||
|
src:url("/res/dev-fs/fonts/virtue.ttf")
|
||||||
|
} */
|
||||||
|
|
||||||
|
/* @media screen and (max-device-width: 2048px) and (max-device-height: 2048px) {
|
||||||
|
html {
|
||||||
|
zoom: 3
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
.NoClick {
|
.NoClick {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.Click {
|
.Click {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
// .DragArea
|
.DragArea
|
||||||
|
|
||||||
// *{
|
*{
|
||||||
// font-family: Verdana, Geneva, sans-serif;
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
// font-size: 11px;
|
font-size: 11px;
|
||||||
// font-style: normal;
|
font-style: normal;
|
||||||
// font-weight:initial;
|
font-weight:initial;
|
||||||
// }
|
}
|
||||||
|
|
||||||
*::-webkit-scrollbar { /* WebKit */
|
*::-webkit-scrollbar { /* WebKit */
|
||||||
width: 0;
|
width: 0;
|
||||||
@ -29,7 +44,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body{
|
body{
|
||||||
&:extend(.views-font);
|
|
||||||
// zoom: var(--zoom);
|
// zoom: var(--zoom);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -38,9 +52,6 @@ body{
|
|||||||
|
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|
||||||
// font-family: "Geneva";
|
|
||||||
src:url("./fonts/Geneva.woff2");
|
|
||||||
|
|
||||||
/* font: normal 14px Summer Pixel 22, "res/SummerPixel22Regular.ttf"; */
|
/* font: normal 14px Summer Pixel 22, "res/SummerPixel22Regular.ttf"; */
|
||||||
-webkit-touch-callout: none; /* iOS Safari */
|
-webkit-touch-callout: none; /* iOS Safari */
|
||||||
-webkit-user-select: none; /* Safari */
|
-webkit-user-select: none; /* Safari */
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,24 +1,12 @@
|
|||||||
@import "./wde/sunboard/sunboard-mobile.less";
|
@import "./wde/sunboard/sunboard-mobile.less";
|
||||||
@import "./theme.less";
|
|
||||||
@import "./wde/effects.less";
|
|
||||||
@import "./wde/widgets/button/button.less";
|
|
||||||
|
|
||||||
@font-face{
|
|
||||||
font-family: "Geneva";
|
|
||||||
src:url("./fonts/Geneva.woff2");
|
|
||||||
}
|
|
||||||
|
|
||||||
body{
|
body{
|
||||||
&:extend(.views-font);
|
zoom: 2;
|
||||||
// zoom: 2;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
||||||
|
|
||||||
font-size: 12px;
|
|
||||||
|
|
||||||
/* font: normal 14px Summer Pixel 22, "res/SummerPixel22Regular.ttf"; */
|
/* font: normal 14px Summer Pixel 22, "res/SummerPixel22Regular.ttf"; */
|
||||||
-webkit-touch-callout: none; /* iOS Safari */
|
-webkit-touch-callout: none; /* iOS Safari */
|
||||||
-webkit-user-select: none; /* Safari */
|
-webkit-user-select: none; /* Safari */
|
||||||
@ -29,7 +17,6 @@ body{
|
|||||||
supported by Chrome, Edge, Opera and Firefox */
|
supported by Chrome, Edge, Opera and Firefox */
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
|
|
||||||
background-color: @col-argent;
|
|
||||||
// /* Auto layout */
|
// /* Auto layout */
|
||||||
// display: flex;
|
// display: flex;
|
||||||
// flex-direction: column;
|
// flex-direction: column;
|
||||||
@ -37,11 +24,11 @@ body{
|
|||||||
// justify-content: flex-start;
|
// justify-content: flex-start;
|
||||||
// margin: 32px;
|
// margin: 32px;
|
||||||
|
|
||||||
// background-image:
|
background-image:
|
||||||
// linear-gradient(45deg, @col-argent 25%, transparent 25%),
|
linear-gradient(45deg, @col-argent 25%, transparent 25%),
|
||||||
// linear-gradient(45deg, transparent 75%, @col-argent 75%),
|
linear-gradient(45deg, transparent 75%, @col-argent 75%),
|
||||||
// linear-gradient(45deg, transparent 75%, @col-argent 75%),
|
linear-gradient(45deg, transparent 75%, @col-argent 75%),
|
||||||
// linear-gradient(45deg, @col-argent 25%, #777777 25%);
|
linear-gradient(45deg, @col-argent 25%, #777777 25%);
|
||||||
|
|
||||||
background-size:10px 10px;
|
background-size:10px 10px;
|
||||||
|
|
||||||
@ -52,12 +39,11 @@ body{
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
// background-color: aqua;
|
// background-color: aqua;
|
||||||
inset: 16px;
|
inset: 16px;
|
||||||
bottom: 100px;
|
bottom: 128px;
|
||||||
|
|
||||||
border-radius: 5px;
|
border-radius: 15px;
|
||||||
border: @eff-border-black;
|
border: 1px solid #000;
|
||||||
box-shadow: @eff-box-shadow-black;
|
background: #99C;
|
||||||
background: @col-gainsboro;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,28 +69,4 @@ body{
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
}
|
|
||||||
|
|
||||||
.wde-mobile-button{
|
|
||||||
&:extend(.wde-button);
|
|
||||||
&:active{
|
|
||||||
&:extend(.wde-button:active);
|
|
||||||
}
|
|
||||||
height: 35px;
|
|
||||||
width: 95px;
|
|
||||||
/* Auto layout */
|
|
||||||
display: flex;
|
|
||||||
// padding: 10px;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding-right: 5px;
|
|
||||||
// gap: 53px;
|
|
||||||
// align-self: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wde-mobile-button > .icon{
|
|
||||||
|
|
||||||
// width: 8rem;
|
|
||||||
// height: 8rem;
|
|
||||||
}
|
}
|
@ -1,39 +1,10 @@
|
|||||||
@col-ceil: #9999CC;
|
@col-ceil: #9999CC;
|
||||||
|
|
||||||
@col-argent: #C0C0C0;
|
@col-argent: #C0C0C0;
|
||||||
@col-chinese-silver: #CCCCCC;
|
@col-chinese-silver: #CCCCCC;
|
||||||
@col-gainsboro: #DDDDDD;
|
@col-gainsboro: #DDDDDD;
|
||||||
|
|
||||||
@col-bright-grey: #EEEEEE;
|
|
||||||
@col-davys-grey: #555555;
|
@col-davys-grey: #555555;
|
||||||
@col-granite-gray: #666666;
|
|
||||||
@col-grey: #808080;
|
@col-grey: #808080;
|
||||||
|
@col-bright-grey: #EEEEEE;
|
||||||
@col-black: #000000;
|
@col-black: #000000;
|
||||||
@col-white: #FFFFFF;
|
@col-white: #FFFFFF;
|
||||||
@col-raisin-black: #222222;
|
@col-raisin-black: #222222;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@font-face{
|
|
||||||
font-family: "Geneva";
|
|
||||||
src:url("./fonts/Geneva.woff2");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Charcoal";
|
|
||||||
src: url('./fonts/Charcoal.woff2');
|
|
||||||
}
|
|
||||||
|
|
||||||
.large-system-font{
|
|
||||||
font-family: "Charcoal";
|
|
||||||
// font-weight: bold;
|
|
||||||
letter-spacing: 0.35px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.small-system-font{
|
|
||||||
font-family: "Geneva";
|
|
||||||
}
|
|
||||||
.views-font{
|
|
||||||
font-family: "Geneva";
|
|
||||||
}
|
|
@ -41,5 +41,4 @@
|
|||||||
@eff-box-shadow-black: 1px 1px 0px @col-black;
|
@eff-box-shadow-black: 1px 1px 0px @col-black;
|
||||||
|
|
||||||
@eff-box-shadow-convex: inset -1px -1px 0px rgba(0, 0, 0, 0.27),inset 1px 1px 0px @col-white;
|
@eff-box-shadow-convex: inset -1px -1px 0px rgba(0, 0, 0, 0.27),inset 1px 1px 0px @col-white;
|
||||||
@eff-box-shadow-convex-inverted: inset 1px 1px 0px rgba(0, 0, 0, 0.27),inset -1px -1px 0px @col-grey;
|
|
||||||
@eff-box-shadow-adjective: -1px -1px 0px rgba(0, 0, 0, 0.25), 1px 1px 0px #FFFFFF;
|
@eff-box-shadow-adjective: -1px -1px 0px rgba(0, 0, 0, 0.25), 1px 1px 0px #FFFFFF;
|
@ -15,7 +15,7 @@
|
|||||||
#icons{
|
#icons{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// background-color: @col-ceil;
|
background-color: @col-ceil;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #down-bar{
|
// #down-bar{
|
||||||
@ -28,32 +28,31 @@
|
|||||||
.apps-list{
|
.apps-list{
|
||||||
/* Auto layout */
|
/* Auto layout */
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 64px 16px;
|
padding: 64px 32px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
gap: 64px 0px;
|
gap: 103px 18px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-icon{
|
.app-icon{
|
||||||
// background-color: rgba(0, 255, 255, 0.133);
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
// height: 100px;
|
height: 100px;
|
||||||
|
|
||||||
/* Auto layout */
|
/* Auto layout */
|
||||||
display: flex;
|
display: flex;
|
||||||
// padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-icon .icon{
|
.app-icon .icon{
|
||||||
width: 32px;
|
width: 64px;
|
||||||
height: 32px;
|
height: 64px;
|
||||||
// background-color: beige;
|
background-color: beige;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-icon .lable{
|
.app-icon .lable{
|
||||||
|
@ -17,8 +17,6 @@ export default class MobileWebDesktopEnvironment extends AbstractWebDesktopEnvir
|
|||||||
this.FileView = WDEFileView
|
this.FileView = WDEFileView
|
||||||
this.#sunBoard = new MobileSunboard(this)
|
this.#sunBoard = new MobileSunboard(this)
|
||||||
// this.loadWDE()
|
// this.loadWDE()
|
||||||
|
|
||||||
document.addEventListener("touchstart", function(){}, true);//For working :active in css
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ export default class AbstractWebDesktopEnvironment{
|
|||||||
* @returns {Object | undefined} //FIXME
|
* @returns {Object | undefined} //FIXME
|
||||||
*/
|
*/
|
||||||
async _FetchAppManifest(path){
|
async _FetchAppManifest(path){
|
||||||
console.log(path)
|
// console.log(location)
|
||||||
// console.log(this.GetApiAddress())
|
// console.log(this.GetApiAddress())
|
||||||
const params = new URLSearchParams({path: path, mode: "json"})
|
const params = new URLSearchParams({path: path, mode: "json"})
|
||||||
const response = await fetch(`/system/loadApp?` + params)
|
const response = await fetch(`/system/loadApp?` + params)
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
@import "../../effects.less";
|
|
||||||
@import "../../../theme.less";
|
|
||||||
|
|
||||||
.wde-button{
|
|
||||||
&:active{
|
|
||||||
background-color: @col-granite-gray;
|
|
||||||
box-shadow: @eff-box-shadow-convex-inverted;
|
|
||||||
// background-color: red;
|
|
||||||
}
|
|
||||||
background-color: @col-gainsboro;
|
|
||||||
box-shadow: @eff-box-shadow-convex;
|
|
||||||
border: @eff-border-black;
|
|
||||||
border-radius: 3px;
|
|
||||||
|
|
||||||
|
|
||||||
height: 20px;
|
|
||||||
width: auto;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// .wde-button:active{
|
|
||||||
// background-color: red;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .wde-button:hover{
|
|
||||||
// background-color: pink;
|
|
||||||
// }
|
|
@ -28,14 +28,8 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&:extend(.large-system-font);
|
font-family: "Virtue";
|
||||||
|
letter-spacing: 0.35px;
|
||||||
// font-family: "Virtue";
|
|
||||||
// letter-spacing: 0.35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.window-frame.Focused .title-bar .lable{
|
|
||||||
color: @col-black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-frame.Focused .title-bar .visual-drag-area{
|
.window-frame.Focused .title-bar .visual-drag-area{
|
||||||
@ -45,28 +39,16 @@
|
|||||||
height: 11px;
|
height: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-bar > .icon{
|
|
||||||
// background-color: aqua;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.title-bar > .button{
|
.title-bar .button{
|
||||||
width: 11px;
|
width: 11px;
|
||||||
height: 11px;
|
height: 11px;
|
||||||
padding: 0%;
|
padding: 0%;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
|
||||||
&:active{
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
/* Green */
|
|
||||||
box-shadow: 0.5px 0.5px 0px 0.5px #FFFFFF,
|
|
||||||
-0.5px -0.5px 0px 0.5px rgba(0, 0, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
background: linear-gradient(135deg, #999999 18.18%, #FFFFFF 81.82%);
|
background: linear-gradient(135deg, #999999 18.18%, #FFFFFF 81.82%);
|
||||||
border: 1px solid @col-raisin-black;
|
border: 1px solid @col-raisin-black;
|
||||||
box-shadow: 0.5px 0.5px 0px 0.5px #FFFFFF,
|
box-shadow: 0.5px 0.5px 0px 0.5px #FFFFFF,
|
||||||
@ -79,10 +61,6 @@
|
|||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-frame.Focused .title-bar > .button{
|
.Focused .title-bar .button{
|
||||||
visibility:visible;
|
visibility:visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .window-frame.Focused .title-bar > .button:active{
|
|
||||||
// background-color: aqua;
|
|
||||||
// }
|
|
BIN
icons/genericApp/color/16.png
(Stored with Git LFS)
BIN
icons/genericApp/color/16.png
(Stored with Git LFS)
Binary file not shown.
BIN
icons/genericApp/color/32.png
(Stored with Git LFS)
BIN
icons/genericApp/color/32.png
(Stored with Git LFS)
Binary file not shown.
BIN
icons/genericDocument/color/16.png
(Stored with Git LFS)
BIN
icons/genericDocument/color/16.png
(Stored with Git LFS)
Binary file not shown.
BIN
icons/genericDocument/color/32.png
(Stored with Git LFS)
BIN
icons/genericDocument/color/32.png
(Stored with Git LFS)
Binary file not shown.
BIN
icons/genericFolder/color/16.png
(Stored with Git LFS)
BIN
icons/genericFolder/color/16.png
(Stored with Git LFS)
Binary file not shown.
BIN
icons/genericFolder/color/32.png
(Stored with Git LFS)
BIN
icons/genericFolder/color/32.png
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 6.4 KiB |
BIN
icons/github/color/github.png
(Stored with Git LFS)
BIN
icons/github/color/github.png
(Stored with Git LFS)
Binary file not shown.
BIN
icons/hand/color/8.png
(Stored with Git LFS)
BIN
icons/hand/color/8.png
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
BIN
icons/twitter/color/twitter.png
(Stored with Git LFS)
BIN
icons/twitter/color/twitter.png
(Stored with Git LFS)
Binary file not shown.
2
main.go
2
main.go
@ -73,7 +73,7 @@ func main() {
|
|||||||
imgViewerApp := imgviewer.NewImgViewerApp(webfs)
|
imgViewerApp := imgviewer.NewImgViewerApp(webfs)
|
||||||
blogViewerApp := blogviewer.NewBlogViewerApp(webfs)
|
blogViewerApp := blogviewer.NewBlogViewerApp(webfs)
|
||||||
blogWriterApp := blogwriter.NewBlogWriterApp(webfs)
|
blogWriterApp := blogwriter.NewBlogWriterApp(webfs)
|
||||||
sunBoardApp := sunboard.NewSunboardApp(webfs, webde, appsStorage)
|
sunBoardApp := sunboard.NewSunboardApp(webfs, appsStorage)
|
||||||
|
|
||||||
appsStorage.Apps["personal-properties"] = persPropsApp
|
appsStorage.Apps["personal-properties"] = persPropsApp
|
||||||
appsStorage.Apps["finder"] = finderApp
|
appsStorage.Apps["finder"] = finderApp
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<div id="mobile-app-views"></div>
|
<div id="mobile-app-views"></div>
|
||||||
<div id="controls-bar">
|
<div id="controls-bar">
|
||||||
<button id="back" class="wde-mobile-button Click" >
|
<div id="back" class="app-icon Click" >
|
||||||
<img class="icon NoClick" src="/system/libs/img/get?path=/Icons/Hand.icn/color/8.png">
|
<img class="icon NoClick" src="">
|
||||||
<div class="lable NoClick">Back</div>
|
<div class="lable NoClick">Back</div>
|
||||||
</button>
|
</div>
|
||||||
<!-- <div class="app-icon Click" >
|
<!-- <div class="app-icon Click" >
|
||||||
<img class="icon NoClick" src="">
|
<img class="icon NoClick" src="">
|
||||||
<div class="lable NoClick">Test</div>
|
<div class="lable NoClick">Test</div>
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
{{ define "finder/admin-app.tmpl" }}
|
{{ define "finder/admin-app.tmpl" }}
|
||||||
{{template "wde-widgets/window-title-bar.tmpl" .TitleBarConfig}}
|
<div class="title-bar DragArea">
|
||||||
|
<button id="closeWindowButton" class="button" title="Close Window"></button>
|
||||||
|
<div id="Drag" class="visual-drag-area"></div>
|
||||||
|
<div class="lable">
|
||||||
|
Admin Finder
|
||||||
|
</div>
|
||||||
|
<div id="Drag" class="visual-drag-area"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div id="ContentBorder" class="content-border AdjectiveElement">
|
<div id="ContentBorder" class="content-border AdjectiveElement">
|
||||||
<div class="finder-content">
|
<div class="finder-content">
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{{ define "personal-properties/app.tmpl" }}
|
{{ define "personal-properties/app.tmpl" }}
|
||||||
{{template "wde-widgets/window-title-bar.tmpl" .TitleBarConfig}}
|
<div class="title-bar DragArea">
|
||||||
|
<button id="closeWindowButton" class="Button" title="Close Window"></button>
|
||||||
|
<div id="Drag" class="visual-drag-area"></div>
|
||||||
|
<div class="Lable">About me</div>
|
||||||
|
<div id="Drag" class="visual-drag-area"></div>
|
||||||
|
</div>
|
||||||
<div class="content-border">
|
<div class="content-border">
|
||||||
<div class="PersPropsContent">
|
<div class="PersPropsContent">
|
||||||
<div class="PropsView">
|
<div class="PropsView">
|
||||||
@ -7,8 +12,7 @@
|
|||||||
<div class="Links">
|
<div class="Links">
|
||||||
{{ range $link := .Links }}
|
{{ range $link := .Links }}
|
||||||
<a href="{{$link.Url}}" target="_blank">
|
<a href="{{$link.Url}}" target="_blank">
|
||||||
<div class="link-lable">{{$link.Text}}</div>
|
<img class="Link" src="/system/libs/img/get?path={{$link.Icon}}" alt="{{$link.Text}}">
|
||||||
<img class="Link" src="/system/libs/img/get?path={{$link.Icon}}" >
|
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
<div class="Links">
|
<div class="Links">
|
||||||
{{ range $link := .Links }}
|
{{ range $link := .Links }}
|
||||||
<a href="{{$link.Url}}" target="_blank">
|
<a href="{{$link.Url}}" target="_blank">
|
||||||
<div class="link-lable">{{$link.Text}}</div>
|
<img class="Link" src="/system/libs/img/get?path={{$link.Icon}}" alt="{{$link.Text}}">
|
||||||
<img class="Link" src="/system/libs/img/get?path={{$link.Icon}}" >
|
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
{{ define "wde-widgets/window-title-bar.tmpl" }}
|
|
||||||
<div class="title-bar DragArea">
|
|
||||||
{{if .CloseButton}}
|
|
||||||
<button id="closeWindowButton" class="button" title="Close Window"></button>
|
|
||||||
{{end}}
|
|
||||||
<div id="Drag" class="visual-drag-area"></div>
|
|
||||||
<!-- TODO:Disable dragging of icon -->
|
|
||||||
<img class="icon">
|
|
||||||
<div class="lable">
|
|
||||||
{{.Lable}}
|
|
||||||
</div>
|
|
||||||
<div id="Drag" class="visual-drag-area"></div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
@ -1,6 +0,0 @@
|
|||||||
package wde
|
|
||||||
|
|
||||||
type TitleBarConfig struct {
|
|
||||||
Lable string
|
|
||||||
CloseButton bool
|
|
||||||
}
|
|
22
wde/wde.go
22
wde/wde.go
@ -37,23 +37,19 @@ func (w *WDE) RenderFileTileView(directory string, host string) (gin.H, error) {
|
|||||||
|
|
||||||
func (w *WDE) GetIconPathForFile(fileHeader *webfilesystem.FileHeader, parentDir string, size string) string {
|
func (w *WDE) GetIconPathForFile(fileHeader *webfilesystem.FileHeader, parentDir string, size string) string {
|
||||||
if fileHeader.Icon != "" {
|
if fileHeader.Icon != "" {
|
||||||
return "/system/libs/img/icon/get?path=" + fileHeader.Icon + "&size=" + size
|
return "/system/libs/img/icon/get?path=" + fileHeader.Icon
|
||||||
}
|
}
|
||||||
|
|
||||||
extension := fileHeader.GetExtension()
|
switch fileHeader.GetType() {
|
||||||
|
case "directory":
|
||||||
switch true {
|
return "/system/libs/img/icon/get?path=/Icons2/GenericFolder.icn&size=" + size
|
||||||
case extension == "app":
|
case "jpeg":
|
||||||
return "/system/libs/img/icon/get?path=/Icons/GenericApp.icn&size=" + size
|
|
||||||
case extension == "jpeg":
|
|
||||||
fallthrough
|
fallthrough
|
||||||
case extension == "png":
|
case "png":
|
||||||
fallthrough
|
fallthrough
|
||||||
case extension == "jpg":
|
case "jpg":
|
||||||
return "/system/libs/img/get?path=" + path.Join(parentDir, fileHeader.Name) //+ "&size=" + size
|
return "/system/libs/img/icon/get?path=" + path.Join(parentDir, fileHeader.Name) + "&size=" + size
|
||||||
case fileHeader.GetType() == "directory":
|
|
||||||
return "/system/libs/img/icon/get?path=/Icons/GenericFolder.icn&size=" + size
|
|
||||||
default:
|
default:
|
||||||
return "/system/libs/img/icon/get?path=/Icons/GenericDocument.icn&size=" + size
|
return "/system/libs/img/icon/get?path=/Icons2/GenericFolder.icn&size=" + size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,11 +41,6 @@ func (fh *FileHeader) GetType() string {
|
|||||||
return fh.Type
|
return fh.Type
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fh *FileHeader) GetExtension() string {
|
|
||||||
|
|
||||||
return strings.Split(fh.Name, ".")[len(strings.Split(fh.Name, "."))-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
type BinaryFileData struct {
|
type BinaryFileData struct {
|
||||||
MongoId primitive.ObjectID `bson:"_id" json:"-"`
|
MongoId primitive.ObjectID `bson:"_id" json:"-"`
|
||||||
Bin []byte `bson:"bin" json:"-"`
|
Bin []byte `bson:"bin" json:"-"`
|
||||||
|
Loading…
Reference in New Issue
Block a user