mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
wip
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,3 +12,4 @@ build
|
|||||||
*.d.ts
|
*.d.ts
|
||||||
.env
|
.env
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
static
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import sys
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Run administrative tasks."""
|
"""Run administrative tasks."""
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'terminus.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tabby.settings')
|
||||||
try:
|
try:
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||||
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.1",
|
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.1",
|
||||||
"@ngtools/webpack": "^12.0.4",
|
"@ngtools/webpack": "^12.0.4",
|
||||||
"@terminus-term/to-string-loader": "^1.1.7-beta.1",
|
"@tabby-gang/to-string-loader": "^1.1.7-beta.1",
|
||||||
"@types/node": "^11.9.5",
|
"@types/node": "^11.9.5",
|
||||||
"apply-loader": "^2.0.0",
|
"apply-loader": "^2.0.0",
|
||||||
"awesome-typescript-loader": "^5.2.1",
|
"awesome-typescript-loader": "^5.2.1",
|
||||||
|
|||||||
14
poetry.lock
generated
14
poetry.lock
generated
@@ -144,6 +144,14 @@ category = "main"
|
|||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dj-database-url"
|
||||||
|
version = "0.5.0"
|
||||||
|
description = "Use Database URLs in your Django Application."
|
||||||
|
category = "main"
|
||||||
|
optional = false
|
||||||
|
python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "django"
|
name = "django"
|
||||||
version = "3.2.3"
|
version = "3.2.3"
|
||||||
@@ -653,7 +661,7 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"]
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
content-hash = "7ddd4096097eb58dc20601d3334a56507c893607ff156155070c4c865108c563"
|
content-hash = "68dc9c46c30477fc44a54fe157921c2e5a8efac1f1bdb42bfe0de0a4c8595f46"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
asgiref = [
|
asgiref = [
|
||||||
@@ -753,6 +761,10 @@ defusedxml = [
|
|||||||
{file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"},
|
{file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"},
|
||||||
{file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"},
|
{file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"},
|
||||||
]
|
]
|
||||||
|
dj-database-url = [
|
||||||
|
{file = "dj-database-url-0.5.0.tar.gz", hash = "sha256:4aeaeb1f573c74835b0686a2b46b85990571159ffc21aa57ecd4d1e1cb334163"},
|
||||||
|
{file = "dj_database_url-0.5.0-py2.py3-none-any.whl", hash = "sha256:851785365761ebe4994a921b433062309eb882fedd318e1b0fcecc607ed02da9"},
|
||||||
|
]
|
||||||
django = [
|
django = [
|
||||||
{file = "Django-3.2.3-py3-none-any.whl", hash = "sha256:7e0a1393d18c16b503663752a8b6790880c5084412618990ce8a81cc908b4962"},
|
{file = "Django-3.2.3-py3-none-any.whl", hash = "sha256:7e0a1393d18c16b503663752a8b6790880c5084412618990ce8a81cc908b4962"},
|
||||||
{file = "Django-3.2.3.tar.gz", hash = "sha256:13ac78dbfd189532cad8f383a27e58e18b3d33f80009ceb476d7fcbfc5dcebd8"},
|
{file = "Django-3.2.3.tar.gz", hash = "sha256:13ac78dbfd189532cad8f383a27e58e18b3d33f80009ceb476d7fcbfc5dcebd8"},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "terminus-web"
|
name = "tabby-web"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Your Name <you@example.com>"]
|
authors = ["Your Name <you@example.com>"]
|
||||||
@@ -15,6 +15,7 @@ social-auth-app-django = "^4.0.0"
|
|||||||
python-dotenv = "^0.17.1"
|
python-dotenv = "^0.17.1"
|
||||||
websockets = "^9.1"
|
websockets = "^9.1"
|
||||||
gql = "^2.0.0"
|
gql = "^2.0.0"
|
||||||
|
dj-database-url = "^0.5.0"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
flake8 = "^3.9.2"
|
flake8 = "^3.9.2"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
ul
|
ul
|
||||||
li Multiple #[strong nested panes]
|
li Multiple #[strong nested panes]
|
||||||
li #[strong Progress bars] and activity notifications for tabs
|
li #[strong Progress bars] and activity notifications for tabs
|
||||||
li Terminus remembers open tabs and panes where you left off
|
li Tabby remembers open tabs and panes where you left off
|
||||||
li Tabs on #[strong any side of the window]
|
li Tabs on #[strong any side of the window]
|
||||||
li Optional #[strong quake mode] (terminal docked to a side of the screen)
|
li Optional #[strong quake mode] (terminal docked to a side of the screen)
|
||||||
li Optional #[strong global hotkey] to focus/hide the terminal
|
li Optional #[strong global hotkey] to focus/hide the terminal
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ import { ActivatedRoute } from '@angular/router'
|
|||||||
|
|
||||||
class DemoConnector {
|
class DemoConnector {
|
||||||
constructor (targetWindow: Window, private version: Version) {
|
constructor (targetWindow: Window, private version: Version) {
|
||||||
targetWindow['terminusWebDemoDataPath'] = `${this.getDistURL()}/${version.version}/terminus-web-demo/data`
|
targetWindow['tabbyWebDemoDataPath'] = `${this.getDistURL()}/${version.version}/tabby-web-demo/data`
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadConfig (): Promise<string> {
|
async loadConfig (): Promise<string> {
|
||||||
return '{}'
|
return `{
|
||||||
|
recoverTabs: false
|
||||||
|
}`
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveConfig (content: string): Promise<void> {
|
async saveConfig (content: string): Promise<void> {
|
||||||
@@ -28,12 +30,12 @@ class DemoConnector {
|
|||||||
|
|
||||||
getPluginsToLoad (): string[] {
|
getPluginsToLoad (): string[] {
|
||||||
return [
|
return [
|
||||||
'terminus-core',
|
'tabby-core',
|
||||||
'terminus-settings',
|
'tabby-settings',
|
||||||
'terminus-terminal',
|
'tabby-terminal',
|
||||||
'terminus-community-color-schemes',
|
'tabby-community-color-schemes',
|
||||||
'terminus-web',
|
'tabby-web',
|
||||||
'terminus-web-demo',
|
'tabby-web-demo',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +48,7 @@ class DemoConnector {
|
|||||||
export class HomeComponent {
|
export class HomeComponent {
|
||||||
@ViewChild('iframe') iframe: ElementRef
|
@ViewChild('iframe') iframe: ElementRef
|
||||||
connector: DemoConnector
|
connector: DemoConnector
|
||||||
githubURL = 'https://github.com/Eugeny/terminus'
|
githubURL = 'https://github.com/Eugeny/tabby'
|
||||||
releaseURL = `${this.githubURL}/releases/latest`
|
releaseURL = `${this.githubURL}/releases/latest`
|
||||||
donationURL = 'https://ko-fi.com/eugeny'
|
donationURL = 'https://ko-fi.com/eugeny'
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ html
|
|||||||
base(href='/')
|
base(href='/')
|
||||||
meta(name='viewport', content='initial-scale=1, minimal-ui, shrink-to-fit=no')
|
meta(name='viewport', content='initial-scale=1, minimal-ui, shrink-to-fit=no')
|
||||||
script(src='/build/index.js', defer)
|
script(src='/build/index.js', defer)
|
||||||
title Terminus
|
title Tabby
|
||||||
body
|
body
|
||||||
app
|
app
|
||||||
|
|||||||
@@ -125,12 +125,12 @@ export class AppConnectorService {
|
|||||||
|
|
||||||
getPluginsToLoad (): string[] {
|
getPluginsToLoad (): string[] {
|
||||||
return [
|
return [
|
||||||
'terminus-core',
|
'tabby-core',
|
||||||
'terminus-settings',
|
'tabby-settings',
|
||||||
'terminus-terminal',
|
'tabby-terminal',
|
||||||
'terminus-ssh',
|
'tabby-ssh',
|
||||||
'terminus-community-color-schemes',
|
'tabby-community-color-schemes',
|
||||||
'terminus-web',
|
'tabby-web',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
doctype html
|
doctype html
|
||||||
html.terminus
|
html.tabby
|
||||||
head
|
head
|
||||||
meta(charset='UTF-8')
|
meta(charset='UTF-8')
|
||||||
script(src='/build/terminal.js')
|
script(src='/build/terminal.js')
|
||||||
@@ -10,8 +10,8 @@ html.terminus
|
|||||||
app-root(style='display: none')
|
app-root(style='display: none')
|
||||||
.preload-logo
|
.preload-logo
|
||||||
div
|
div
|
||||||
.terminus-logo
|
.tabby-logo
|
||||||
h1.terminus-title Terminus
|
h1.tabby-title Tabby
|
||||||
sup α
|
sup α
|
||||||
.progress
|
.progress
|
||||||
.bar(style='width: 0%')
|
.bar(style='width: 0%')
|
||||||
|
|||||||
@@ -31,17 +31,17 @@ async function start () {
|
|||||||
await webRequire(`${baseUrl}/web/dist/preload.js`)
|
await webRequire(`${baseUrl}/web/dist/preload.js`)
|
||||||
await webRequire(`${baseUrl}/web/dist/bundle.js`)
|
await webRequire(`${baseUrl}/web/dist/bundle.js`)
|
||||||
|
|
||||||
const terminus = window['Terminus']
|
const tabby = window['Tabby']
|
||||||
|
|
||||||
const pluginModules = []
|
const pluginModules = []
|
||||||
for (const plugin of connector.getPluginsToLoad()) {
|
for (const plugin of connector.getPluginsToLoad()) {
|
||||||
pluginModules.push(await terminus.loadPlugin(`${baseUrl}/${plugin}`))
|
pluginModules.push(await tabby.loadPlugin(`${baseUrl}/${plugin}`))
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector('app-root')['style'].display = 'flex'
|
document.querySelector('app-root')['style'].display = 'flex'
|
||||||
|
|
||||||
const config = connector.loadConfig()
|
const config = connector.loadConfig()
|
||||||
terminus.bootstrap({
|
tabby.bootstrap({
|
||||||
packageModules: pluginModules,
|
packageModules: pluginModules,
|
||||||
bootstrapData: {
|
bootstrapData: {
|
||||||
config,
|
config,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class AppConfig(AppConfig):
|
class AppConfig(AppConfig):
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
name = 'terminus.app'
|
name = 'tabby.app'
|
||||||
0
tabby/app/migrations/__init__.py
Normal file
0
tabby/app/migrations/__init__.py
Normal file
@@ -4,7 +4,7 @@ from channels.auth import AuthMiddlewareStack
|
|||||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||||
from django.core.asgi import get_asgi_application
|
from django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'terminus.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tabby.settings')
|
||||||
|
|
||||||
from .app.urls import websocket_urlpatterns
|
from .app.urls import websocket_urlpatterns
|
||||||
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import dj_database_url
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ INSTALLED_APPS = [
|
|||||||
'channels',
|
'channels',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'social_django',
|
'social_django',
|
||||||
'terminus.app',
|
'tabby.app',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -45,7 +46,7 @@ MIDDLEWARE = [
|
|||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'terminus.urls'
|
ROOT_URLCONF = 'tabby.urls'
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
@@ -63,18 +64,15 @@ TEMPLATES = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
ASGI_APPLICATION = 'terminus.asgi.application'
|
ASGI_APPLICATION = 'tabby.asgi.application'
|
||||||
WSGI_APPLICATION = 'terminus.wsgi.application'
|
WSGI_APPLICATION = 'tabby.wsgi.application'
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': dj_database_url.config(conn_max_age=600)
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -116,6 +114,8 @@ USE_TZ = True
|
|||||||
# https://docs.djangoproject.com/en/3.2/howto/static-files/
|
# https://docs.djangoproject.com/en/3.2/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
STATIC_ROOT = BASE_DIR / 'static'
|
||||||
|
STATICFILES_DIRS = [BASE_DIR / 'build']
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
||||||
9
tabby/urls.py
Normal file
9
tabby/urls.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
from django.urls import path, include
|
||||||
|
from .app.urls import urlpatterns
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path('', include(urlpatterns)),
|
||||||
|
path('api/1/auth/social/', include('social_django.urls', namespace='social')),
|
||||||
|
path('admin/', admin.site.urls),
|
||||||
|
]
|
||||||
7
tabby/wsgi.py
Normal file
7
tabby/wsgi.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tabby.settings')
|
||||||
|
|
||||||
|
application = get_wsgi_application()
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
"""terminus URL Configuration
|
|
||||||
|
|
||||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
||||||
https://docs.djangoproject.com/en/3.2/topics/http/urls/
|
|
||||||
Examples:
|
|
||||||
Function views
|
|
||||||
1. Add an import: from my_app import views
|
|
||||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
||||||
Class-based views
|
|
||||||
1. Add an import: from other_app.views import Home
|
|
||||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
||||||
Including another URLconf
|
|
||||||
1. Import the include() function: from django.urls import include, path
|
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
||||||
"""
|
|
||||||
from django.contrib import admin
|
|
||||||
from django.urls import path, include
|
|
||||||
from .app.urls import urlpatterns
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
path('', include(urlpatterns)),
|
|
||||||
path('api/1/auth/social/', include('social_django.urls', namespace='social')),
|
|
||||||
path('admin/', admin.site.urls),
|
|
||||||
]
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
"""
|
|
||||||
WSGI config for terminus project.
|
|
||||||
|
|
||||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
||||||
|
|
||||||
For more information on this file, see
|
|
||||||
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'terminus.settings')
|
|
||||||
|
|
||||||
application = get_wsgi_application()
|
|
||||||
@@ -32,7 +32,7 @@ module.exports = {
|
|||||||
test: /\.[jt]sx?$/,
|
test: /\.[jt]sx?$/,
|
||||||
loader: '@ngtools/webpack',
|
loader: '@ngtools/webpack',
|
||||||
},
|
},
|
||||||
{ test: /terminus\/app\/dist/, use: ['script-loader'] },
|
{ test: /tabby\/app\/dist/, use: ['script-loader'] },
|
||||||
{
|
{
|
||||||
test: /\.pug$/,
|
test: /\.pug$/,
|
||||||
use: ['apply-loader', 'pug-loader'],
|
use: ['apply-loader', 'pug-loader'],
|
||||||
@@ -40,7 +40,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: ['@terminus-term/to-string-loader', 'css-loader', 'sass-loader'],
|
use: ['@tabby-gang/to-string-loader', 'css-loader', 'sass-loader'],
|
||||||
include: /component\.scss/
|
include: /component\.scss/
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -335,10 +335,10 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
enhanced-resolve "5.7.0"
|
enhanced-resolve "5.7.0"
|
||||||
|
|
||||||
"@terminus-term/to-string-loader@^1.1.7-beta.1":
|
"@tabby-gang/to-string-loader@^1.1.7-beta.1":
|
||||||
version "1.1.7-beta.1"
|
version "1.1.7-beta.2"
|
||||||
resolved "https://registry.yarnpkg.com/@terminus-term/to-string-loader/-/to-string-loader-1.1.7-beta.1.tgz#5a622830a7f12ebbb2e2c600c621f586259dc7fe"
|
resolved "https://registry.yarnpkg.com/@tabby-gang/to-string-loader/-/to-string-loader-1.1.7-beta.2.tgz#5519ec87d5b3a49998e74d01c26c269770be50c8"
|
||||||
integrity sha512-mYUDUYkEKpr/mS4LucALv4QKHsF8xWXcYChQdN2nZIXCoXJoBQFsQPSzdcAeCzbl/XDsyop/mI5vIA34RnDd0Q==
|
integrity sha512-2hgj8KMl2Qm4dcruu1iFZqeIMXLvMpNrEKIDjEjei5NbQ/aOagOozPQV4B/jlTDybiLiXzx33Ys6Xj/8tVXZMw==
|
||||||
dependencies:
|
dependencies:
|
||||||
loader-utils "^1.0.0"
|
loader-utils "^1.0.0"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user