diff --git a/.github/workflows/release-on-tag-netcore-desktop-electron.yml b/.github/workflows/release-on-tag-netcore-desktop-electron.yml index 528ac3c3db..8ec6d5f257 100644 --- a/.github/workflows/release-on-tag-netcore-desktop-electron.yml +++ b/.github/workflows/release-on-tag-netcore-desktop-electron.yml @@ -258,15 +258,18 @@ jobs: body: | ## Desktop app versions: _When you are not sure pick the Desktop App_ - - starsky-mac-x64-desktop.dmg - __Starsky Desktop App for Mac OS *10.15* or newer (Intel)__ - - starsky-win-x64-desktop.exe - __Starsky Desktop App for Windows 10 1607+ or 11 (Intel 64 bits)__ + - starsky-mac-x64-desktop.dmg - __Starsky Desktop App for Mac OS *12.0* or newer (Intel)__ + - starsky-win-x64-desktop.exe - __Starsky Desktop App for Windows 10 1607+ or Windows 11 22000+ (Intel 64 bits)__ ## Server versions: - starsky-linux-arm.zip - Starsky as Web Application (start from command line) only for Raspberry Pi's - starsky-linux-arm64.zip - Starsky as Web Application (start from command line) only for 64 bits Raspberry Pi's - - starsky-osx-x64.zip - Starsky as Web Application (start from command line) only for Intel Mac OS *10.15* or newer + - starsky-osx-x64.zip - Starsky as Web Application (start from command line) only for Intel Mac OS *12.0* or newer - starsky-osx-arm64.zip - Starsky as Web Application (start from command line) only for Apple Silicon (newer then end of 2020) Mac OS *12* or newer - - starsky-win-x64.zip - Starsky as Web Application (start from command line) only for Windows 10 1607+ or 11 (Intel 64 bits) + - starsky-win-x64.zip - Starsky as Web Application (start from command line) only for Windows 10 1607+ or 11 22000+ (Intel 64 bits) + + ## Getting started + [Read about the first steps](https://docs.qdraw.nl/docs/getting-started/first-steps) ## Changelog [There is an changelog to see the recent changes](https://docs.qdraw.nl/docs/advanced-options/history/#${{ steps.get_tag_name.outputs.VERSION }}) diff --git a/documentation/docs/assets/features-bulk-editing-select.jpg b/documentation/docs/assets/features-bulk-editing-select.jpg new file mode 100644 index 0000000000..ad0f4f3404 Binary files /dev/null and b/documentation/docs/assets/features-bulk-editing-select.jpg differ diff --git a/documentation/docs/assets/getting-started-first-steps-import.jpg b/documentation/docs/assets/getting-started-first-steps-import.jpg new file mode 100644 index 0000000000..08504b2bbf Binary files /dev/null and b/documentation/docs/assets/getting-started-first-steps-import.jpg differ diff --git a/documentation/docs/assets/getting-started-first-steps-manual-sync-2.jpg b/documentation/docs/assets/getting-started-first-steps-manual-sync-2.jpg new file mode 100644 index 0000000000..22698a93ab Binary files /dev/null and b/documentation/docs/assets/getting-started-first-steps-manual-sync-2.jpg differ diff --git a/documentation/docs/assets/getting-started-first-steps-manual-sync.jpg b/documentation/docs/assets/getting-started-first-steps-manual-sync.jpg new file mode 100644 index 0000000000..e9551acdc0 Binary files /dev/null and b/documentation/docs/assets/getting-started-first-steps-manual-sync.jpg differ diff --git a/documentation/docs/assets/getting-started-first-steps-storage-folder.jpg b/documentation/docs/assets/getting-started-first-steps-storage-folder.jpg new file mode 100644 index 0000000000..10111ac5af Binary files /dev/null and b/documentation/docs/assets/getting-started-first-steps-storage-folder.jpg differ diff --git a/documentation/docs/developer-guide/api/readme.md b/documentation/docs/developer-guide/api/readme.md index 7825f2d3f9..a7d9b1cb5f 100644 --- a/documentation/docs/developer-guide/api/readme.md +++ b/documentation/docs/developer-guide/api/readme.md @@ -23,6 +23,7 @@ This document is auto generated | __/api/allowed-types/thumb__ | GET | Check if IsExtensionThumbnailSupported | | __/api/env__ | GET | Show the runtime settings (dont allow AllowAnonymous) | | __/api/env__ | POST | Show the runtime settings (dont allow AllowAnonymous) | +| _Parameters: Verbose, StorageFolder, UseSystemTrash, UseLocalDesktop, DefaultDesktopEditor, DesktopCollectionsOpen _ | | __/api/env/features__ | GET | Show features that used in the frontend app / menu | | __/api/cache/list__ | GET | Get Database Cache (only the cache) | | __/api/remove-cache__ | GET | Delete Database Cache (only the cache) | @@ -30,9 +31,9 @@ This document is auto generated | __/api/delete__ | DELETE| Remove files from the disk, but the file must contain the !delete! (TrashKeyw...| | _Parameters: f (subPaths, separated by dot comma), collections (true is to update files with the same name before _ | | _ the extenstion) _ | -| __/api/desktop-editor/open__ | GET | Open a file in the default editor or a specific editor on the desktop | +| __/api/desktop-editor/open__ | POST | Open a file in the default editor or a specific editor on the desktop | | _Parameters: f (single or multiple subPaths), collections (to combine files with the same name before the extension) _ | -| __/api/desktop-editor/amount-confirmation__ | GET | Check the amount of files to open before | +| __/api/desktop-editor/amount-confirmation__ | POST | Check the amount of files to open before | | __/api/disk/mkdir__ | POST | Make a directory (-p) | | __/api/disk/rename__ | POST | Rename file/folder and update it in the database | | _Parameters: f (from subPath), to (to subPath), collections (is collections bool), currentStatus (default is to not _ | @@ -107,5 +108,6 @@ This document is auto generated | __/api/thumbnail/zoom/\{f\}@\{z\}__ | GET | Get zoomed in image by fileHash.At the moment this is the source image | | __/api/thumbnail-generation__ | POST | Create thumbnails for a folder in the background | | __/api/trash/move-to-trash__ | POST | Move a file to the trash | +| __/api/trash/detect-to-use-system-trash__ | GET | Is the system trash supportedUsed in End2End tests to enable or disable the t...| | __/api/upload__ | POST | Upload to specific folder (does not check if already has been imported)Use th...| | __/api/upload-sidecar__ | POST | Upload sidecar file to specific folder (does not check if already has been im...| diff --git a/documentation/docs/features/bulk-editing.md b/documentation/docs/features/bulk-editing.md index f7f53bebf8..d55e16e6da 100644 --- a/documentation/docs/features/bulk-editing.md +++ b/documentation/docs/features/bulk-editing.md @@ -14,7 +14,7 @@ Press select and Labels and select the images you want to update. When you selected an image you can update the metadata. You can update the following metadata: -- Tags +- Tags *(Comma seperated)* - Info - Title - ColorClass (the color label of the image) @@ -25,11 +25,21 @@ via the API you could also update other metadata like: - Software - etc. +The following image shows the bulk editing feature in action: + +- So press 'Select' and select the images you want to update: +- Press 'Labels' and update the metadata you want to update. + +![Bulk edit select](../assets/features-bulk-editing-select.jpg) + # Replace the metadata in the fields: tags, info or title You can search and replace the metadata in the fields: tags, info or title. Is easy to undo typos or update the metadata. +> Note: Tags are comma separated and unique. +> So when you add a tag that already exists, it will not be added. + # Open files When using the application as desktop mode you can batch open files with your favorite editor. diff --git a/documentation/docs/getting-started/first-steps.md b/documentation/docs/getting-started/first-steps.md index 4711112c28..5b062b1f2b 100644 --- a/documentation/docs/getting-started/first-steps.md +++ b/documentation/docs/getting-started/first-steps.md @@ -4,14 +4,57 @@ sidebar_position: 3 # First steps -Once the initial setup is complete, there are only two more steps before you can start browsing your pictures: +Welcome to the first steps of your journey with Starsky! -> > Configure your library and advanced settings according to your individual preferences.
-> > Choose whether you want to index your originals directly, leaving all file and folder names unchanged, or use the optional import feature, which automatically removes duplicates, gives files a unique name, and sorts them by year and month. +## Setting Storage Folder -If you want to use folders that already exist on your computer, make sure you configured them as originals respectively import folders during setup. +- Once you have installed Starsky, you can start it by opening the Starsky application. +- Go to Preferences and change the Storage Folder's path to the location where you want to store + your pictures. +- Press Command + Shift + K on Mac OS and Ctrl + Shift + K on Windows to go to Preferences. +- This looks like this: -To add new pictures, you can either copy them to the originals or import folder or upload them using a browser, -which will automatically import them once uploaded. +![Storage Folder Assets](../assets/getting-started-first-steps-storage-folder.jpg) -Then start indexing or importing, depending on which strategy you have chosen. +> Note: AppSettings can only be edited by Administrators, the first user is by default Administrator + +> Note: When using an environment variable, the path is not editable in the UI + +When using as server mode: [see account management for more info](../features/accountmanagement.md) + +## Run re-sync + +- After setting the Storage Folder, you can run a re-sync to update the view with the new location. +- Go to the Home screen +- Press More on the right top +- Click Synchronize manually +- This looks like this: + +![Manual Sync](../assets/getting-started-first-steps-manual-sync.jpg) + +- Press Synchronize current directory manually + +![Manual Sync](../assets/getting-started-first-steps-manual-sync-2.jpg) + +- Wait until the sync is finished + +## Importing photos + +- After the sync is finished, you can start importing photos. +- Go to the Home screen +- In menu click on Import +- This looks like this: + +![Import](../assets/getting-started-first-steps-import.jpg) + +The default structure is `/yyyy/MM/yyyy_MM_dd/yyyyMMdd_HHmmss_{filenamebase}.ext` and the photos are +placed in the correct folder. +So a picture that has been taken at `Saturday, 3 February 2024 10:10:29` will be placed +in `2024/02/2024_02_03` and will be named: `20240203_101029_DSC07624.jpg` the base name of the file +is `DSC07624` and the extension is `jpg`. + +Read more about [Import here](../features/import.md) + +## Search + +Learn more about search [Search here](../features/search.md) \ No newline at end of file diff --git a/history.md b/history.md index 7b00182a36..ac33fd0bf3 100644 --- a/history.md +++ b/history.md @@ -52,7 +52,8 @@ Semantic Versioning 2.0.0 is from version 0.1.6+ - [x] (Added) _Back-end_ Add role to info api (PR #1381) - [x] (Added) _Front-end_ Add settings for Open File (PR #1381) - [x] (Added) _Back-end_ rename starsky core to starsky.project.web (PR #1381) -- [x] (Changed) _Back-end_ Keep /api/trash/detect-to-use-system-trash although its rm here (PR #1381) +- [x] (Changed) _Back-end_ Keep /api/trash/detect-to-use-system-trash although its rm here and re + added (PR #1381) - [x] (Removed) _Back-end_ Remove verbose option in UI (setting is hidden now) (PR #1381) - [x] (Added) _Front-end_ German translations (PR #1381) - [x] (Added) _Front-end_ command + shift + k go to settings now (PR #1381) @@ -62,6 +63,12 @@ Semantic Versioning 2.0.0 is from version 0.1.6+ - [x] (Added) _Front-end_ Add warning when opening a lot pictures at one: "Do you really want to edit all of the selected photos?" (PR #1381) - [x] (Changed) _Front-end_ isRelativeUrl check for redirect (PR #1419) +- [x] (Breaking changes) _App_ System requirements for Windows and Mac OS are changed see release + notes (PR #1422) +- [x] (Fixed) _Front-end_ Add Tooltip to explain that tags are comma separated (PR #1422) (Issue + #1405) +- [x] (Fixed) _Docs_ Make getting started more clear (PR #1422) (Issue #1403) +- [x] (Fixed) _Front-end_ Add link to docs page for storage folder (PR #1422) (Issue #1404) ## version 0.6.0-beta.1 - 2024-02-18 {#v0.6.0-beta.1} diff --git a/starsky-tools/mock/api/env/index.json b/starsky-tools/mock/api/env/index.json index f2c2a0e8f4..108b192ab6 100644 --- a/starsky-tools/mock/api/env/index.json +++ b/starsky-tools/mock/api/env/index.json @@ -33,6 +33,9 @@ "addSwagger": false, "addSwaggerExport": false, "addLegacyOverwrite": false, + "storageFolderAllowEdit": true, + "defaultDesktopEditor": [], + "useLocalDesktop": true, "webFtp": "warning: The field is not empty but for security reasons it is not shown", "publishProfiles": [ { diff --git a/starsky/starsky/clientapp/.vscode/settings.json b/starsky/starsky/clientapp/.vscode/settings.json index 30dd5ec2f5..b9a21de066 100644 --- a/starsky/starsky/clientapp/.vscode/settings.json +++ b/starsky/starsky/clientapp/.vscode/settings.json @@ -7,5 +7,8 @@ }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[css]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" } } diff --git a/starsky/starsky/clientapp/clientapp.code-workspace b/starsky/starsky/clientapp/clientapp.code-workspace index 52511fdbfc..3141990026 100644 --- a/starsky/starsky/clientapp/clientapp.code-workspace +++ b/starsky/starsky/clientapp/clientapp.code-workspace @@ -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, - } -} \ No newline at end of file + "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" + } +} diff --git a/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.spec.tsx b/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.spec.tsx new file mode 100644 index 0000000000..d12fe3db59 --- /dev/null +++ b/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.spec.tsx @@ -0,0 +1,59 @@ +import { fireEvent, render, screen } from "@testing-library/react"; +import Tooltip from "./tooltip"; + +describe("Tooltip component", () => { + it("renders tooltip text on hover", () => { + const text = "This is a tooltip"; + const component = render( + + Hover me + + ); + + // Tooltip should not be visible initially + expect(screen.queryByTestId("tooltip")).toBeFalsy(); + + // Hover over the button to display the tooltip + fireEvent.mouseEnter(screen.getByText("Hover me")); + + // Tooltip should now be visible + expect(screen.getByTestId("tooltip")).toBeTruthy(); + expect(screen.getByText(text)).toBeTruthy(); + + // Move mouse away to hide the tooltip + fireEvent.mouseLeave(screen.getByText("Hover me")); + expect(screen.queryByTestId("tooltip")).toBeFalsy(); + component.unmount(); + }); + + describe("click behavior", () => { + it("renders tooltip text on click", () => { + const text = "This is a tooltip"; + const component = render( + + Click me + + ); + + const test = component.container.innerHTML; + console.log(test); + + // Tooltip should not be visible initially + expect(screen.queryByTestId("tooltip")).toBeFalsy(); + + // Click on the button to display the tooltip + fireEvent.click(screen.getByText("Click me")); + + // Tooltip should now be visible + expect(screen.queryByTestId("tooltip")).toBeTruthy(); + expect(screen.getByText(text)).toBeTruthy(); + + // Click on the button again to hide the tooltip + fireEvent.click(screen.getByText("Click me")); + + expect(screen.queryByTestId("tooltip")).toBeFalsy(); + + component.unmount(); + }); + }); +}); diff --git a/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.stories.tsx b/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.stories.tsx new file mode 100644 index 0000000000..1c1a723e93 --- /dev/null +++ b/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.stories.tsx @@ -0,0 +1,20 @@ +import Tooltip from "./tooltip"; + +export default { + title: "components/atoms/tooltip" +}; + +export const Default = () => { + return ( + <> +
+
+ + + +
+ + ); +}; + +Default.storyName = "default"; diff --git a/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.tsx b/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.tsx new file mode 100644 index 0000000000..3283a9b08c --- /dev/null +++ b/starsky/starsky/clientapp/src/components/atoms/tooltip/tooltip.tsx @@ -0,0 +1,37 @@ +import React, { useState } from "react"; + +interface TooltipProps { + text: string; + children?: React.ReactNode; + left: boolean; +} + +const Tooltip: React.FC = ({ text, children, left }) => { + const [showTooltip, setShowTooltip] = useState(false); + + const handleMouseEnter = () => { + setShowTooltip((prevState) => !prevState); + }; + + const handleMouseLeave = () => { + setShowTooltip(false); + }; + + return ( + + ); +}; + +export default Tooltip; diff --git a/starsky/starsky/clientapp/src/components/molecules/archive-sidebar/archive-sidebar-label-edit-add-overwrite.tsx b/starsky/starsky/clientapp/src/components/molecules/archive-sidebar/archive-sidebar-label-edit-add-overwrite.tsx index a8af1551d6..8598ef50ec 100644 --- a/starsky/starsky/clientapp/src/components/molecules/archive-sidebar/archive-sidebar-label-edit-add-overwrite.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/archive-sidebar/archive-sidebar-label-edit-add-overwrite.tsx @@ -18,13 +18,17 @@ import { UrlQuery } from "../../../shared/url/url-query"; import FormControl from "../../atoms/form-control/form-control"; import Notification, { NotificationType } from "../../atoms/notification/notification"; import Preloader from "../../atoms/preloader/preloader"; +import Tooltip from "../../atoms/tooltip/tooltip"; const ArchiveSidebarLabelEditAddOverwrite: React.FunctionComponent = () => { const settings = useGlobalSettings(); const language = new Language(settings.language); + const MessageTagsWithColon = language.key(localization.MessageTagsWithColon); + const MessageInfoWithColon = language.key(localization.MessageInfoWithColon); + const MessageTitleWithColon = language.key(localization.MessageTitleWithColon); + const MessageTagsDescription = language.key(localization.MessageTagsDescription); const MessageAddName = language.key(localization.MessageAddName); const MessageOverwriteName = language.key(localization.MessageOverwriteName); - const MessageTitleName = language.key(localization.MessageTitleName); const MessageWriteErrorReadOnly = language.key(localization.MessageWriteErrorReadOnly); const MessageErrorGenericFail = language.key(localization.MessageErrorGenericFail); const MessageErrorNotFoundSourceMissingRunSync = language.key( @@ -151,7 +155,12 @@ const ArchiveSidebarLabelEditAddOverwrite: React.FunctionComponent = () => { {isLoading ? : ""} -

Tags:

+

+ {MessageTagsWithColon} + + + +

{ contentEditable={!state.isReadOnly && select.length !== 0} > -

Info:

+

{MessageInfoWithColon}

{ contentEditable={!state.isReadOnly && select.length !== 0} > -

{MessageTitleName}:

+

{MessageTitleWithColon}

{ const settings = useGlobalSettings(); const language = new Language(settings.language); + const MessageTagsWithColon = language.key(localization.MessageTagsWithColon); + const MessageInfoWithColon = language.key(localization.MessageInfoWithColon); + const MessageTitleWithColon = language.key(localization.MessageTitleWithColon); const MessageSearchAndReplaceNameLong = language.key( localization.MessageSearchAndReplaceNameLong ); - const MessageTitleName = language.key(localization.MessageTitleName); const MessageWriteErrorReadOnly = language.key(localization.MessageWriteErrorReadOnly); const MessageErrorGenericFail = language.key(localization.MessageErrorGenericFail); const MessageErrorNotFoundSourceMissingRunSync = language.key( @@ -162,7 +164,7 @@ const ArchiveSidebarLabelEditSearchReplace: React.FunctionComponent = () => { {isLoading ? : ""} -

Tags:

+

{MessageTagsWithColon}

{   -

Info:

+

{MessageInfoWithColon}

{   -

{MessageTitleName}:

+

{MessageTitleWithColon}

- {MessageNewUserNoPhotosInFolder} {MessageNoPhotosInFolder} + {MessageNewUserNoPhotosInFolder}{" "} + + {MessageReadMoreHere}. + {" "} + {MessageNoPhotosInFolder} ); } diff --git a/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.spec.tsx b/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.spec.tsx index 71fa1f8eec..b8bee87488 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.spec.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.spec.tsx @@ -7,8 +7,8 @@ import { IFileIndexItem, newIFileIndexItemArray } from "../../../interfaces/IFil import { Router } from "../../../router-app/router-app"; import * as FlatListItem from "../../atoms/flat-list-item/flat-list-item"; import * as ListImageChildItem from "../../atoms/list-image-child-item/list-image-child-item"; -import ItemListView from "./item-list-view"; import * as ShiftSelectionHelper from "./internal/shift-selection-helper"; +import ItemListView from "./item-list-view"; describe("ItemListView", () => { it("renders (without state component)", () => { @@ -69,9 +69,10 @@ describe("ItemListView", () => { const component = render( ); - expect(component.container.textContent).toBe( - "New? Set your drive location in the settings. There are no photos in this folder" + expect(component.container.textContent).toContain( + "New? Set your drive location in the settings." ); + expect(component.container.textContent).toContain("There are no photos in this folder"); }); it("text should be: There are no photos in this folder", () => { diff --git a/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.stories.tsx b/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.stories.tsx index 8c7a06fe6e..ed2f782c70 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.stories.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-list-view/item-list-view.stories.tsx @@ -26,6 +26,13 @@ export const Default = () => { Default.storyName = "default"; +export const HomeNoContent = () => { + Router.navigate("/"); + return ; +}; + +HomeNoContent.storyName = "home no content"; + export const _8ItemsSelectionDisabled = () => { Router.navigate("/"); return ( diff --git a/starsky/starsky/clientapp/src/components/organisms/preference-app-settings-desktop/preference-app-settings-desktop.tsx b/starsky/starsky/clientapp/src/components/organisms/preference-app-settings-desktop/preference-app-settings-desktop.tsx index 0a64842314..e2dc8d99e3 100644 --- a/starsky/starsky/clientapp/src/components/organisms/preference-app-settings-desktop/preference-app-settings-desktop.tsx +++ b/starsky/starsky/clientapp/src/components/organisms/preference-app-settings-desktop/preference-app-settings-desktop.tsx @@ -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} diff --git a/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.stories.tsx b/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.stories.tsx index aa67399455..29e4053f9e 100644 --- a/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.stories.tsx +++ b/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.stories.tsx @@ -5,7 +5,11 @@ export default { }; export const Default = () => { - return ; + return ( +
+ +
+ ); }; Default.storyName = "default"; diff --git a/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.tsx b/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.tsx index 20d92999e9..02e037d329 100644 --- a/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.tsx +++ b/starsky/starsky/clientapp/src/components/organisms/preferences-app-settings-storage-folder/preferences-app-settings-storage-folder.tsx @@ -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); @@ -91,7 +91,10 @@ const PreferencesAppSettingsStorageFolder: React.FunctionComponent = () => { {storageFolder !== appSettings?.storageFolder && !storageFolderNotFound ? (
- {MessageChangeNeedReSync} + {MessageChangeNeedReSync}{" "} + + {MessageReadMoreHere} +
) : null} diff --git a/starsky/starsky/clientapp/src/components/organisms/preferences-username/preferences-username.tsx b/starsky/starsky/clientapp/src/components/organisms/preferences-username/preferences-username.tsx index 37384d6c1d..cb66e9bb7d 100644 --- a/starsky/starsky/clientapp/src/components/organisms/preferences-username/preferences-username.tsx +++ b/starsky/starsky/clientapp/src/components/organisms/preferences-username/preferences-username.tsx @@ -35,7 +35,7 @@ const PreferencesUsername: React.FunctionComponent = () => { {userName}
{MessageRole}
-
{accountStatus?.data?.roleCode}
+
{accountStatus?.data?.roleCode}
); }; diff --git a/starsky/starsky/clientapp/src/localization/localization.json b/starsky/starsky/clientapp/src/localization/localization.json index 29a2187343..11d2cd9ba1 100644 --- a/starsky/starsky/clientapp/src/localization/localization.json +++ b/starsky/starsky/clientapp/src/localization/localization.json @@ -580,9 +580,29 @@ "de": "Nächste" }, "MessageAddName": { - "en": "Hinzufügen zu", + "en": "Add to", "nl": "Toevoegen", - "de": "Mehr" + "de": "Hinzufügen zu" + }, + "MessageTagsWithColon": { + "en": "Tags: ", + "nl": "Tags: ", + "de": "Schlagwörter: " + }, + "MessageInfoWithColon": { + "en": "Info: ", + "nl": "Info: ", + "de": "Info: " + }, + "MessageTagsDescription": { + "en": "Tags are comma-separated", + "nl": "Tags zijn gescheiden door komma's", + "de": "Schlagwörter sind durch Kommas getrennt" + }, + "MessageTitleWithColon": { + "en": "Title: ", + "nl": "Titel: ", + "de": "Titel: " }, "MessageOverwriteName": { "en": "Overwrite", @@ -994,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", diff --git a/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts b/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts index 73c71b3e10..88d5ead5b5 100644 --- a/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts +++ b/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts @@ -1,5 +1,8 @@ import { UrlQuery } from "./url-query"; +/** + * UrlQueryTest + */ describe("url-query", () => { const urlQuery = new UrlQuery(); @@ -236,6 +239,11 @@ describe("url-query", () => { }); }); + it("DocsGettingStartedFirstSteps", () => { + const test = urlQuery.DocsGettingStartedFirstSteps(); + expect(test).toContain("docs/getting-started/first-steps"); + }); + describe("UrlRealtime", () => { const { location } = window; /** diff --git a/starsky/starsky/clientapp/src/shared/url/url-query.ts b/starsky/starsky/clientapp/src/shared/url/url-query.ts index 219341dacc..03a35fca97 100644 --- a/starsky/starsky/clientapp/src/shared/url/url-query.ts +++ b/starsky/starsky/clientapp/src/shared/url/url-query.ts @@ -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"; + } } diff --git a/starsky/starsky/clientapp/src/style/css/00-index.css b/starsky/starsky/clientapp/src/style/css/00-index.css index 3478a7751d..8898c83f4c 100644 --- a/starsky/starsky/clientapp/src/style/css/00-index.css +++ b/starsky/starsky/clientapp/src/style/css/00-index.css @@ -27,6 +27,8 @@ @import "./37-video.css"; @import "./38-arrow-to.css"; @import "./39-select.css"; +@import "./40-tooltip.css"; + @import "./50-preferences.css"; @import "./vendor/60-leaflet.css"; diff --git a/starsky/starsky/clientapp/src/style/css/20-content.css b/starsky/starsky/clientapp/src/style/css/20-content.css index 16bb2ba57e..4e8fb11740 100644 --- a/starsky/starsky/clientapp/src/style/css/20-content.css +++ b/starsky/starsky/clientapp/src/style/css/20-content.css @@ -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; } @@ -259,10 +266,3 @@ .publish .warning-box { margin-top: 4px; } - -/*for password gui*/ -@media (prefers-color-scheme: dark) { - .preferences-username-text { - color: #fff; - } -} diff --git a/starsky/starsky/clientapp/src/style/css/38-arrow-to.css b/starsky/starsky/clientapp/src/style/css/38-arrow-to.css index 96a88036cd..b8c4555abc 100644 --- a/starsky/starsky/clientapp/src/style/css/38-arrow-to.css +++ b/starsky/starsky/clientapp/src/style/css/38-arrow-to.css @@ -6,3 +6,13 @@ background-size: contain; background-image: url("../images/s-next.svg"); } + +@media (prefers-color-scheme: dark) { + .arrow-to { + background-size: contain; + background-image: none; + mask-image: url("../images/s-next.svg"); + mask-size: contain; + background-color: white; + } +} diff --git a/starsky/starsky/clientapp/src/style/css/40-tooltip.css b/starsky/starsky/clientapp/src/style/css/40-tooltip.css new file mode 100644 index 0000000000..ffaad763c8 --- /dev/null +++ b/starsky/starsky/clientapp/src/style/css/40-tooltip.css @@ -0,0 +1,60 @@ +.tooltip-container { + position: relative; + background-color: transparent; + display: inline; + vertical-align: bottom; +} + +.tooltip-container .tooltip { + position: absolute; + background-color: #90a4ae; + color: black; + padding: 8px; + border-radius: 3px; + z-index: 1; + bottom: 125%; + left: 50%; + transform: translateX(-50%); + white-space: nowrap; +} + +.tooltip-container.left .tooltip { + left: 70%; + transform: translateX(-30%); +} + +.tooltip-container .tooltip::after { + content: ""; + position: absolute; + top: 100%; /* Position the arrow just below the tooltip */ + left: 50%; + border-width: 5px; + border-style: solid; + border-color: #90a4ae transparent transparent transparent; /* Black arrow with transparent top border */ + transform: translateX(-50%); +} + +.tooltip-container.left .tooltip::after { + left: 28%; +} + +.tooltip-container:hover .tooltip { + visibility: visible; +} + +.tooltip-container > .info--small { + display: table-cell; + width: 16px; + height: 16px; + + background-color: #263238; + mask-image: url("../images/s-info.svg"); + mask-position: 0px 0px; + mask-size: 100%; +} + +@media (prefers-color-scheme: dark) { + .tooltip-container > .info--small { + background-color: white; + } +} diff --git a/starsky/starsky/clientapp/src/style/css/50-preferences.css b/starsky/starsky/clientapp/src/style/css/50-preferences.css index 54f4c00a15..4768dc7b30 100644 --- a/starsky/starsky/clientapp/src/style/css/50-preferences.css +++ b/starsky/starsky/clientapp/src/style/css/50-preferences.css @@ -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; + } +} diff --git a/starskydesktop/starskydesktop.code-workspace b/starskydesktop/starskydesktop.code-workspace index b83fd5ae4d..992f6c40be 100644 --- a/starskydesktop/starskydesktop.code-workspace +++ b/starskydesktop/starskydesktop.code-workspace @@ -17,6 +17,7 @@ "editor.formatOnSave": true, "typescript.preferences.quoteStyle": "double", "typescript.updateImportsOnFileMove.enabled": "always", - "cSpell.words": ["Starsky"] + "cSpell.words": ["Starsky"], + "testing.openTesting": "neverOpen" } }