Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
xx12345798 committed Jan 5, 2025
2 parents abf9d30 + 5df9698 commit 2bcb814
Show file tree
Hide file tree
Showing 47 changed files with 24,073 additions and 225 deletions.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
Set the PR title to a meaningful commit message that:
- follows the Conventional Commits specification (https://www.conventionalcommits.org).
- is in imperative form.
Example:
fix: Don't add implicit wildcards ('*') at the beginning and the end of a query (fixes #390).
-->
# Description
<!-- Describe what this request will change/fix and provide any details
necessary for reviewers -->

# Validation performed
<!-- What tests and validation you performed on the change -->
49 changes: 49 additions & 0 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "deploy-github-pages"

on:
push:
branches: ["main"]

permissions: {}

concurrency:
group: "${{github.workflow}}-${{github.ref}}"

# Cancel in-progress jobs for efficiency
cancel-in-progress: true

jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-node@v4"
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "./docs/package-lock.json"

- run: "npm --prefix docs/ install"
- run: "npm --prefix docs/ run build"

- name: "Upload static files as artifact"
uses: "actions/upload-pages-artifact@v3"
with:
path: "./docs/build"

deploy:
needs: "build"
permissions:
# To deploy to Pages
pages: "write"

# To request a JWT from GitHub for certifying the origin of the deployment
id-token: "write"
runs-on: "ubuntu-latest"
environment:
name: "github-pages"
url: "${{steps.deployment.outputs.page_url}}"
steps:
- name: "Deploy to GitHub Pages"
id: "deployment"
uses: "actions/deploy-pages@v4"
9 changes: 1 addition & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,4 @@ jobs:
with:
node-version: 22
- run: "npm --prefix client/ clean-install"
- run: "npm --prefix client/ run lint:ci"
continue-on-error: true
- uses: "ataylorme/eslint-annotate-action@v3"
with:
fail-on-error: true
fail-on-warning: true
only-pr-files: true
report-json: "./client/eslint-report.json"
- run: "npm --prefix client/ run lint:check"
30 changes: 30 additions & 0 deletions .github/workflows/pr-title-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "pr-title-checks"

on:
pull_request_target:
# NOTE: Workflows triggered by this event give the workflow access to secrets and grant the
# `GITHUB_TOKEN` read/write repository access by default. So we need to ensure:
# - This workflow doesn't inadvertently check out, build, or execute untrusted code from the
# pull request triggered by this event.
# - Each job has `permissions` set to only those necessary.
types: ["edited", "opened", "reopened"]
branches: ["main"]

permissions: {}

concurrency:
group: "${{github.workflow}}-${{github.ref}}"

# Cancel in-progress jobs for efficiency
cancel-in-progress: true

jobs:
conventional-commits:
permissions:
# For amannn/action-semantic-pull-request
pull-requests: "read"
runs-on: "ubuntu-latest"
steps:
- uses: "amannn/action-semantic-pull-request@v5"
env:
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
2 changes: 1 addition & 1 deletion application/routes/vnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def change_vncpasswd():

vnc, reason = create_connection(session_id, ConnectionType.VNC)
if reason != '':
logger.error("create_connection() failed with status=%s", reason)
logger.error("create_connection() failed with status=", reason)
abort(403, description=reason)

passwd = request.json.get('passwd')
Expand Down
Binary file added assets/ictrl-social-card.psd
Binary file not shown.
3 changes: 1 addition & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"eject": "react-scripts eject",

"lint": "npm run lint:check",
"lint:check": "eslint src",
"lint:ci": "npm run lint:check -- --format json --output-file eslint-report.json",
"lint:check": "eslint src --max-warnings 0",
"lint:fix": "npm run lint:check -- --fix"
},
"dependencies": {
Expand Down
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

32 changes: 32 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Website

This website is built using [Docusaurus][docusaurus], a modern static website generator.

### Installation

```
$ npm install
```

### Local Development

```
$ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

This site is automatically deployed by [a GitHub workflow][deploy-github-pages] on every push to the `main` branch.

[docusaurus]: https://docusaurus.io/
[deploy-github-pages]: /.github/workflows/deploy-gh-pages.yaml
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

115 changes: 115 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
* Copyright (c) 2025 iCtrl Developers
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/

import {themes as prismThemes} from "prism-react-renderer";

import type * as Preset from "@docusaurus/preset-classic";
import type {Config} from "@docusaurus/types";


const config: Config = {
favicon: "img/favicon.png",
tagline: "A Simple VNC + SSH Console + SFTP Client",
title: "iCtrl",

baseUrl: "/",
url: "https://ictrl.ca",

organizationName: "junhaoliao",
projectName: "iCtrl",

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

i18n: {
defaultLocale: "en",
locales: [
"en",
"zh",
],
},

presets: [
[
"classic",
{
blog: false,

// docs: {
// editUrl:
// "https://github.com/junhaoliao/iCtrl/tree/main/docs/docs",
// sidebarPath: "./sidebars.ts",
// },
docs: false,
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],

themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
},

image: "img/ictrl-social-card.png",
navbar: {
title: "iCtrl",
logo: {
alt: "iCtrl Logo",
src: "img/logo.svg",
},
items: [
// {
// type: "docSidebar",
// sidebarId: "devDocsSidebar",
// label: "Docs",
// },
{
to: "/about",
label: "About",
},
{
type: "localeDropdown",
position: "right",
},
{
type: "custom-ReactGitHubButton",
position: "right",
},
],
},

footer: {
style: "dark",
copyright: `Copyright © 2019-${new Date().getFullYear()} iCtrl Developers.`,
},

prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};

export default config;
Loading

0 comments on commit 2bcb814

Please sign in to comment.