Skip to content

Commit

Permalink
Dark mode issues
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Feb 29, 2024
1 parent 2e8a1ed commit f4cc2bf
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 41 deletions.
1 change: 1 addition & 0 deletions starsky-tools/mock/api/env/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"addSwagger": false,
"addSwaggerExport": false,
"addLegacyOverwrite": false,
"storageFolderAllowEdit": true,
"webFtp": "warning: The field is not empty but for security reasons it is not shown",
"publishProfiles": [
{
Expand Down
53 changes: 25 additions & 28 deletions starsky/starsky/clientapp/clientapp.code-workspace
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"editor.codeActionsOnSave": {
"folders": [
{
"path": "."
}
],
"settings": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit"
},
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"html.format.wrapLineLength": 100,
"html.format.wrapAttributes": "force-aligned",
"html.format.contentUnformatted": "pre,code,textarea, span",
"html.format.endWithNewline": true,
"javascript.preferences.quoteStyle": "double",
"javascript.updateImportsOnFileMove.enabled": "always",
"jest.disabledWorkspaceFolders": [
"node_modules",
"mock",
"history.md"
],
"typescript.preferences.quoteStyle": "double",
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.tsdk": "clientapp/node_modules/typescript/lib",
"editor.formatOnSave": true,
}
}
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"html.format.wrapLineLength": 100,
"html.format.wrapAttributes": "force-aligned",
"html.format.contentUnformatted": "pre,code,textarea, span",
"html.format.endWithNewline": true,
"javascript.preferences.quoteStyle": "double",
"javascript.updateImportsOnFileMove.enabled": "always",
"jest.disabledWorkspaceFolders": ["node_modules", "mock", "history.md"],
"typescript.preferences.quoteStyle": "double",
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.tsdk": "clientapp/node_modules/typescript/lib",
"editor.formatOnSave": true,
"testing.openTesting": "neverOpen"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ const PreferencesAppSettingsDesktop: React.FunctionComponent = () => {
? "preference-app-settings-desktop-use-local-desktop-true"
: "preference-app-settings-desktop-use-local-desktop-false"
}
className={appSettings?.useLocalDesktop ? "" : "warning-box"}
className={
appSettings?.useLocalDesktop ? "warning-box warning-box--optional" : "warning-box"
}
>
{MessageSwitchButtonDesktopApplicationDescription}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ export default {
};

export const Default = () => {
return <PreferencesAppSettingsStorageFolder />;
return (
<div data-test="preferences-username-text" className="content--text preferences-username-text">
<PreferencesAppSettingsStorageFolder />
</div>
);
};

Default.storyName = "default";
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const PreferencesAppSettingsStorageFolder: React.FunctionComponent = () => {
const MessageAppSettingStorageFolderEnvUsedFail = language.key(
localization.MessageAppSettingStorageFolderEnvUsedFail
);

const MessageReadMoreHere = language.key(localization.MessageReadMoreHere);
const permissionsData = useFetch(new UrlQuery().UrlAccountPermissions(), "get");

const [isEnabled, setIsEnabled] = useState(false);
Expand Down Expand Up @@ -91,7 +91,10 @@ const PreferencesAppSettingsStorageFolder: React.FunctionComponent = () => {

{storageFolder !== appSettings?.storageFolder && !storageFolderNotFound ? (
<div className="warning-box" data-test="storage-changed">
{MessageChangeNeedReSync}
{MessageChangeNeedReSync}{" "}
<a target="_blank" href={new UrlQuery().DocsGettingStartedFirstSteps()} rel="noreferrer">
{MessageReadMoreHere}
</a>
</div>
) : null}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const PreferencesUsername: React.FunctionComponent = () => {
{userName}
</div>
<div className="content--subheader">{MessageRole}</div>
<div className="content--text">{accountStatus?.data?.roleCode}</div>
<div className="content--text preferences-role">{accountStatus?.data?.roleCode}</div>
</>
);
};
Expand Down
5 changes: 5 additions & 0 deletions starsky/starsky/clientapp/src/localization/localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,11 @@
"nl": "Ga naar de homepagina",
"de": "Gehe zur Startseite"
},
"MessageReadMoreHere": {
"en": "Read more here",
"nl": "Lees meer hier",
"de": "Lesen Sie hier mehr"
},
"temp1": {
"en": "More",
"nl": "Meer",
Expand Down
4 changes: 4 additions & 0 deletions starsky/starsky/clientapp/src/shared/url/url-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,4 +436,8 @@ export class UrlQuery {
url += "//" + window.location.host + this.prefix + "/realtime";
return url;
}

public DocsGettingStartedFirstSteps(): string {
return "https://docs.qdraw.nl/docs/getting-started/first-steps";
}
}
14 changes: 7 additions & 7 deletions starsky/starsky/clientapp/src/style/css/20-content.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@
margin-bottom: 8px;
}

.content--text .warning-box a,
.content .warning-box a,
.content > form > .content--error-true a {
color: white;
text-decoration: underline;
}

.warning-box.warning-box--under-form {
margin-top: 25px;
}
Expand Down Expand Up @@ -259,10 +266,3 @@
.publish .warning-box {
margin-top: 4px;
}

/*for password gui*/
@media (prefers-color-scheme: dark) {
.preferences-username-text {
color: #fff;
}
}
15 changes: 15 additions & 0 deletions starsky/starsky/clientapp/src/style/css/50-preferences.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,18 @@
.preferences--password .warning-box {
margin-top: 10px;
}

@media (prefers-color-scheme: dark) {
.preferences--app-settings h3,
.preferences--app-settings p {
color: white;
}
}

/*for password gui*/
@media (prefers-color-scheme: dark) {
.preferences-role,
.preferences-username-text {
color: #fff;
}
}
3 changes: 2 additions & 1 deletion starskydesktop/starskydesktop.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"editor.formatOnSave": true,
"typescript.preferences.quoteStyle": "double",
"typescript.updateImportsOnFileMove.enabled": "always",
"cSpell.words": ["Starsky"]
"cSpell.words": ["Starsky"],
"testing.openTesting": "neverOpen"
}
}

0 comments on commit f4cc2bf

Please sign in to comment.