Skip to content

Commit

Permalink
Add username and password values to properties
Browse files Browse the repository at this point in the history
  • Loading branch information
k0gen committed Jan 16, 2024
1 parent 1bf71df commit 92d171c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 2 deletions.
5 changes: 5 additions & 0 deletions manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version: 1.9.14
release-notes: |
- Upstream Bisq update to version 1.9.14
- Fix for black screen locking
- Clarify browser tab title option in config
- Add username and password values to properties
license: GPLv3
wrapper-repo: "https://github.com/Start9Labs/bisq-startos"
upstream-repo: "https://github.com/bisq-network/bisq"
Expand All @@ -28,6 +30,7 @@ main:
mounts:
main: /root/data
bisq: /config/.local/share/Bisq
gpu-acceleration: true
hardware-requirements:
arch:
- x86_64
Expand Down Expand Up @@ -67,6 +70,8 @@ interfaces:
protocols:
- tcp
- http
properties:
type: script
dependencies:
bitcoind:
version: ">=0.21.1.2 <27.0.0"
Expand Down
1 change: 1 addition & 0 deletions scripts/embassy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { properties } from "./procedures/properties.ts";
export { setConfig } from "./procedures/setConfig.ts";
export { getConfig } from "./procedures/getConfig.ts";
export { dependencies } from "./procedures/dependencies.ts";
Expand Down
4 changes: 2 additions & 2 deletions scripts/procedures/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export const getConfig = compat.getConfig({
"title": {
"type": "string",
"nullable": false,
"name": "Bisq Title",
"description": "This value will be displayed as the title of your browser tab.",
"name": "Browser Tab Title",
"description": "This value will be used as the title displayed on your web browser tab.",
"default": "Start9 Bisq",
"pattern": "^[^\\n\"]*$",
"pattern-description": "Must not contain newline or quote characters.",
Expand Down
64 changes: 64 additions & 0 deletions scripts/procedures/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { matches, types as T, util, YAML } from "../deps.ts";

const { shape, string } = matches;

const noPropertiesFound: T.ResultType<T.Properties> = {
result: {
version: 2,
data: {
"Not Ready": {
type: "string",
value: "Could not find properties. The service might still be starting",
qr: false,
copyable: false,
masked: false,
description: "Fallback Message When Properties could not be found",
},
},
},
} as const;

const configMatcher = shape({
"password": string,
});

export const properties: T.ExpectedExports.properties = async ( effects: T.Effects ) => {
if (
await util.exists(effects, {
volumeId: "main",
path: "start9/config.yaml",
}) === false
) {
return noPropertiesFound;
}
const config = configMatcher.unsafeCast(YAML.parse(
await effects.readFile({
path: "start9/config.yaml",
volumeId: "main",
}),
));
const properties: T.ResultType<T.Properties> = {
result: {
version: 2,
data: {
"Username": {
type: "string",
value: "abc",
description: "Default username for Bisq XRDP session.",
copyable: true,
qr: false,
masked: false,
},
"Password": {
type: "string",
value: config["password"],
description: "This is the password for Bisq XRDP session.",
copyable: true,
qr: false,
masked: true,
},
}
}
} as const;
return properties;
};

0 comments on commit 92d171c

Please sign in to comment.