readme and latest libs

main 1.1.32
mr-elbe5 2021-04-18 17:38:11 +02:00
parent 6edc641176
commit 15dfe3bbd6
3 changed files with 264 additions and 15 deletions

View File

@ -24,8 +24,8 @@
"repositoryURL": "https://github.com/mr-elbe5/SwiftyDataExtensions",
"state": {
"branch": null,
"revision": "7ed8d32e305f82a7c323d3b1c5d3a575f159c868",
"version": "1.0.0"
"revision": "2c595621cb7c7b5aa2d6a467c526056215f9fb04",
"version": "1.1.0"
}
},
{
@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/mr-elbe5/SwiftyHttpServer",
"state": {
"branch": null,
"revision": "34f3f7b7caba04795bf1649aec83da73da0927ff",
"version": "1.1.19"
"revision": "abafc28e367f3e76e253cbf2aa3eef995a0217e9",
"version": "1.1.20"
}
},
{
@ -42,8 +42,8 @@
"repositoryURL": "https://github.com/mr-elbe5/SwiftyLog",
"state": {
"branch": null,
"revision": "20478a501fa8d80ecdebfd4cf1a8d6b6ebf86f07",
"version": "1.1.0"
"revision": "0b1485976c71620ed19b07bafe71af757c5e3424",
"version": "1.1.1"
}
},
{
@ -51,8 +51,8 @@
"repositoryURL": "https://github.com/mr-elbe5/SwiftyStringExtensions",
"state": {
"branch": null,
"revision": "1a5aeec2eb9170d459de689489b43975323e51ba",
"version": "1.0.8"
"revision": "53b7f6b51030b8f8c9338f71a76eb1c27bf56739",
"version": "1.1.0"
}
}
]

View File

@ -13,11 +13,11 @@ let package = Package(
targets: ["BandikaSwiftBase"]),
],
dependencies: [
.package(url: "https://github.com/mr-elbe5/SwiftyHttpServer", from: "1.1.19"),
.package(url: "https://github.com/mr-elbe5/SwiftyHttpServer", from: "1.1.20"),
.package(url: "https://github.com/apple/swift-crypto", from: "1.0.0"),
.package(url: "https://github.com/mr-elbe5/SwiftyStringExtensions", from: "1.0.8"),
.package(url: "https://github.com/mr-elbe5/SwiftyDataExtensions", from: "1.0.0"),
.package(url: "https://github.com/mr-elbe5/SwiftyLog", from: "1.1.0")
.package(url: "https://github.com/mr-elbe5/SwiftyStringExtensions", from: "1.1.0"),
.package(url: "https://github.com/mr-elbe5/SwiftyDataExtensions", from: "1.1.0"),
.package(url: "https://github.com/mr-elbe5/SwiftyLog", from: "1.1.1")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@ -26,7 +26,10 @@ let package = Package(
name: "BandikaSwiftBase",
dependencies: [
"SwiftyHttpServer",
.product(name: "Crypto", package: "swift-crypto")
.product(name: "Crypto", package: "swift-crypto"),
"SwiftyStringExtensions",
"SwiftyDataExtensions",
"SwiftyLog",
],
resources: [
.copy("ServerPages"),

250
README.md
View File

@ -6,6 +6,252 @@ SwiftyBandika is a CMS server app on the Apple App Store (thus including a front
SwiftyBandikaCL is the headless (Command Line based) server.
This library is based on SwiftNIO with NIOHTTP1 and swift-crypto
This library is based on Apple's
- SwiftNIO with NIOHTTP1
- swift-crypto
and the author's libraries
It uses its own Request and Response classes as well as an own template type which is more request orientated (so not quite as dumb) compared to other template types.
- SwiftyLog
- SwiftyStringExtensions
- SwiftyDataExtensions
- SwiftyHttpServer
all on GitHub.
Projects which use this library are: SwiftyBandika (server with GUI in the app store) and SwiftyBandikaCL (command line)
# Web View
The web view shows content or page is governed by the current content's page type and its master page.
### System Menu
The system menu is a list of small icons on the top right.
##### Home icon (House)
This icon links to the home page (as the logo does).
#### Anonymous Mode Icons
The icons appear when the user is not logged in.
##### Login (Person)
Leads to the login dialog.
#### User Mode Icons
These icons appear when the user is logged in, but depending on the users rights and the current page edit mode.
##### Administration (Gear)
Links to the Adminstration.
This icon appears only if the user has any administration rights.
###### Edit (Pencil)
Opens the current page in edit mode.
This icon appears only if the user has edit rights for this page.
##### View (Eye or slashed eye)
Toggles between the draft and the published view.
This icon appears only if the user has edit rights for this page and the page has been changed.
##### Publish (Thumb up)
Publishes the current draft of the page.
This icon appears only if the user has approve rights for this page.
##### Profile (Filled Person)
Link to the current usres profile page, where he/she can edit certain attributes and change the password. The password minimum length is 8 characters.
##### Logout icon (Arrow out)
Logs the current user out, changes to anonymous view.
### Main Menu
##### Logo
The logo is an image, which can be changed in the app. It links to the home page.
##### Top menu items
The top menu items are links to direct child pages of the home page (which have been selected for the main menu).
If a top item has child content, it opens a dropdown with a link to itself and its child contents.
##### Subitems
These are links to the contents.
##### Mobile view
Depending on the browser width, the main menu changes to a mobile view with a 'burger icon'.
### Breadcrumb
This shows the path from the Home page to the current content. Path elements are links to the respective content.
### Content area
The content area shows what is the "content" part of the master page.
It can be viewed in normal or edit mode (if the user has these rights).
#### Default View
The defaut view shows the content as it has been created and edited. If the content has been changed compared to the published version and the user has edit rights, he7she is shown the draft version. This can be changed by the 'eye' icon in the system menu.
#### Edit View
The edit view allows direct editing of all editable parts of the page.
##### Save and Cancel
At the top of this view there are Save and Cancel buttons to save or cancel the current changes.
**Important:** If changes are not saved and the page is closed, all changes are lost!
#### Page Types
Depending on the page types and templates, the edit areas may differ. So a full page layout has just one dit area, whereas a template based page may have several sections which can be filled by parts and their editable fields.
#### Templates
Beside the master templates, which govern the area around the content, there are page templates for the content layout and part templates for single parts in sections of the content.
#### Sections
Sections are areas for parts (maybe with own templates), which are defined in a page template.
Typical sections are columns for main and aside content.
#### Parts
Part are small items which can be added to a section. Parts can be program defined like a list of subcontent or a list of usres, or it can be template based with editable fields like text field, html field or image field.
### Footer
##### Footer Links
Footer links point to content, which in the administration has been set a footer content. Typically these are imprints or legal pages.
##Web Administration
The web administration is split into user/group administration and contentadministration.
### User Administration
#### Groups
Groups are groups of users, mostly for assigning rights.
##### Add Group (Plus sign)
A dialog lets you set name, global rights and members.
##### Edit Group (Pencil)
A dialog lets you change name, global rights and members.
##### Delete Group (Trash)
Deletes the group permanently.
#### Users
Users have the usual attributes and may be member of one or more groups.
##### Add User (Plus sign)
A dialog lets you set the attributes and group memberships.
Last name, login name, password and email are mandatory.
##### Edit User (Pencil)
A dialog lets you change the attributes and group memberships.
Last name, login name, email are mandatory. If no new password is entered, the old one remains in place.
##### Delete User (Trash)
Deletes the user permanently.
You cannot delete the Superadmin user (root).
### Content Administration
The content administration lets you create content, or edit content settings and their tree structure.
Visual content is edited in wysiwyg mode, that is on the actual page itself.
##### Add (new) Content (Plus with Down Arrow)
A dropdown lets you choose the content type before editing its settings (see below).
##### Paste Content (Filled double Page)
Lets you paste content from the internal clipboard if present.
##### View Content (Eye)
Jumps to the default view of the content.
##### Edit Content Settings (Pencil)
A dialog lets you edit the content's settings, including name, description, anonymous viewing, master template, page template (if any), appearance in menus, active state.
##### Edit Content Rights (Keys)
A dialog lets you set specific right for any group.
##### Sort Child Contents (Up down Arrows)
A dialog lets you change the sequential appearance of child contents in any list (e.g. the menu).
##### Cut Content (Scissor)
Cut content to the internal clipboard. Only after pasting the content is actually moved.
##### Copy Content (Empty double Page)
Copy content to the clipboard. During this operation the new content gets a new ID, but all other attributes are exactly copied.
##### Delete Content (Trash)
Deletes the content permanantly.
The root content (Home page) cannot be deleted - it can only be changed.
### File Administration
For each content the content administration lets you create files, or edit file settings.
##### Add (new) File (Plus with Down Arrow)
Create new file data and opens a dialog to edit it (see below).
##### Paste File (Filled double Page)
Lets you paste a file from the internal clipboard if present.
##### View File (Eye)
Open the file in a new window.
##### Download File (Arrow down)
Lets you save this file locally.
##### Edit File Settings (Pencil)
A dialog lets you edit the file's settings, including name, description and the file itself (replace).
##### Cut File (Scissor)
Cut the file to the internal clipboard. Only after pasting the file is actually moved.
##### Copy File (Empty double Page)
Copy the file to the clipboard. During this operation the new file gets a new ID and a new physical file, but all other attributes are exactly copied.
##### Delete File (Trash)
Deletes the file permanantly.