-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
870 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Send check results to CodeX chat | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
send-message: | ||
permissions: | ||
actions: write | ||
runs-on: ubuntu-22.04 | ||
env: | ||
API_URL: "https://api.github.com/repos/${{ github.repository }}/actions/runs" | ||
steps: | ||
- name: Set commit_sha to pull request head sha | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: echo "COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | ||
|
||
- name: Set commit_sha to pushed commit sha | ||
if: ${{ github.event_name == 'push' }} | ||
run: echo "COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV | ||
|
||
- name: Wait for other checks to succeed | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ env.COMMIT_SHA }} | ||
running-workflow-name: send-message | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 3 | ||
allowed-conclusions: success,skipped,cancelled,failure | ||
|
||
# Find results of the actions with the same SHA as this action via github api and set them to env variable | ||
- name: Get actions results | ||
run: | | ||
echo 'ACTIONS_RESULTS<<0x0a' >> $GITHUB_ENV | ||
curl -s -X GET -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"\ | ||
"$API_URL" | jq -r '.workflow_runs[] | select(((.head_sha=="${{ env.COMMIT_SHA }}") and (.id != ${{ github.run_id }})) | ||
and ((.conclusion == "success") or (.conclusion == "failure"))) | "\(.conclusion) [\(.name)](\(.html_url))" | | ||
gsub("success"; "✅") | gsub("failure"; "❌")' >> $GITHUB_ENV | ||
echo '0x0a' >> $GITHUB_ENV | ||
# Stop if all checks were skipped/cancelled | ||
- name: Stop this workflow if none of the results have conclusion "success" or "failure" | ||
if: ${{ env.ACTIONS_RESULTS == '' }} | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
${{ env.API_URL }}/${{ github.run_id }}/cancel | ||
- name: Send a message | ||
uses: codex-team/action-codexbot-notify@v1 | ||
with: | ||
webhook: ${{ secrets.CODEX_BOT_NOTIFY_NOTES_CHAT }} | ||
message: "${{ env.ACTIONS_RESULTS }}" | ||
parse_mode: 'markdown' | ||
disable_web_page_preview: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
{ | ||
"appTitle": "NoteX", | ||
"auth": { | ||
"login": "Login" | ||
}, | ||
"settings": { | ||
"title": "Settings", | ||
"changeTheme": "Change theme" | ||
"login": "Login", | ||
"logout": "Logout" | ||
}, | ||
"header": { | ||
"buttons": { | ||
"home": "Home", | ||
"noteSettings": "Settings" | ||
} | ||
}, | ||
"userSettings": { | ||
"title": "User Settings", | ||
"changeTheme": "Change theme", | ||
"userEditorTools": "User editor tools" | ||
}, | ||
"noteSettings": { | ||
"title": "Note Settings" | ||
}, | ||
"note": { | ||
"new": "New Note" | ||
}, | ||
"home": { | ||
"title": "Recent Notes" | ||
}, | ||
"errors": { | ||
"404": "Page not found", | ||
"500": "Unknown error happened", | ||
"default": "Something went wrong" | ||
}, | ||
"marketplace": { | ||
"title": "Marketplace", | ||
"listOfTools": "Tools" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type EditorTool from '@/domain/entities/EditorTool'; | ||
import { type Ref, ref, onMounted } from 'vue'; | ||
import { marketplaceService } from '@/domain'; | ||
|
||
/** | ||
* Composable for the application state | ||
*/ | ||
interface UseMarketplaceComposable { | ||
/** | ||
* All editor tools that are used in notes creation | ||
*/ | ||
tools: Ref<EditorTool[]> | ||
} | ||
|
||
/** | ||
* Application service for working with the Editor Tools | ||
*/ | ||
export default function (): UseMarketplaceComposable { | ||
/** | ||
* All editor tools | ||
*/ | ||
const tools = ref<EditorTool[]>([]); | ||
|
||
/** | ||
* Get list of all tools | ||
*/ | ||
onMounted(async () => { | ||
tools.value = await marketplaceService.getAllTools(); | ||
}); | ||
|
||
|
||
return { | ||
tools: tools, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { userService } from '@/domain'; | ||
|
||
/** | ||
* User settings hook state | ||
*/ | ||
interface UseUserSettingsComposableState { | ||
/** | ||
* Add tool to the user settings | ||
*/ | ||
addTool(id: string): void | ||
} | ||
|
||
|
||
/** | ||
* Methods for working with user settings | ||
*/ | ||
export function useUserSettings(): UseUserSettingsComposableState { | ||
/** | ||
* Add tool to the user settings | ||
* | ||
* @param id - Tool identifier | ||
*/ | ||
function addTool(id: string): void { | ||
userService.addTool(id); | ||
} | ||
|
||
return { | ||
addTool, | ||
}; | ||
} |
Oops, something went wrong.