Added prettier to fix code style

This commit is contained in:
Radmacher 2021-10-14 21:50:09 +00:00 committed by Marcel van Remmerden
parent 5919d8e332
commit 84fe9785f3
16 changed files with 4548 additions and 2766 deletions

View File

@ -7,7 +7,7 @@ stages:
- release
variables:
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gitdock"
PACKAGE_REGISTRY_URL: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gitdock'
release-version-creation:
stage: version
@ -35,7 +35,7 @@ install-dependencies-windows:
cache:
key: $CI_COMMIT_REF_SLUG-windows
paths:
- node_modules/
- node_modules/
install-dependencies-mac:
stage: dependencies
@ -51,8 +51,7 @@ install-dependencies-mac:
cache:
key: $CI_COMMIT_REF_SLUG-mac
paths:
- node_modules/
- node_modules/
install-dependencies-linux:
stage: dependencies
@ -67,7 +66,7 @@ install-dependencies-linux:
cache:
key: $CI_COMMIT_REF_SLUG-linux
paths:
- node_modules/
- node_modules/
feature-tests:
stage: test
@ -77,8 +76,8 @@ feature-tests:
tags:
- linux
image: node:latest
needs: ["install-dependencies-linux"]
cache:
needs: ['install-dependencies-linux']
cache:
key: $CI_COMMIT_REF_SLUG-linux
paths:
- node_modules/
@ -95,6 +94,23 @@ feature-tests:
- export DISPLAY=:99
- npm test
prettier:
stage: test
only:
- tags
- merge_requests
tags:
- linux
image: node:latest
needs: ['install-dependencies-linux']
cache:
key: $CI_COMMIT_REF_SLUG-linux
paths:
- node_modules/
policy: pull
script:
- npm run prettier:check
build-windows:
stage: build
only:
@ -104,8 +120,8 @@ build-windows:
- windows
- shared-windows
- windows-1809
needs: ["install-dependencies-windows"]
cache:
needs: ['install-dependencies-windows']
cache:
key: $CI_COMMIT_REF_SLUG-windows
paths:
- node_modules/
@ -127,8 +143,8 @@ build-mac:
tags:
- shared-macos-amd64
image: macos-11-xcode-12
needs: ["install-dependencies-mac"]
cache:
needs: ['install-dependencies-mac']
cache:
key: $CI_COMMIT_REF_SLUG-mac
paths:
- node_modules/
@ -150,8 +166,8 @@ build-linux:
tags:
- linux
image: node:latest
needs: ["install-dependencies-linux"]
cache:
needs: ['install-dependencies-linux']
cache:
key: $CI_COMMIT_REF_SLUG-linux
paths:
- node_modules/
@ -209,16 +225,16 @@ release:
- echo "v$VERSION"
- echo "${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.dmg"}
release:
name: "v$VERSION"
tag_name: "v$VERSION"
description: "v$VERSION"
assets:
links:
- name: "MacOS"
url: "${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.dmg"
- name: "Windows"
url: "${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.exe"
- name: "Linux deb"
url: "${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.deb"
- name: "Linux rpm"
url: "${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.rpm"
name: 'v$VERSION'
tag_name: 'v$VERSION'
description: 'v$VERSION'
assets:
links:
- name: 'MacOS'
url: '${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.dmg'
- name: 'Windows'
url: '${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.exe'
- name: 'Linux deb'
url: '${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.deb'
- name: 'Linux rpm'
url: '${PACKAGE_REGISTRY_URL}/${VERSION}/GitDock.rpm'

13
.prettierignore Normal file
View File

@ -0,0 +1,13 @@
.circleci
.github
assets
node_modules
out/
package-lock.json
.DS_Store
Thumbs.db
/.vscode
.vscode/*
yarn.lock
builds/
/.idea

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "all"
}

View File

@ -4,7 +4,7 @@ GitDock is a MacOS/Windows/Linux app that displays all your GitLab activities in
You can either have a look at this walkthrough video I recorded, or just try it out yourself by downloading it from the [releases](https://gitlab.com/mvanremmerden/gitdock/-/releases).
[![YouTube Video](/docs/img/youtube.png)](https://www.youtube.com/watch?v=WkVS38wo4_w "GitDock ⚓️")
[![YouTube Video](/docs/img/youtube.png)](https://www.youtube.com/watch?v=WkVS38wo4_w 'GitDock ⚓️')
## Installation
@ -40,8 +40,8 @@ Depending on whether you use GitLab.com or a self-managed instance, you can eith
Just click the "Login with GitLab" button, and then enter your username and password. Afterwards, you might be seeing the GitLab homepage, but should very quickly and automatically be redirected to your GitDock overview page.
| Start | Login |
| ------ | ------ |
| Start | Login |
| ---------------------------------- | ---------------------------------- |
| ![Start page](/docs/img/start.png) | ![Login page](/docs/img/login.png) |
</details>
@ -52,9 +52,9 @@ To log in with an account from a self-managed instance, you first have to create
Go to the Access Tokens page by first opening the user dropdown, clicking "Preferences" and then navigating to "Access tokens" in the left sidebar.
| User dropdown | Access tokens |
| ------ | ------ |
| ![Preferences](/docs/img/preferences.png) | ![Access tokens](/docs/img/access-tokens.png) |
| User dropdown | Access tokens |
| ----------------------------------------- | --------------------------------------------- |
| ![Preferences](/docs/img/preferences.png) | ![Access tokens](/docs/img/access-tokens.png) |
Enter a token name, mark the `read_api` checkbox and then click "Create personal access token". On the following screen, copy the newly created access token and paste it into the GitDock application, together with the URL of your self-managed instance.
@ -66,8 +66,8 @@ Enter a token name, mark the `read_api` checkbox and then click "Create personal
Whenever you start a new pipeline, a system notification shows up and the GitDock icon in the menu bar changes to a running pipeline icon. Once the pipeline completes, you will receive another notification with the final pipeline status.
| Running | Completed |
| ------ | ------ |
| Running | Completed |
| --------------------------------------------------- | ------------------------------------------------------- |
| ![Running pipeline](/docs/img/running-pipeline.png) | ![Completed pipeline](/docs/img/completed-pipeline.png) |
#### To-Dos
@ -78,14 +78,14 @@ Whenever a new To-Do gets created for you, the system notification will show you
### My Issues, MRs & To-Do list
At the top of the app, you will see the typical sections of issues, MRs and the To-Do list.
At the top of the app, you will see the typical sections of issues, MRs and the To-Do list.
![Top section](/docs/img/top-section.png)
You might be used to this layout already from our GitLab UI. The only difference is that on the detail pages, you can more easily switch directly to the objects you care about by using the filters to e.g. see the last MRs you have approved and that have already been merged.
| Issues | MRs | To-Do list |
| ------ | ------ | ------ |
| Issues | MRs | To-Do list |
| ------------------------------- | ----------------------------------------------- | ------------------------------ |
| ![Issues](/docs/img/issues.png) | ![Merge requests](/docs/img/merge-requests.png) | ![To-Dos](/docs/img/todos.png) |
### My commits
@ -124,7 +124,7 @@ A list of all your recent comments is also visible on the overview page. Due
![Comments](/docs/img/comments.png)
*The loading time for comments is significantly longer than for other objects, as each comment requires 3 API calls to collect all necessary information.*
_The loading time for comments is significantly longer than for other objects, as each comment requires 3 API calls to collect all necessary information._
### Bookmarks
@ -138,8 +138,8 @@ If you have a specific issue or merge request you care about and know you will h
To make Gitdock as accessible and usable as possible, you can switch between dark and light theme.
| Dark | Light |
| ------ | ------ |
| Dark | Light |
| --------------------------- | ----------------------------- |
| ![Dark](/docs/img/dark.png) | ![Light](/docs/img/light.png) |
#### Analytics

View File

@ -1,162 +1,184 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>GitDock</title>
<link rel="stylesheet" href="style.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"
rel="stylesheet"
/>
</head>
<head>
<meta charset="UTF-8">
<title>GitDock</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div id="header">
<div id="user"></div>
<div id="counts">
<div class="count" onclick="goToDetail('Issues')">
<body>
<div id="header">
<div id="user"></div>
<div id="counts">
<div class="count" onclick="goToDetail('Issues')">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path
class="icon"
fill-rule="evenodd"
d="M1,3 C1,1.89543 1.89543,1 3,1 L9,1 C9.96059,1 10.763,1.6772 10.9559,2.58023 L13.9947,4.33469 C14.9513,4.88698 15.279,6.11016 14.7267,7.06674 C13.4456,9.28574 11,13.5146 10.8452,13.7866 C10.457,14.4688 9.81319,15 9,15 L3,15 C1.89543,15 1,14.1046 1,13 L1,3 Z M3,3 L9,3 L9,13 L3,13 L3,3 Z M11,9.52164 L12.9947,6.06674 L11,4.91511 L11,9.52164 Z"
/>
</svg>
<span id="issues-count">Issues</span>
</div>
<div class="count" onclick="goToDetail('Merge requests')">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path
class="icon"
fill-rule="evenodd"
d="M10,0 L10,2.60002 C12.2108812,3.04881281 13.8920863,4.95644867 13.9950026,7.27443311 L14,7.5 L14,11.2676 C14.5978,11.6134 15,12.2597 15,13 C15,14.1046 14.1046,15 13,15 C11.8954,15 11,14.1046 11,13 C11,12.3166462 11.342703,11.713387 11.8656124,11.3526403 L12,11.2676 L12,7.5 C12,6.259091 11.246593,5.19415145 10.1722389,4.73766702 L10,4.67071 L10,7 L6,3.5 L10,0 Z M3,1 C4.10457,1 5,1.89543 5,3 C5,3.68333538 4.65729704,4.28663574 4.13438762,4.6473967 L4,4.73244 L4,11.2676 C4.5978,11.6134 5,12.2597 5,13 C5,14.1046 4.10457,15 3,15 C1.89543,15 1,14.1046 1,13 C1,12.3166462 1.34270296,11.713387 1.86561238,11.3526403 L2,11.2676 L2,4.73244 C1.4022,4.38663 1,3.74028 1,3 C1,1.89543 1.89543,1 3,1 Z"
/>
</svg>
<span id="mrs-count">MRs</span>
</div>
<div class="count" onclick="goToDetail('To-Do list')">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path
class="icon"
fill-rule="evenodd"
d="M4,4 L9,4 C9.55228,4 10,3.55228 10,3 C10,2.44772 9.55228,2 9,2 L4,2 C2.89543,2 2,2.89543 2,4 L2,12 C2,13.1046 2.89543,14 4,14 L12,14 C13.1046,14 14,13.1046 14,12 L14,10 C14,9.44771 13.5523,9 13,9 C12.4477,9 12,9.44771 12,10 L12,12 L4,12 L4,4 Z M15.2071,2.29289 C14.8166,1.90237 14.1834,1.90237 13.7929,2.29289 L8.5,7.58579 L7.70711,6.79289 C7.31658,6.40237 6.68342,6.40237 6.29289,6.79289 C5.90237,7.18342 5.90237,7.81658 6.29289,8.20711 L7.79289,9.70711 C7.98043,9.89464 8.23478,10 8.5,10 C8.76522,10 9.01957,9.89464 9.20711,9.70711 L15.2071,3.70711 C15.5976,3.31658 15.5976,2.68342 15.2071,2.29289 Z"
/>
</svg>
<span id="todos-count">To-Dos</span>
</div>
</div>
</div>
<div class="headline">
<div>My commits</div>
<div id="commits-pagination">
<span id="commits-count" class="empty"></span>
<button onclick="changeCommit(false)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path
class="icon"
fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z"
/>
</svg>
</button>
<button onclick="changeCommit(true)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path
class="icon"
fill-rule="evenodd"
d="M5.29289,3.70711 C4.90237,3.31658 4.90237,2.68342 5.29289,2.29289 C5.68342,1.90237 6.31658,1.90237 6.70711,2.29289 L11.7071,7.29289 C12.0976,7.68342 12.0976,8.31658 11.7071,8.70711 L6.70711,13.7071 C6.31658,14.0976 5.68342,14.0976 5.29289,13.7071 C4.90237,13.3166 4.90237,12.6834 5.29289,12.2929 L9.58579,8 L5.29289,3.70711 Z"
/>
</svg>
</button>
</div>
</div>
<div id="pipeline">
<div class="commit empty">
<div class="commit-information">
<div class="commit-name skeleton"></div>
<div class="commit-details skeleton"></div>
</div>
<div id="project-name"></div>
</div>
</div>
<div class="headline">
<div>Recently viewed</div>
</div>
<div id="history">
<ul class="list-container empty">
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="more-link empty">
<div class="more-link-button skeleton"></div>
</li>
</ul>
</div>
<div class="headline">
<div>Favorite projects</div>
<!--<div id="edit-favorite-projects">Edit</div>-->
</div>
<div id="projects"></div>
<div class="headline">
<div>My comments</div>
</div>
<div id="comments">
<ul class="list-container empty">
<li class="comment empty">
<div class="comment-link skeleton"></div>
<div class="comment-details skeleton"></div>
</li>
<li class="comment empty">
<div class="comment-link skeleton"></div>
<div class="comment-details skeleton"></div>
</li>
<li class="comment empty">
<div class="comment-link skeleton"></div>
<div class="comment-details skeleton"></div>
</li>
<li class="more-link empty">
<div class="more-link-button skeleton"></div>
</li>
</ul>
</div>
<div class="headline">
<div>Bookmarks</div>
</div>
<div id="bookmarks">
<ul class="list-container empty">
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="more-link empty">
<div class="more-link-button skeleton"></div>
</li>
</ul>
</div>
<div id="detail-view" class="detail-view">
<div id="detail-header" class="detail-header" onclick="goToOverview()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M1,3 C1,1.89543 1.89543,1 3,1 L9,1 C9.96059,1 10.763,1.6772 10.9559,2.58023 L13.9947,4.33469 C14.9513,4.88698 15.279,6.11016 14.7267,7.06674 C13.4456,9.28574 11,13.5146 10.8452,13.7866 C10.457,14.4688 9.81319,15 9,15 L3,15 C1.89543,15 1,14.1046 1,13 L1,3 Z M3,3 L9,3 L9,13 L3,13 L3,3 Z M11,9.52164 L12.9947,6.06674 L11,4.91511 L11,9.52164 Z" />
<path
class="icon"
fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z"
/>
</svg>
<span id="issues-count">Issues</span>
<div id="detail-header-content" class="detail-header-content empty"></div>
</div>
<div class="count" onclick="goToDetail('Merge requests')">
<div id="detail-headline" class="detail-headline headline"></div>
<div id="detail-content" class="detail-content"></div>
</div>
<div id="sub-detail-view" class="detail-view">
<div id="sub-detail-header" class="detail-header" onclick="goBackToDetail()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M10,0 L10,2.60002 C12.2108812,3.04881281 13.8920863,4.95644867 13.9950026,7.27443311 L14,7.5 L14,11.2676 C14.5978,11.6134 15,12.2597 15,13 C15,14.1046 14.1046,15 13,15 C11.8954,15 11,14.1046 11,13 C11,12.3166462 11.342703,11.713387 11.8656124,11.3526403 L12,11.2676 L12,7.5 C12,6.259091 11.246593,5.19415145 10.1722389,4.73766702 L10,4.67071 L10,7 L6,3.5 L10,0 Z M3,1 C4.10457,1 5,1.89543 5,3 C5,3.68333538 4.65729704,4.28663574 4.13438762,4.6473967 L4,4.73244 L4,11.2676 C4.5978,11.6134 5,12.2597 5,13 C5,14.1046 4.10457,15 3,15 C1.89543,15 1,14.1046 1,13 C1,12.3166462 1.34270296,11.713387 1.86561238,11.3526403 L2,11.2676 L2,4.73244 C1.4022,4.38663 1,3.74028 1,3 C1,1.89543 1.89543,1 3,1 Z" />
<path
class="icon"
fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z"
/>
</svg>
<span id="mrs-count">MRs</span>
</div>
<div class="count" onclick="goToDetail('To-Do list')">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M4,4 L9,4 C9.55228,4 10,3.55228 10,3 C10,2.44772 9.55228,2 9,2 L4,2 C2.89543,2 2,2.89543 2,4 L2,12 C2,13.1046 2.89543,14 4,14 L12,14 C13.1046,14 14,13.1046 14,12 L14,10 C14,9.44771 13.5523,9 13,9 C12.4477,9 12,9.44771 12,10 L12,12 L4,12 L4,4 Z M15.2071,2.29289 C14.8166,1.90237 14.1834,1.90237 13.7929,2.29289 L8.5,7.58579 L7.70711,6.79289 C7.31658,6.40237 6.68342,6.40237 6.29289,6.79289 C5.90237,7.18342 5.90237,7.81658 6.29289,8.20711 L7.79289,9.70711 C7.98043,9.89464 8.23478,10 8.5,10 C8.76522,10 9.01957,9.89464 9.20711,9.70711 L15.2071,3.70711 C15.5976,3.31658 15.5976,2.68342 15.2071,2.29289 Z" />
</svg>
<span id="todos-count">To-Dos</span>
<div id="sub-detail-header-content" class="detail-header-content empty"></div>
</div>
<div id="sub-detail-headline" class="detail-headline headline"></div>
<div id="sub-detail-content" class="detail-content"></div>
</div>
</div>
<div class="headline">
<div>My commits</div>
<div id="commits-pagination">
<span id="commits-count" class="empty"></span>
<button onclick="changeCommit(false)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z" />
</svg>
</button>
<button onclick="changeCommit(true)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M5.29289,3.70711 C4.90237,3.31658 4.90237,2.68342 5.29289,2.29289 C5.68342,1.90237 6.31658,1.90237 6.70711,2.29289 L11.7071,7.29289 C12.0976,7.68342 12.0976,8.31658 11.7071,8.70711 L6.70711,13.7071 C6.31658,14.0976 5.68342,14.0976 5.29289,13.7071 C4.90237,13.3166 4.90237,12.6834 5.29289,12.2929 L9.58579,8 L5.29289,3.70711 Z" />
</svg>
</button>
</div>
</div>
<div id="pipeline">
<div class="commit empty">
<div class="commit-information">
<div class="commit-name skeleton"></div>
<div class="commit-details skeleton"></div>
</div>
<div id="project-name"></div>
</div>
</div>
<div class="headline">
<div>Recently viewed</div>
</div>
<div id="history">
<ul class="list-container empty">
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="more-link empty">
<div class="more-link-button skeleton"></div>
</li>
</ul>
</div>
<div class="headline">
<div>Favorite projects</div>
<!--<div id="edit-favorite-projects">Edit</div>-->
</div>
<div id="projects"></div>
<div class="headline">
<div>My comments</div>
</div>
<div id="comments">
<ul class="list-container empty">
<li class="comment empty">
<div class="comment-link skeleton"></div>
<div class="comment-details skeleton"></div>
</li>
<li class="comment empty">
<div class="comment-link skeleton"></div>
<div class="comment-details skeleton"></div>
</li>
<li class="comment empty">
<div class="comment-link skeleton"></div>
<div class="comment-details skeleton"></div>
</li>
<li class="more-link empty">
<div class="more-link-button skeleton"></div>
</li>
</ul>
</div>
<div class="headline">
<div>Bookmarks</div>
</div>
<div id="bookmarks">
<ul class="list-container empty">
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="history-entry empty">
<div class="history-link skeleton"></div>
<div class="history-details skeleton"></div>
</li>
<li class="more-link empty">
<div class="more-link-button skeleton"></div>
</li>
</ul>
</div>
<div id="detail-view" class="detail-view">
<div id="detail-header" class="detail-header" onclick="goToOverview()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z" />
</svg>
<div id="detail-header-content" class="detail-header-content empty"></div>
</div>
<div id="detail-headline" class="detail-headline headline"></div>
<div id="detail-content" class="detail-content"></div>
</div>
<div id="sub-detail-view" class="detail-view">
<div id="sub-detail-header" class="detail-header" onclick="goBackToDetail()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z" />
</svg>
<div id="sub-detail-header-content" class="detail-header-content empty"></div>
</div>
<div id="sub-detail-headline" class="detail-headline headline"></div>
<div id="sub-detail-content" class="detail-content"></div>
</div>
<script src="./renderer.js"></script>
</body>
</html>
<script src="./renderer.js"></script>
</body>
</html>

View File

@ -21,5 +21,5 @@ module.exports = {
default:
return '';
}
}
},
};

View File

@ -1,27 +1,27 @@
const ElectronStore = require('electron-store')
const uuid = require('uuid/v4')
const ElectronStore = require('electron-store');
const uuid = require('uuid/v4');
const defaults = {
host: 'https://gitlab.com',
plan: 'free',
analytics: false,
analytics_id: uuid()
}
analytics_id: uuid(),
};
const store = new ElectronStore()
const store = new ElectronStore();
const proxy = new Proxy(store, {
get(target, key) {
return target.get(key) || defaults[key];
},
set(target, key, value) {
target.set(key, value)
target.set(key, value);
},
})
});
proxy.analytics_id = proxy.analytics_id || defaults.analytics_id
proxy.analytics_id = proxy.analytics_id || defaults.analytics_id;
module.exports = {
store: proxy,
deleteFromStore: (key) => store.delete(key),
}
};

View File

@ -1,185 +1,248 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<head>
<meta charset="UTF-8" />
<title>GitDock</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
</head>
<link rel="stylesheet" href="style.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<body>
<div id="login-page-wrapper">
<div id="login-page">
<div id="hero-wrapper">
<svg viewBox="0 0 430 267" xmlns="http://www.w3.org/2000/svg">
<title>
operations-metrics_empty
</title>
<g fill="none" fill-rule="evenodd">
<path
d="M346.539 251.829a2 2 0 0 1-3.987.33 130.604 130.604 0 0 0-.886-7.834 2 2 0 1 1 3.96-.57c.384 2.675.689 5.367.913 8.074z"
fill="#C3B8E3" />
<path
d="M342.34 227.845a2 2 0 1 1-3.861 1.046 128.974 128.974 0 0 0-2.294-7.54 2 2 0 0 1 3.79-1.281 132.973 132.973 0 0 1 2.364 7.775z"
fill="#EFEDF8" />
<path
d="M333.85 205.033a2 2 0 1 1-3.606 1.732 129.49 129.49 0 0 0-3.624-6.99 2 2 0 0 1 3.494-1.949 133.49 133.49 0 0 1 3.736 7.207z"
fill="#E1DBF1" />
<path
d="M321.334 184.115a2 2 0 1 1-3.231 2.357 130.498 130.498 0 0 0-4.835-6.224 2 2 0 1 1 3.083-2.548 134.498 134.498 0 0 1 4.983 6.415z"
fill="#EFEDF8" />
<path
d="M305.3 165.855a2 2 0 1 1-2.756 2.9 130.802 130.802 0 0 0-5.874-5.255 2 2 0 0 1 2.576-3.06 134.801 134.801 0 0 1 6.054 5.415z"
fill="#E1DBF1" />
<path
d="M127.147 160.108a2 2 0 0 1 2.565 3.07 130.728 130.728 0 0 0-5.894 5.233 2 2 0 1 1-2.745-2.91 134.728 134.728 0 0 1 6.074-5.393z"
fill="#C3B8E3" />
<path
d="M109.98 177.303a2 2 0 0 1 3.075 2.56 130.648 130.648 0 0 0-4.858 6.206 2 2 0 0 1-3.223-2.37 134.648 134.648 0 0 1 5.007-6.396z"
fill="#E1DBF1" />
<path
d="M96.147 197.37a2 2 0 1 1 3.486 1.962 129.715 129.715 0 0 0-3.655 6.982 2 2 0 0 1-3.599-1.747 133.715 133.715 0 0 1 3.768-7.197z"
fill="#EFEDF8" />
<path
d="M86.174 219.631a2 2 0 1 1 3.784 1.295 128.962 128.962 0 0 0-2.32 7.527 2 2 0 1 1-3.857-1.06c.72-2.614 1.517-5.202 2.393-7.762z"
fill="#E1DBF1" />
<path
d="M80.45 243.199a2 2 0 0 1 3.957.586c-.384 2.593-.69 5.203-.918 7.826a2 2 0 0 1-3.985-.346c.234-2.703.55-5.393.946-8.066z"
fill="#C3B8E3" />
<path
d="M401.715 251.904a2 2 0 1 1-3.994.222c-.146-2.639-.35-5.27-.61-7.893a2 2 0 1 1 3.98-.395c.266 2.68.474 5.369.624 8.066z"
fill="#EFEDF8" />
<path
d="M398.795 227.82a2 2 0 1 1-3.931.74 181.586 181.586 0 0 0-1.631-7.74 2 2 0 0 1 3.895-.91c.613 2.622 1.168 5.26 1.667 7.91z"
fill="#C3B8E3" />
<path
d="M392.77 204.344a2 2 0 1 1-3.802 1.246 181.847 181.847 0 0 0-2.626-7.462 2 2 0 0 1 3.744-1.41c.95 2.522 1.844 5.065 2.683 7.626z"
fill="#EFEDF8" />
<path
d="M383.718 181.81a2 2 0 1 1-3.606 1.73 182.837 182.837 0 0 0-3.576-7.06 2 2 0 0 1 3.529-1.884 186.837 186.837 0 0 1 3.653 7.214z"
fill="#E1DBF1" />
<path
d="M371.86 160.705a2 2 0 1 1-3.353 2.18 183.785 183.785 0 0 0-4.455-6.538 2 2 0 1 1 3.256-2.323 187.784 187.784 0 0 1 4.552 6.681z"
fill="#EFEDF8" />
<path
d="M357.351 141.265a2 2 0 1 1-3.044 2.595 184.16 184.16 0 0 0-5.26-5.91 2 2 0 0 1 2.931-2.723 188.16 188.16 0 0 1 5.373 6.038z"
fill="#E1DBF1" />
<path
d="M340.444 123.84a2 2 0 1 1-2.685 2.964 183.772 183.772 0 0 0-5.979-5.184 2 2 0 1 1 2.555-3.078 187.77 187.77 0 0 1 6.11 5.297z"
fill="#C3B8E3" />
<path
d="M321.434 108.742a2 2 0 0 1-2.28 3.287 182.814 182.814 0 0 0-6.6-4.369 2 2 0 1 1 2.135-3.383c2.28 1.44 4.529 2.928 6.745 4.465z"
fill="#E1DBF1" />
<path
d="M300.633 96.238a2 2 0 0 1-1.833 3.555 181.829 181.829 0 0 0-7.11-3.473 2 2 0 1 1 1.677-3.631 185.83 185.83 0 0 1 7.266 3.549z"
fill="#EFEDF8" />
<path
d="M136.597 92.72a2 2 0 0 1 1.68 3.63 182.722 182.722 0 0 0-7.11 3.48 2 2 0 1 1-1.835-3.554 186.722 186.722 0 0 1 7.265-3.556z"
fill="#C3B8E3" />
<path
d="M115.32 104.296a2 2 0 1 1 2.134 3.383 183.706 183.706 0 0 0-6.602 4.369 2 2 0 0 1-2.28-3.288 187.706 187.706 0 0 1 6.747-4.464z"
fill="#EFEDF8" />
<path
d="M95.68 118.544a2 2 0 1 1 2.553 3.08 184.157 184.157 0 0 0-5.981 5.18 2 2 0 0 1-2.683-2.967c1.999-1.808 4.036-3.573 6.111-5.293z"
fill="#E1DBF1" />
<path
d="M78.04 135.2a2 2 0 0 1 2.929 2.725c-1.797 1.93-3.552 3.9-5.264 5.905a2 2 0 0 1-3.042-2.597c1.749-2.05 3.542-4.06 5.378-6.033z"
fill="#EFEDF8" />
<path
d="M62.681 154.008a2 2 0 1 1 3.256 2.324 182.928 182.928 0 0 0-4.457 6.538 2 2 0 0 1-3.353-2.182c1.47-2.26 2.988-4.487 4.554-6.68z"
fill="#E1DBF1" />
<path
d="M49.895 174.632a2 2 0 0 1 3.53 1.882 181.912 181.912 0 0 0-3.57 7.062 2 2 0 1 1-3.609-1.727 185.912 185.912 0 0 1 3.649-7.217z"
fill="#C3B8E3" />
<path
d="M39.934 196.656a2 2 0 1 1 3.744 1.408 181.556 181.556 0 0 0-2.622 7.465 2 2 0 1 1-3.802-1.243 185.556 185.556 0 0 1 2.68-7.63z"
fill="#E1DBF1" />
<path
d="M32.898 219.88a2 2 0 0 1 3.896.907 182.728 182.728 0 0 0-1.628 7.744 2 2 0 1 1-3.932-.738 186.728 186.728 0 0 1 1.664-7.913z"
fill="#EFEDF8" />
<path
d="M28.936 243.814a2 2 0 0 1 3.98.398 186.235 186.235 0 0 0-.594 7.46l-.025.44a2 2 0 1 1-3.994-.228l.027-.45c.151-2.55.353-5.09.606-7.62z"
fill="#E1DBF1" />
<path
d="M183.395 149.34l-22.82 3.938a5.6 5.6 0 0 1-6.349-7.015L164.843 108a5.6 5.6 0 0 1 3.97-3.918l3.44-.907a148.5 148.5 0 0 0-.175 4.183l-2.246.592a1.6 1.6 0 0 0-1.135 1.12l-10.616 38.262a1.6 1.6 0 0 0 1.814 2.005l20.588-3.554a42.931 42.931 0 0 0 2.912 3.556zm63.196-.007a42.81 42.81 0 0 0 2.905-3.558l20.632 3.562a1.6 1.6 0 0 0 1.814-2.005l-10.617-38.263a1.6 1.6 0 0 0-1.134-1.12l-2.238-.589a157.73 157.73 0 0 0-.146-4.175l3.403.897a5.6 5.6 0 0 1 3.97 3.918l10.616 38.263a5.6 5.6 0 0 1-6.349 7.015l-22.856-3.945z"
fill="#EEE" fill-rule="nonzero" />
<path
d="M174.068 107.765a2 2 0 0 1-4-.102c.07-2.722.212-5.42.426-8.093a2 2 0 0 1 3.987.318 145.785 145.785 0 0 0-.413 7.877zm1.395-16.71a2 2 0 0 1-3.96-.566c.386-2.697.845-5.362 1.376-7.995a2 2 0 0 1 3.921.79c-.515 2.559-.962 5.15-1.337 7.771zm3.373-16.415a2 2 0 0 1-3.861-1.044 137.195 137.195 0 0 1 2.349-7.772 2 2 0 1 1 3.793 1.27 133.195 133.195 0 0 0-2.281 7.546zm5.378-15.845a2 2 0 1 1-3.697-1.526 129.122 129.122 0 0 1 3.335-7.411 2 2 0 0 1 3.594 1.756 125.122 125.122 0 0 0-3.232 7.181zm59.458-7.243a2 2 0 1 1 3.644-1.649c1.1 2.433 2.142 4.935 3.12 7.5a2 2 0 1 1-3.739 1.424 129.454 129.454 0 0 0-3.025-7.275zm5.911 15.676a2 2 0 1 1 3.823-1.176c.788 2.562 1.511 5.17 2.166 7.82a2 2 0 0 1-3.884.958 140.379 140.379 0 0 0-2.105-7.602zm3.97 16.299a2 2 0 0 1 3.935-.718c.482 2.639.896 5.31 1.241 8.011a2 2 0 1 1-3.967.507 147.83 147.83 0 0 0-1.209-7.8zm2.077 16.675a2 2 0 1 1 3.99-.272 159.08 159.08 0 0 1 .346 8.107 2 2 0 1 1-3.999.072l-.007-.37c-.05-2.533-.16-5.045-.33-7.537zm.294 16.811a2 2 0 0 1 3.998.119c-.07 2.366-.187 4.644-.35 6.822-.035.452-.074.886-.119 1.318a2 2 0 1 1-3.978-.415c.04-.394.076-.79.105-1.174.162-2.146.276-4.363.344-6.67zm-2.232 16.24a2 2 0 0 1 3.803 1.24 44.429 44.429 0 0 1-3.337 7.684 2 2 0 1 1-3.503-1.932 40.43 40.43 0 0 0 3.037-6.992zm-7.936 14.01a2 2 0 0 1 3.021 2.62 44.893 44.893 0 0 1-6.054 5.786 2 2 0 0 1-2.482-3.137 40.893 40.893 0 0 0 5.515-5.27zm-12.82 9.881a2 2 0 1 1 1.764 3.59 44.452 44.452 0 0 1-7.832 2.97 2 2 0 1 1-1.06-3.856 40.452 40.452 0 0 0 7.128-2.704zm-15.526 4.084a2 2 0 0 1 .232 3.993 45.228 45.228 0 0 1-8.368-.289 2 2 0 1 1 .51-3.967 41.161 41.161 0 0 0 7.626.263zm-15.97-2.246a2 2 0 0 1-1.33 3.772 44.64 44.64 0 0 1-7.601-3.516 2 2 0 1 1 2.012-3.457 40.64 40.64 0 0 0 6.92 3.201zm-13.842-8.272a2 2 0 0 1-2.689 2.961 44.98 44.98 0 0 1-5.648-6.18 2 2 0 1 1 3.191-2.412 40.98 40.98 0 0 0 5.146 5.63zm-9.606-13.06a2 2 0 0 1-3.63 1.682 44.515 44.515 0 0 1-2.79-7.897 2 2 0 1 1 3.88-.973 40.515 40.515 0 0 0 2.54 7.188zm-3.75-15.626a2 2 0 0 1-3.993.224 163.12 163.12 0 0 1-.245-8.096 2 2 0 0 1 4-.026c.018 2.752.097 5.384.238 7.898z"
fill="#EEE" fill-rule="nonzero" />
<g transform="translate(200.523 142.14)">
<ellipse fill="#FEE1D3" cx="3" cy="2.987" rx="3" ry="2.987" />
<ellipse fill="#FDC4A8" cx="15" cy="2.987" rx="3" ry="2.987" />
<ellipse fill="#FC6D26" cx="27" cy="2.987" rx="3" ry="2.987" />
</g>
<path
d="M215.5 48.516c9.331 0 18.165-1.56 25.306-4.354C232.536 28.315 221.782 17 217.003 17c-2.033 0-6.24 2.667-10.884 7.336-5.097 5.125-10.257 12.091-14.8 20.25 6.944 2.53 15.342 3.93 24.181 3.93zm-28.789-3.83C196.401 26.471 209.798 13 217.003 13c7.033 0 19.342 13.176 28.356 31.286a2 2 0 0 1-.98 2.72c-7.983 3.539-18.14 5.51-28.879 5.51-10.248 0-19.972-1.795-27.79-5.044a2 2 0 0 1-.999-2.786z"
fill="#EEE" fill-rule="nonzero" />
<path
d="M216 104.578c8.84 0 16-7.127 16-15.91 0-8.783-7.16-15.91-16-15.91s-16 7.127-16 15.91c0 8.783 7.16 15.91 16 15.91zm0 4c-11.046 0-20-8.914-20-19.91s8.954-19.91 20-19.91 20 8.914 20 19.91-8.954 19.91-20 19.91z"
fill="#E1DBF1" fill-rule="nonzero" />
<path
d="M216 94.623c3.318 0 6-2.67 6-5.955s-2.682-5.955-6-5.955-6 2.67-6 5.955 2.682 5.955 6 5.955zm0 4c-5.523 0-10-4.457-10-9.955s4.477-9.955 10-9.955 10 4.457 10 9.955-4.477 9.955-10 9.955z"
fill="#6B4FBB" fill-rule="nonzero" />
<g fill-rule="nonzero">
<path d="M392 115a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 4a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"
fill="#6B4FBB" />
<path d="M39 126a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 4a7 7 0 1 1 0-14 7 7 0 0 1 0 14z"
fill="#E1DBF1" />
<path d="M86 53a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 4a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"
fill="#C3B8E3" />
<path d="M345 35a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 4a7 7 0 1 1 0-14 7 7 0 0 1 0 14z"
fill="#E1DBF1" />
</g>
<path
d="M207 170.306a2 2 0 0 1 4 0c0 4.696-.418 14.073-.942 16.637a2 2 0 0 1-2.345 1.562 14.08 14.08 0 0 0-2.713-.263 14.006 14.006 0 0 0-13.589 10.617 2 2 0 0 1-2.538 1.427 22.99 22.99 0 0 0-6.873-1.044c-12.703 0-23 10.298-23 23a2 2 0 0 1-2 2c-12.703 0-23 10.298-23 23 0 1.56.155 3.1.46 4.602a2 2 0 1 1-3.92.796 27.115 27.115 0 0 1-.54-5.398c0-14.262 11.058-25.941 25.068-26.932.99-14.01 12.67-25.068 26.932-25.068 2.085 0 4.139.237 6.133.7a18.01 18.01 0 0 1 18.247-11.648c.346-3.576.62-10.39.62-13.988zm92 76.936c0 1.828-.182 3.634-.54 5.398a2 2 0 1 1-3.92-.796c.305-1.502.46-3.042.46-4.602 0-12.702-10.297-23-23-23a2 2 0 0 1-2-2c0-12.702-10.297-23-23-23a22.91 22.91 0 0 0-9.426 2.013 2 2 0 0 1-2.79-1.475c-1.175-6.632-6.968-11.538-13.784-11.538-.313 0-.624.01-.933.03a2 2 0 0 1-2.089-1.585c-.544-2.598-.978-12-.978-16.687a2 2 0 0 1 4 0c0 3.672.298 10.734.668 14.254 7.652.281 14.192 5.366 16.473 12.476a26.965 26.965 0 0 1 8.859-1.488c14.262 0 25.941 11.058 26.932 25.068 14.01.99 25.068 12.67 25.068 26.932zm-65.085 1.454a2 2 0 1 1-3.863 1.036c-1.93-7.202-9.333-11.476-16.534-9.546a2 2 0 1 1-1.036-3.864c9.336-2.501 18.932 3.039 21.433 12.374zm17.625-21.703a2 2 0 0 1-3.073 2.56 13.5 13.5 0 0 0-13.875-4.404 2 2 0 0 1-1.035-3.863 17.5 17.5 0 0 1 17.983 5.707zm-78.214 6.962c2.502-9.336 12.098-14.876 21.433-12.375a2 2 0 0 1-1.035 3.864c-7.202-1.93-14.604 2.344-16.534 9.546a2 2 0 0 1-3.864-1.035z"
fill="#EEE" fill-rule="nonzero" />
</g>
</svg>
</div>
<p class="lead">GitDock - All your GitLab work in one place.</p>
<p class="description">Get an overview over all your activities across the projects you care about, and receive notifications for any running pipelines.</p>
<div id="login-gitlab">
<button onclick="startLogin()" id="login-gitlab-button">Log in with GitLab.com</button>
</div>
<div id="login-instance">
<div id="instance-checkbox-wrapper">
<input type="checkbox" id="instance-checkbox" name="instance-checkbox" />
<label for="instance-checkbox">I am using a self-managed GitLab instance.</label>
<div id="instance-details">
<form action="#" onsubmit="return false">
<div id="access-token" class="instance-details-input">
<label for="access-token-input">Access Token ('read_api' scope)</label>
<input id="access-token-input" name="access-token-input"
placeholder="z.B. 9El5deyVsJeRny49V0sx">
</div>
<div id="instance-url" class="instance-details-input">
<label for="instance-url-input">Self-managed instance URL</label>
<input id="instance-url-input" name="instance-url-input"
placeholder="z.B. https://gitlab.mydomain.com">
</div>
<button type="submit" id="login-instance-button"
onclick="startManualLogin(document.getElementById('access-token-input').value, document.getElementById('instance-url-input').value)">Log
in with access token</button>
</form>
</div>
</div>
</div>
<div id="login-page">
<div id="hero-wrapper">
<svg viewBox="0 0 430 267" xmlns="http://www.w3.org/2000/svg">
<title>operations-metrics_empty</title>
<g fill="none" fill-rule="evenodd">
<path
d="M346.539 251.829a2 2 0 0 1-3.987.33 130.604 130.604 0 0 0-.886-7.834 2 2 0 1 1 3.96-.57c.384 2.675.689 5.367.913 8.074z"
fill="#C3B8E3"
/>
<path
d="M342.34 227.845a2 2 0 1 1-3.861 1.046 128.974 128.974 0 0 0-2.294-7.54 2 2 0 0 1 3.79-1.281 132.973 132.973 0 0 1 2.364 7.775z"
fill="#EFEDF8"
/>
<path
d="M333.85 205.033a2 2 0 1 1-3.606 1.732 129.49 129.49 0 0 0-3.624-6.99 2 2 0 0 1 3.494-1.949 133.49 133.49 0 0 1 3.736 7.207z"
fill="#E1DBF1"
/>
<path
d="M321.334 184.115a2 2 0 1 1-3.231 2.357 130.498 130.498 0 0 0-4.835-6.224 2 2 0 1 1 3.083-2.548 134.498 134.498 0 0 1 4.983 6.415z"
fill="#EFEDF8"
/>
<path
d="M305.3 165.855a2 2 0 1 1-2.756 2.9 130.802 130.802 0 0 0-5.874-5.255 2 2 0 0 1 2.576-3.06 134.801 134.801 0 0 1 6.054 5.415z"
fill="#E1DBF1"
/>
<path
d="M127.147 160.108a2 2 0 0 1 2.565 3.07 130.728 130.728 0 0 0-5.894 5.233 2 2 0 1 1-2.745-2.91 134.728 134.728 0 0 1 6.074-5.393z"
fill="#C3B8E3"
/>
<path
d="M109.98 177.303a2 2 0 0 1 3.075 2.56 130.648 130.648 0 0 0-4.858 6.206 2 2 0 0 1-3.223-2.37 134.648 134.648 0 0 1 5.007-6.396z"
fill="#E1DBF1"
/>
<path
d="M96.147 197.37a2 2 0 1 1 3.486 1.962 129.715 129.715 0 0 0-3.655 6.982 2 2 0 0 1-3.599-1.747 133.715 133.715 0 0 1 3.768-7.197z"
fill="#EFEDF8"
/>
<path
d="M86.174 219.631a2 2 0 1 1 3.784 1.295 128.962 128.962 0 0 0-2.32 7.527 2 2 0 1 1-3.857-1.06c.72-2.614 1.517-5.202 2.393-7.762z"
fill="#E1DBF1"
/>
<path
d="M80.45 243.199a2 2 0 0 1 3.957.586c-.384 2.593-.69 5.203-.918 7.826a2 2 0 0 1-3.985-.346c.234-2.703.55-5.393.946-8.066z"
fill="#C3B8E3"
/>
<path
d="M401.715 251.904a2 2 0 1 1-3.994.222c-.146-2.639-.35-5.27-.61-7.893a2 2 0 1 1 3.98-.395c.266 2.68.474 5.369.624 8.066z"
fill="#EFEDF8"
/>
<path
d="M398.795 227.82a2 2 0 1 1-3.931.74 181.586 181.586 0 0 0-1.631-7.74 2 2 0 0 1 3.895-.91c.613 2.622 1.168 5.26 1.667 7.91z"
fill="#C3B8E3"
/>
<path
d="M392.77 204.344a2 2 0 1 1-3.802 1.246 181.847 181.847 0 0 0-2.626-7.462 2 2 0 0 1 3.744-1.41c.95 2.522 1.844 5.065 2.683 7.626z"
fill="#EFEDF8"
/>
<path
d="M383.718 181.81a2 2 0 1 1-3.606 1.73 182.837 182.837 0 0 0-3.576-7.06 2 2 0 0 1 3.529-1.884 186.837 186.837 0 0 1 3.653 7.214z"
fill="#E1DBF1"
/>
<path
d="M371.86 160.705a2 2 0 1 1-3.353 2.18 183.785 183.785 0 0 0-4.455-6.538 2 2 0 1 1 3.256-2.323 187.784 187.784 0 0 1 4.552 6.681z"
fill="#EFEDF8"
/>
<path
d="M357.351 141.265a2 2 0 1 1-3.044 2.595 184.16 184.16 0 0 0-5.26-5.91 2 2 0 0 1 2.931-2.723 188.16 188.16 0 0 1 5.373 6.038z"
fill="#E1DBF1"
/>
<path
d="M340.444 123.84a2 2 0 1 1-2.685 2.964 183.772 183.772 0 0 0-5.979-5.184 2 2 0 1 1 2.555-3.078 187.77 187.77 0 0 1 6.11 5.297z"
fill="#C3B8E3"
/>
<path
d="M321.434 108.742a2 2 0 0 1-2.28 3.287 182.814 182.814 0 0 0-6.6-4.369 2 2 0 1 1 2.135-3.383c2.28 1.44 4.529 2.928 6.745 4.465z"
fill="#E1DBF1"
/>
<path
d="M300.633 96.238a2 2 0 0 1-1.833 3.555 181.829 181.829 0 0 0-7.11-3.473 2 2 0 1 1 1.677-3.631 185.83 185.83 0 0 1 7.266 3.549z"
fill="#EFEDF8"
/>
<path
d="M136.597 92.72a2 2 0 0 1 1.68 3.63 182.722 182.722 0 0 0-7.11 3.48 2 2 0 1 1-1.835-3.554 186.722 186.722 0 0 1 7.265-3.556z"
fill="#C3B8E3"
/>
<path
d="M115.32 104.296a2 2 0 1 1 2.134 3.383 183.706 183.706 0 0 0-6.602 4.369 2 2 0 0 1-2.28-3.288 187.706 187.706 0 0 1 6.747-4.464z"
fill="#EFEDF8"
/>
<path
d="M95.68 118.544a2 2 0 1 1 2.553 3.08 184.157 184.157 0 0 0-5.981 5.18 2 2 0 0 1-2.683-2.967c1.999-1.808 4.036-3.573 6.111-5.293z"
fill="#E1DBF1"
/>
<path
d="M78.04 135.2a2 2 0 0 1 2.929 2.725c-1.797 1.93-3.552 3.9-5.264 5.905a2 2 0 0 1-3.042-2.597c1.749-2.05 3.542-4.06 5.378-6.033z"
fill="#EFEDF8"
/>
<path
d="M62.681 154.008a2 2 0 1 1 3.256 2.324 182.928 182.928 0 0 0-4.457 6.538 2 2 0 0 1-3.353-2.182c1.47-2.26 2.988-4.487 4.554-6.68z"
fill="#E1DBF1"
/>
<path
d="M49.895 174.632a2 2 0 0 1 3.53 1.882 181.912 181.912 0 0 0-3.57 7.062 2 2 0 1 1-3.609-1.727 185.912 185.912 0 0 1 3.649-7.217z"
fill="#C3B8E3"
/>
<path
d="M39.934 196.656a2 2 0 1 1 3.744 1.408 181.556 181.556 0 0 0-2.622 7.465 2 2 0 1 1-3.802-1.243 185.556 185.556 0 0 1 2.68-7.63z"
fill="#E1DBF1"
/>
<path
d="M32.898 219.88a2 2 0 0 1 3.896.907 182.728 182.728 0 0 0-1.628 7.744 2 2 0 1 1-3.932-.738 186.728 186.728 0 0 1 1.664-7.913z"
fill="#EFEDF8"
/>
<path
d="M28.936 243.814a2 2 0 0 1 3.98.398 186.235 186.235 0 0 0-.594 7.46l-.025.44a2 2 0 1 1-3.994-.228l.027-.45c.151-2.55.353-5.09.606-7.62z"
fill="#E1DBF1"
/>
<path
d="M183.395 149.34l-22.82 3.938a5.6 5.6 0 0 1-6.349-7.015L164.843 108a5.6 5.6 0 0 1 3.97-3.918l3.44-.907a148.5 148.5 0 0 0-.175 4.183l-2.246.592a1.6 1.6 0 0 0-1.135 1.12l-10.616 38.262a1.6 1.6 0 0 0 1.814 2.005l20.588-3.554a42.931 42.931 0 0 0 2.912 3.556zm63.196-.007a42.81 42.81 0 0 0 2.905-3.558l20.632 3.562a1.6 1.6 0 0 0 1.814-2.005l-10.617-38.263a1.6 1.6 0 0 0-1.134-1.12l-2.238-.589a157.73 157.73 0 0 0-.146-4.175l3.403.897a5.6 5.6 0 0 1 3.97 3.918l10.616 38.263a5.6 5.6 0 0 1-6.349 7.015l-22.856-3.945z"
fill="#EEE"
fill-rule="nonzero"
/>
<path
d="M174.068 107.765a2 2 0 0 1-4-.102c.07-2.722.212-5.42.426-8.093a2 2 0 0 1 3.987.318 145.785 145.785 0 0 0-.413 7.877zm1.395-16.71a2 2 0 0 1-3.96-.566c.386-2.697.845-5.362 1.376-7.995a2 2 0 0 1 3.921.79c-.515 2.559-.962 5.15-1.337 7.771zm3.373-16.415a2 2 0 0 1-3.861-1.044 137.195 137.195 0 0 1 2.349-7.772 2 2 0 1 1 3.793 1.27 133.195 133.195 0 0 0-2.281 7.546zm5.378-15.845a2 2 0 1 1-3.697-1.526 129.122 129.122 0 0 1 3.335-7.411 2 2 0 0 1 3.594 1.756 125.122 125.122 0 0 0-3.232 7.181zm59.458-7.243a2 2 0 1 1 3.644-1.649c1.1 2.433 2.142 4.935 3.12 7.5a2 2 0 1 1-3.739 1.424 129.454 129.454 0 0 0-3.025-7.275zm5.911 15.676a2 2 0 1 1 3.823-1.176c.788 2.562 1.511 5.17 2.166 7.82a2 2 0 0 1-3.884.958 140.379 140.379 0 0 0-2.105-7.602zm3.97 16.299a2 2 0 0 1 3.935-.718c.482 2.639.896 5.31 1.241 8.011a2 2 0 1 1-3.967.507 147.83 147.83 0 0 0-1.209-7.8zm2.077 16.675a2 2 0 1 1 3.99-.272 159.08 159.08 0 0 1 .346 8.107 2 2 0 1 1-3.999.072l-.007-.37c-.05-2.533-.16-5.045-.33-7.537zm.294 16.811a2 2 0 0 1 3.998.119c-.07 2.366-.187 4.644-.35 6.822-.035.452-.074.886-.119 1.318a2 2 0 1 1-3.978-.415c.04-.394.076-.79.105-1.174.162-2.146.276-4.363.344-6.67zm-2.232 16.24a2 2 0 0 1 3.803 1.24 44.429 44.429 0 0 1-3.337 7.684 2 2 0 1 1-3.503-1.932 40.43 40.43 0 0 0 3.037-6.992zm-7.936 14.01a2 2 0 0 1 3.021 2.62 44.893 44.893 0 0 1-6.054 5.786 2 2 0 0 1-2.482-3.137 40.893 40.893 0 0 0 5.515-5.27zm-12.82 9.881a2 2 0 1 1 1.764 3.59 44.452 44.452 0 0 1-7.832 2.97 2 2 0 1 1-1.06-3.856 40.452 40.452 0 0 0 7.128-2.704zm-15.526 4.084a2 2 0 0 1 .232 3.993 45.228 45.228 0 0 1-8.368-.289 2 2 0 1 1 .51-3.967 41.161 41.161 0 0 0 7.626.263zm-15.97-2.246a2 2 0 0 1-1.33 3.772 44.64 44.64 0 0 1-7.601-3.516 2 2 0 1 1 2.012-3.457 40.64 40.64 0 0 0 6.92 3.201zm-13.842-8.272a2 2 0 0 1-2.689 2.961 44.98 44.98 0 0 1-5.648-6.18 2 2 0 1 1 3.191-2.412 40.98 40.98 0 0 0 5.146 5.63zm-9.606-13.06a2 2 0 0 1-3.63 1.682 44.515 44.515 0 0 1-2.79-7.897 2 2 0 1 1 3.88-.973 40.515 40.515 0 0 0 2.54 7.188zm-3.75-15.626a2 2 0 0 1-3.993.224 163.12 163.12 0 0 1-.245-8.096 2 2 0 0 1 4-.026c.018 2.752.097 5.384.238 7.898z"
fill="#EEE"
fill-rule="nonzero"
/>
<g transform="translate(200.523 142.14)">
<ellipse fill="#FEE1D3" cx="3" cy="2.987" rx="3" ry="2.987" />
<ellipse fill="#FDC4A8" cx="15" cy="2.987" rx="3" ry="2.987" />
<ellipse fill="#FC6D26" cx="27" cy="2.987" rx="3" ry="2.987" />
</g>
<path
d="M215.5 48.516c9.331 0 18.165-1.56 25.306-4.354C232.536 28.315 221.782 17 217.003 17c-2.033 0-6.24 2.667-10.884 7.336-5.097 5.125-10.257 12.091-14.8 20.25 6.944 2.53 15.342 3.93 24.181 3.93zm-28.789-3.83C196.401 26.471 209.798 13 217.003 13c7.033 0 19.342 13.176 28.356 31.286a2 2 0 0 1-.98 2.72c-7.983 3.539-18.14 5.51-28.879 5.51-10.248 0-19.972-1.795-27.79-5.044a2 2 0 0 1-.999-2.786z"
fill="#EEE"
fill-rule="nonzero"
/>
<path
d="M216 104.578c8.84 0 16-7.127 16-15.91 0-8.783-7.16-15.91-16-15.91s-16 7.127-16 15.91c0 8.783 7.16 15.91 16 15.91zm0 4c-11.046 0-20-8.914-20-19.91s8.954-19.91 20-19.91 20 8.914 20 19.91-8.954 19.91-20 19.91z"
fill="#E1DBF1"
fill-rule="nonzero"
/>
<path
d="M216 94.623c3.318 0 6-2.67 6-5.955s-2.682-5.955-6-5.955-6 2.67-6 5.955 2.682 5.955 6 5.955zm0 4c-5.523 0-10-4.457-10-9.955s4.477-9.955 10-9.955 10 4.457 10 9.955-4.477 9.955-10 9.955z"
fill="#6B4FBB"
fill-rule="nonzero"
/>
<g fill-rule="nonzero">
<path
d="M392 115a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 4a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"
fill="#6B4FBB"
/>
<path
d="M39 126a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 4a7 7 0 1 1 0-14 7 7 0 0 1 0 14z"
fill="#E1DBF1"
/>
<path
d="M86 53a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 4a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"
fill="#C3B8E3"
/>
<path
d="M345 35a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 4a7 7 0 1 1 0-14 7 7 0 0 1 0 14z"
fill="#E1DBF1"
/>
</g>
<path
d="M207 170.306a2 2 0 0 1 4 0c0 4.696-.418 14.073-.942 16.637a2 2 0 0 1-2.345 1.562 14.08 14.08 0 0 0-2.713-.263 14.006 14.006 0 0 0-13.589 10.617 2 2 0 0 1-2.538 1.427 22.99 22.99 0 0 0-6.873-1.044c-12.703 0-23 10.298-23 23a2 2 0 0 1-2 2c-12.703 0-23 10.298-23 23 0 1.56.155 3.1.46 4.602a2 2 0 1 1-3.92.796 27.115 27.115 0 0 1-.54-5.398c0-14.262 11.058-25.941 25.068-26.932.99-14.01 12.67-25.068 26.932-25.068 2.085 0 4.139.237 6.133.7a18.01 18.01 0 0 1 18.247-11.648c.346-3.576.62-10.39.62-13.988zm92 76.936c0 1.828-.182 3.634-.54 5.398a2 2 0 1 1-3.92-.796c.305-1.502.46-3.042.46-4.602 0-12.702-10.297-23-23-23a2 2 0 0 1-2-2c0-12.702-10.297-23-23-23a22.91 22.91 0 0 0-9.426 2.013 2 2 0 0 1-2.79-1.475c-1.175-6.632-6.968-11.538-13.784-11.538-.313 0-.624.01-.933.03a2 2 0 0 1-2.089-1.585c-.544-2.598-.978-12-.978-16.687a2 2 0 0 1 4 0c0 3.672.298 10.734.668 14.254 7.652.281 14.192 5.366 16.473 12.476a26.965 26.965 0 0 1 8.859-1.488c14.262 0 25.941 11.058 26.932 25.068 14.01.99 25.068 12.67 25.068 26.932zm-65.085 1.454a2 2 0 1 1-3.863 1.036c-1.93-7.202-9.333-11.476-16.534-9.546a2 2 0 1 1-1.036-3.864c9.336-2.501 18.932 3.039 21.433 12.374zm17.625-21.703a2 2 0 0 1-3.073 2.56 13.5 13.5 0 0 0-13.875-4.404 2 2 0 0 1-1.035-3.863 17.5 17.5 0 0 1 17.983 5.707zm-78.214 6.962c2.502-9.336 12.098-14.876 21.433-12.375a2 2 0 0 1-1.035 3.864c-7.202-1.93-14.604 2.344-16.534 9.546a2 2 0 0 1-3.864-1.035z"
fill="#EEE"
fill-rule="nonzero"
/>
</g>
</svg>
</div>
<p class="lead">GitDock - All your GitLab work in one place.</p>
<p class="description">
Get an overview over all your activities across the projects you care about, and receive
notifications for any running pipelines.
</p>
<div id="login-gitlab">
<button onclick="startLogin()" id="login-gitlab-button">Log in with GitLab.com</button>
</div>
<div id="login-instance">
<div id="instance-checkbox-wrapper">
<input type="checkbox" id="instance-checkbox" name="instance-checkbox" />
<label for="instance-checkbox">I am using a self-managed GitLab instance.</label>
<div id="instance-details">
<form action="#" onsubmit="return false">
<div id="access-token" class="instance-details-input">
<label for="access-token-input">Access Token ('read_api' scope)</label>
<input
id="access-token-input"
name="access-token-input"
placeholder="z.B. 9El5deyVsJeRny49V0sx"
/>
</div>
<div id="instance-url" class="instance-details-input">
<label for="instance-url-input">Self-managed instance URL</label>
<input
id="instance-url-input"
name="instance-url-input"
placeholder="z.B. https://gitlab.mydomain.com"
/>
</div>
<button
type="submit"
id="login-instance-button"
onclick="startManualLogin(document.getElementById('access-token-input').value, document.getElementById('instance-url-input').value)"
>
Log in with access token
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div id="detail-view" class="detail-view">
<div id="detail-header" class="detail-header" onclick="goToOverview()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path class="icon" fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z" />
</svg>
<div id="detail-header-content" class="detail-header-content empty"></div>
</div>
<div id="detail-headline" class="detail-headline headline"></div>
<div id="detail-content" class="detail-content"></div>
<div id="detail-header" class="detail-header" onclick="goToOverview()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path
class="icon"
fill-rule="evenodd"
d="M10.707085,3.70711 C11.097605,3.31658 11.097605,2.68342 10.707085,2.29289 C10.316555,1.90237 9.683395,1.90237 9.292865,2.29289 L4.292875,7.29289 C3.902375,7.68342 3.902375,8.31658 4.292875,8.70711 L9.292865,13.7071 C9.683395,14.0976 10.316555,14.0976 10.707085,13.7071 C11.097605,13.3166 11.097605,12.6834 10.707085,12.2929 L6.414185,8 L10.707085,3.70711 Z"
/>
</svg>
<div id="detail-header-content" class="detail-header-content empty"></div>
</div>
<div id="detail-headline" class="detail-headline headline"></div>
<div id="detail-content" class="detail-content"></div>
</div>
<script src="./renderer.js"></script>
</body>
</html>
</body>
</html>

4701
myApp.js

File diff suppressed because it is too large Load Diff

19
package-lock.json generated
View File

@ -26,6 +26,7 @@
"@electron-forge/publisher-github": "^6.0.0-beta.59",
"electron": "^13.1.7",
"mocha": "^9.1.2",
"prettier": "2.4.1",
"spectron": "^15.0.0"
}
},
@ -7426,6 +7427,18 @@
"node": ">=4"
}
},
"node_modules/prettier": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/pretty-bytes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
@ -15733,6 +15746,12 @@
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
"integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc="
},
"prettier": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==",
"dev": true
},
"pretty-bytes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",

View File

@ -9,7 +9,9 @@
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish"
"publish": "electron-forge publish",
"prettier:check": "prettier --check .",
"pretier:fix": "prettier --write ."
},
"repository": "https://github.com/mvremmerden/gitdock",
"keywords": [
@ -30,6 +32,7 @@
"@electron-forge/publisher-github": "^6.0.0-beta.59",
"electron": "^13.1.7",
"mocha": "^9.1.2",
"prettier": "2.4.1",
"spectron": "^15.0.0"
},
"dependencies": {

View File

@ -1,4 +1,4 @@
const { contextBridge, ipcRenderer } = require('electron')
const { contextBridge, ipcRenderer } = require('electron');
const api = {
goToDetail: (value) => ipcRenderer.send('detail-page', value),
@ -21,39 +21,41 @@ const api = {
changeAnalytics: (value) => ipcRenderer.send('change-analytics', value),
startLogin: () => ipcRenderer.send('start-login'),
startManualLogin: (value) => ipcRenderer.send('start-manual-login', value),
logout: () => ipcRenderer.send('logout')
}
logout: () => ipcRenderer.send('logout'),
};
if (process.contextIsolated) {
contextBridge.exposeInMainWorld('electron', api)
contextBridge.exposeInMainWorld('electron', api);
} else {
function deepFreeze(o) {
Object.freeze(o)
Object.freeze(o);
Object.getOwnPropertyNames(o).forEach(prop => {
if (o.hasOwnProperty(prop)
&& o[prop] !== null
&& (typeof o[prop] === 'object' || typeof o[prop] === 'function')
&& !Object.isFrozen(o[prop])) {
deepFreeze(o[prop])
Object.getOwnPropertyNames(o).forEach((prop) => {
if (
o.hasOwnProperty(prop) &&
o[prop] !== null &&
(typeof o[prop] === 'object' || typeof o[prop] === 'function') &&
!Object.isFrozen(o[prop])
) {
deepFreeze(o[prop]);
}
})
return o
});
return o;
}
deepFreeze(api)
deepFreeze(api);
// @ts-expect-error https://github.com/electron-userland/spectron#node-integration
window.electronRequire = require
window.electronRequire = require;
// @ts-expect-error https://github.com/electron-userland/spectron/issues/693#issuecomment-747872160
window.electron = api
window.electron = api;
}
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
const element = document.getElementById(selector);
if (element) element.innerText = text;
};
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
replaceText(`${type}-version`, process.versions[type]);
}
})
});

View File

@ -1,122 +1,122 @@
function goToDetail(page, object) {
let value = {
page: page,
object: object
}
document.getElementById('detail-view').style.left = 0
document.body.style.overflow = 'hidden'
window.electron.goToDetail(value)
let value = {
page: page,
object: object,
};
document.getElementById('detail-view').style.left = 0;
document.body.style.overflow = 'hidden';
window.electron.goToDetail(value);
}
function goBackToDetail() {
document.getElementById('sub-detail-view').style.left = '100vw'
window.electron.goBackToDetail()
document.getElementById('sub-detail-view').style.left = '100vw';
window.electron.goBackToDetail();
}
function goToSubDetail(page, project, all = false) {
let value = {
page: page,
project: project,
all: all
}
document.getElementById('sub-detail-view').style.left = 0
window.electron.goToSubDetail(value)
let value = {
page: page,
project: project,
all: all,
};
document.getElementById('sub-detail-view').style.left = 0;
window.electron.goToSubDetail(value);
}
function goToOverview() {
window.electron.goToOverview()
document.getElementById('detail-view').style.left = '100vw'
document.getElementById('detail-content').innerHTML = ''
document.getElementById('detail-headline').innerHTML = ''
document.body.style.overflow = 'auto'
window.electron.goToOverview();
document.getElementById('detail-view').style.left = '100vw';
document.getElementById('detail-content').innerHTML = '';
document.getElementById('detail-headline').innerHTML = '';
document.body.style.overflow = 'auto';
}
function switchIssues(value, type, text) {
let object = {
label: value,
type: type,
text: text
}
window.electron.switchIssues(object)
let object = {
label: value,
type: type,
text: text,
};
window.electron.switchIssues(object);
}
function switchMRs(value, type, text) {
let object = {
label: value,
type: type,
text: text
}
window.electron.switchMRs(object)
let object = {
label: value,
type: type,
text: text,
};
window.electron.switchMRs(object);
}
function switchPage(url, type) {
let value = {
url: url,
type: type
}
window.electron.switchPage(value)
let value = {
url: url,
type: type,
};
window.electron.switchPage(value);
}
function searchRecent(input) {
window.electron.searchRecent(input.value)
window.electron.searchRecent(input.value);
}
function changeCommit(value) {
window.electron.changeCommit(value)
window.electron.changeCommit(value);
}
function changeProjectCommit(value) {
window.electron.changeProjectCommit(value)
window.electron.changeProjectCommit(value);
}
function addBookmark(value) {
window.electron.addBookmark(value)
window.electron.addBookmark(value);
}
function addProject(input, target) {
let value = {
input: input,
target: target
}
window.electron.addProject(value)
let value = {
input: input,
target: target,
};
window.electron.addProject(value);
}
function startBookmarkDialog() {
window.electron.startBookmarkDialog()
window.electron.startBookmarkDialog();
}
function startProjectDialog() {
window.electron.startProjectDialog()
window.electron.startProjectDialog();
}
function deleteBookmark(value) {
window.electron.deleteBookmark(value)
window.electron.deleteBookmark(value);
}
function deleteProject(value) {
window.electron.deleteProject(value)
window.electron.deleteProject(value);
}
function changeTheme(value) {
window.electron.changeTheme(value)
window.electron.changeTheme(value);
}
function changeAnalytics(value) {
window.electron.changeAnalytics(value)
window.electron.changeAnalytics(value);
}
function startLogin() {
window.electron.startLogin()
window.electron.startLogin();
}
function startManualLogin(access_token, host) {
let value = {
access_token: access_token,
host: host
}
window.electron.startManualLogin(value)
let value = {
access_token: access_token,
host: host,
};
window.electron.startManualLogin(value);
}
function logout() {
window.electron.logout()
}
window.electron.logout();
}

View File

@ -1,29 +1,29 @@
module.exports = {
query: "'query'",
state: "'state'",
sort: "'sort'",
allLabel: "'all'",
allText: "'All'",
assignedLabel: "'assigned_to_me'",
assignedText: "'Assigned'",
createdLabel: "'created_by_me'",
createdText: "'Created'",
openedLabel: "'opened'",
openedText: "'Open'",
closedLabel: "'closed'",
closedText: "'Closed'",
recentlyUpdatedLabel: "'updated_at'",
recentlyUpdatedText: "'Sort by recently updated'",
recentlyCreatedLabel: "'created_at'",
recentlyCreatedText: "'Sort by recently created'",
dueDateLabel: "'due_date&sort=asc'",
dueDateText: "'Sort by due date'",
reviewedLabel: "'review_requests_for_me'",
reviewedText: "'Reviewed'",
approvedLabel: "'approved_by_me'",
approvedText: "'Approved'",
mergedLabel: "'merged'",
mergedText: "'Merged'",
approvalLabel: "'approval_rule_for_me'",
approvalText: "'Approval rules'",
query: "'query'",
state: "'state'",
sort: "'sort'",
allLabel: "'all'",
allText: "'All'",
assignedLabel: "'assigned_to_me'",
assignedText: "'Assigned'",
createdLabel: "'created_by_me'",
createdText: "'Created'",
openedLabel: "'opened'",
openedText: "'Open'",
closedLabel: "'closed'",
closedText: "'Closed'",
recentlyUpdatedLabel: "'updated_at'",
recentlyUpdatedText: "'Sort by recently updated'",
recentlyCreatedLabel: "'created_at'",
recentlyCreatedText: "'Sort by recently created'",
dueDateLabel: "'due_date&sort=asc'",
dueDateText: "'Sort by due date'",
reviewedLabel: "'review_requests_for_me'",
reviewedText: "'Reviewed'",
approvedLabel: "'approved_by_me'",
approvedText: "'Approved'",
mergedLabel: "'merged'",
mergedText: "'Merged'",
approvalLabel: "'approval_rule_for_me'",
approvalText: "'Approval rules'",
};

1317
style.css

File diff suppressed because it is too large Load Diff

View File

@ -1,107 +1,125 @@
const Application = require('spectron').Application
const assert = require('assert')
const electronPath = require('electron')
const path = require('path')
const Application = require('spectron').Application;
const assert = require('assert');
const electronPath = require('electron');
const path = require('path');
describe('Application launch', function () {
this.timeout(25000)
this.timeout(25000);
beforeEach(function (done) {
this.app = new Application({
path: electronPath,
args: ['--no-sandbox', '--ignore-certificate-error', '--disable-dev-shm-usage', '--whitelisted-ips=', path.join(__dirname, '..')],
env: { NODE_ENV: 'test' }
})
args: [
'--no-sandbox',
'--ignore-certificate-error',
'--disable-dev-shm-usage',
'--whitelisted-ips=',
path.join(__dirname, '..'),
],
env: { NODE_ENV: 'test' },
});
this.app.start().then(() => {
done()
})
})
done();
});
});
afterEach(function () {
if (this.app && this.app.isRunning()) {
return this.app.stop()
return this.app.stop();
}
})
});
it('shows an initial window', function () {
return this.app.client.getWindowCount().then(function (count) {
assert.equal(count, 1)
})
})
assert.equal(count, 1);
});
});
it('has the right size', function () {
return this.app.client.browserWindow.getSize().then(function (sizes) {
assert.equal(sizes[0], 550) && assert.equal(sizes[1], 700)
})
})
assert.equal(sizes[0], 550) && assert.equal(sizes[1], 700);
});
});
it('can log in', async function () {
let element = await this.app.client.$('#instance-checkbox')
return element.click().then(async () => {
let token = await this.app.client.$('#access-token-input')
let url = await this.app.client.$('#instance-url-input')
await token.setValue(process.env.ACCESS_TOKEN)
await url.setValue('https://gitlab.com')
let button = await this.app.client.$('#login-instance-button')
return button.click()
}).then(async () => {
let issues = await this.app.client.$('#issues-count')
let mrs = await this.app.client.$('#mrs-count')
let todos = await this.app.client.$('#todos-count')
await issues.waitForExist({ timeout: 5000 })
let issuesExists = await issues.isExisting()
let mrsExists = await mrs.isExisting()
let todosExists = await todos.isExisting()
assert.equal(issuesExists, true)
assert.equal(mrsExists, true)
assert.equal(todosExists, true)
})
})
})
let element = await this.app.client.$('#instance-checkbox');
return element
.click()
.then(async () => {
let token = await this.app.client.$('#access-token-input');
let url = await this.app.client.$('#instance-url-input');
await token.setValue(process.env.ACCESS_TOKEN);
await url.setValue('https://gitlab.com');
let button = await this.app.client.$('#login-instance-button');
return button.click();
})
.then(async () => {
let issues = await this.app.client.$('#issues-count');
let mrs = await this.app.client.$('#mrs-count');
let todos = await this.app.client.$('#todos-count');
await issues.waitForExist({ timeout: 5000 });
let issuesExists = await issues.isExisting();
let mrsExists = await mrs.isExisting();
let todosExists = await todos.isExisting();
assert.equal(issuesExists, true);
assert.equal(mrsExists, true);
assert.equal(todosExists, true);
});
});
});
describe('Feature tests', function () {
this.timeout(25000)
this.timeout(25000);
beforeEach(function (done) {
this.app = new Application({
path: electronPath,
args: ['--no-sandbox', '--ignore-certificate-error', '--disable-dev-shm-usage', '--whitelisted-ips=', path.join(__dirname, '..')],
env: { NODE_ENV: 'test', LOGGED_IN: 'true' }
})
args: [
'--no-sandbox',
'--ignore-certificate-error',
'--disable-dev-shm-usage',
'--whitelisted-ips=',
path.join(__dirname, '..'),
],
env: { NODE_ENV: 'test', LOGGED_IN: 'true' },
});
this.app.start().then(() => {
done()
})
})
done();
});
});
afterEach(function () {
if (this.app && this.app.isRunning()) {
return this.app.stop()
return this.app.stop();
}
})
});
it('shows overview page', async function () {
let issues = await this.app.client.$('#issues-count')
let mrs = await this.app.client.$('#mrs-count')
let todos = await this.app.client.$('#todos-count')
await issues.waitForExist({ timeout: 5000 })
let issuesExists = await issues.isExisting()
let mrsExists = await mrs.isExisting()
let todosExists = await todos.isExisting()
assert.equal(issuesExists, true)
assert.equal(mrsExists, true)
assert.equal(todosExists, true)
})
let issues = await this.app.client.$('#issues-count');
let mrs = await this.app.client.$('#mrs-count');
let todos = await this.app.client.$('#todos-count');
await issues.waitForExist({ timeout: 5000 });
let issuesExists = await issues.isExisting();
let mrsExists = await mrs.isExisting();
let todosExists = await todos.isExisting();
assert.equal(issuesExists, true);
assert.equal(mrsExists, true);
assert.equal(todosExists, true);
});
it('adds and deletes bookmark', async function () {
let bookmark = await this.app.client.$('#bookmark-link')
await bookmark.setValue('https://gitlab.com/gitlab-org/gitlab/-/issues/1')
let button = await this.app.client.$('#bookmark-add-button')
return button.click().then(async () => {
}).then(async () => {
let title = await this.app.client.$('#bookmark-title')
await title.waitForExist({ timeout: 5000 })
let text = await title.getText()
assert.equal(text, '500 error on MR approvers edit page (#1)')
let button = await this.app.client.$('.bookmark-delete')
return button.click()
}).then(async () => {
let bookmark = await this.app.client.$('#bookmark-link')
await bookmark.waitForExist({ timeout: 5000 })
let bookmarkExists = await bookmark.isExisting()
assert.equal(bookmarkExists, true)
})
})
})
let bookmark = await this.app.client.$('#bookmark-link');
await bookmark.setValue('https://gitlab.com/gitlab-org/gitlab/-/issues/1');
let button = await this.app.client.$('#bookmark-add-button');
return button
.click()
.then(async () => {})
.then(async () => {
let title = await this.app.client.$('#bookmark-title');
await title.waitForExist({ timeout: 5000 });
let text = await title.getText();
assert.equal(text, '500 error on MR approvers edit page (#1)');
let button = await this.app.client.$('.bookmark-delete');
return button.click();
})
.then(async () => {
let bookmark = await this.app.client.$('#bookmark-link');
await bookmark.waitForExist({ timeout: 5000 });
let bookmarkExists = await bookmark.isExisting();
assert.equal(bookmarkExists, true);
});
});
});