Skip to content

Feature/popup option details #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion popup/components/sections/Features.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
import Section from "../layout/Section";
import SwitchControl from "../controls/SwitchControl";
import { RiQuestionLine } from "@remixicon/react";
import { Tooltip } from "react-tooltip";

const Layout = () => (
<Section title="Funcionalidades">
<SwitchControl label="Relembrar utilizador" storageKey="autoLogin" />
<SwitchControl
label={
<>
Relembrar utilizador
<span className="question-icon">
<RiQuestionLine data-tooltip-id="autoLogin-tooltip" />
</span>
<Tooltip

Check failure on line 15 in popup/components/sections/Features.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Delete `·`
className="tooltip"
id="autoLogin-tooltip"

Check failure on line 17 in popup/components/sections/Features.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Delete `·`
content={ <> Depois de ativada a opção, <br />o login deve ser feito pelas credenciais <br /> não pela autenticação federada. </>}

Check failure on line 18 in popup/components/sections/Features.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Replace `·<>·Depois·de·ativada·a·opção,·<br·/>o·login·deve·ser·feito·pelas·credenciais·<br·/>·não·pela·autenticação·federada.·</>}·` with `⏎····························<>⏎································{"·"}⏎································Depois·de·ativada·a·opção,·<br·/>o·login·deve⏎································ser·feito·pelas·credenciais·<br·/>·não·pela⏎································autenticação·federada.{"·"}⏎····························</>⏎························}`
place="top"
/>
</>
}
storageKey="autoLogin"
/>
</Section>
);

Expand Down
56 changes: 53 additions & 3 deletions popup/components/sections/Layout.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,61 @@
import Section from "../layout/Section";
import SwitchControl from "../controls/SwitchControl";
import { RiQuestionLine } from "@remixicon/react";
import { Tooltip } from "react-tooltip";

const Layout = () => (
<Section title="Aspetos Visuais">
<SwitchControl label="Ativar barra de navegação" storageKey="navbar" />
<SwitchControl label="Esconder atalhos" storageKey="shortcuts" />
<SwitchControl label="Mudar fonte de letra" storageKey="font" />
<SwitchControl
label={
<>
Ativar barra de navegação
<span className="question-icon">
<RiQuestionLine data-tooltip-id="navbar-tooltip" />
</span>
<Tooltip

Check failure on line 15 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Delete `·`
className="tooltip"
id="navbar-tooltip"

Check failure on line 17 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Delete `·`
content={ <> Muda as opções da barra <br /> lateral para a parte superior. </>}

Check failure on line 18 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Replace `·<>·Muda·as·opções·da·barra·<br·/>·lateral·para·a·parte·superior.·</>}·` with `⏎····························<>⏎································{"·"}⏎································Muda·as·opções·da·barra·<br·/>·lateral·para·a⏎································parte·superior.{"·"}⏎····························</>⏎························}`
place="top"
/>
</>
}
storageKey="navbar"
/>
<SwitchControl
label={
<>
Esconder atalhos
<span className="question-icon">
<RiQuestionLine data-tooltip-id="shortcuts-tooltip"/>

Check failure on line 30 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Insert `·`
</span>
<Tooltip

Check failure on line 32 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Delete `·`
className="tooltip"
id="shortcuts-tooltip"

Check failure on line 34 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Delete `·`
content={ <> Esconde a opção dos atalhos. </>}

Check failure on line 35 in popup/components/sections/Layout.js

View workflow job for this annotation

GitHub Actions / Lint Javascript code

Replace `·<>·Esconde·a·opção·dos·atalhos.·</>}·` with `<>·Esconde·a·opção·dos·atalhos.·</>}`
place="top"
/>
</>
}
storageKey="shortcuts"
/>
<SwitchControl
label={
<>
Mudar fonte de letra
<span className="question-icon">
<RiQuestionLine data-tooltip-id="font-tooltip"/>
</span>
<Tooltip
className="tooltip"
id="font-tooltip"
content={ <> Muda a fonte do texto para Roboto. </>}
place="top"
/>
</>
}
storageKey="font"
/>
</Section>
);

Expand Down
4 changes: 3 additions & 1 deletion popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@radix-ui/react-slider": "^0.1.3",
"@radix-ui/react-switch": "^0.1.4",
"@radix-ui/react-toggle": "^0.1.3",
"@remixicon/react": "^4.4.0",
"@stitches/react": "^1.2.6",
"@uiw/react-codemirror": "^4.19.6",
"lodash.debounce": "^4.0.8",
Expand All @@ -25,7 +26,8 @@
"next": "12.0.7",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hot-toast": "^2.4.1"
"react-hot-toast": "^2.4.1",
"react-tooltip": "^5.28.0"
},
"devDependencies": {
"autoprefixer": "^10.4.1",
Expand Down
8 changes: 8 additions & 0 deletions popup/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ textarea,
select {
font: inherit;
}

.question-icon {
display: inline-block;
transform: scale(0.8);
margin-right: 4px;
vertical-align: top;
color: grey;
}
57 changes: 57 additions & 0 deletions popup/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,32 @@ __metadata:
languageName: node
linkType: hard

"@floating-ui/core@npm:^1.6.0":
version: 1.6.8
resolution: "@floating-ui/core@npm:1.6.8"
dependencies:
"@floating-ui/utils": "npm:^0.2.8"
checksum: 10c0/d6985462aeccae7b55a2d3f40571551c8c42bf820ae0a477fc40ef462e33edc4f3f5b7f11b100de77c9b58ecb581670c5c3f46d0af82b5e30aa185c735257eb9
languageName: node
linkType: hard

"@floating-ui/dom@npm:^1.6.1":
version: 1.6.12
resolution: "@floating-ui/dom@npm:1.6.12"
dependencies:
"@floating-ui/core": "npm:^1.6.0"
"@floating-ui/utils": "npm:^0.2.8"
checksum: 10c0/c67b39862175b175c6ac299ea970f17a22c7482cfdf3b1bc79313407bf0880188b022b878953fa69d3ce166ff2bd9ae57c86043e5dd800c262b470d877591b7d
languageName: node
linkType: hard

"@floating-ui/utils@npm:^0.2.8":
version: 0.2.8
resolution: "@floating-ui/utils@npm:0.2.8"
checksum: 10c0/a8cee5f17406c900e1c3ef63e3ca89b35e7a2ed645418459a73627b93b7377477fc888081011c6cd177cac45ec2b92a6cab018c14ea140519465498dddd2d3f9
languageName: node
linkType: hard

"@hapi/accept@npm:5.0.2":
version: 5.0.2
resolution: "@hapi/accept@npm:5.0.2"
Expand Down Expand Up @@ -787,6 +813,15 @@ __metadata:
languageName: node
linkType: hard

"@remixicon/react@npm:^4.4.0":
version: 4.5.0
resolution: "@remixicon/react@npm:4.5.0"
peerDependencies:
react: ">=18.2.0"
checksum: 10c0/90b8821862dbd3e22a91b848b43e631aa62dc8ed24381d755d07a66f994e8af46ee90842aa70c8cc86e7fe7d20a148f7e4d6ed7e5c73c1eb35ca102244788fd1
languageName: node
linkType: hard

"@stitches/react@npm:^1.2.6":
version: 1.2.8
resolution: "@stitches/react@npm:1.2.8"
Expand Down Expand Up @@ -1337,6 +1372,13 @@ __metadata:
languageName: node
linkType: hard

"classnames@npm:^2.3.0":
version: 2.5.1
resolution: "classnames@npm:2.5.1"
checksum: 10c0/afff4f77e62cea2d79c39962980bf316bacb0d7c49e13a21adaadb9221e1c6b9d3cdb829d8bb1b23c406f4e740507f37e1dcf506f7e3b7113d17c5bab787aa69
languageName: node
linkType: hard

"clean-stack@npm:^2.0.0":
version: 2.2.0
resolution: "clean-stack@npm:2.2.0"
Expand Down Expand Up @@ -2844,6 +2886,7 @@ __metadata:
"@radix-ui/react-slider": "npm:^0.1.3"
"@radix-ui/react-switch": "npm:^0.1.4"
"@radix-ui/react-toggle": "npm:^0.1.3"
"@remixicon/react": "npm:^4.4.0"
"@stitches/react": "npm:^1.2.6"
"@uiw/react-codemirror": "npm:^4.19.6"
autoprefixer: "npm:^10.4.1"
Expand All @@ -2855,6 +2898,7 @@ __metadata:
react: "npm:17.0.2"
react-dom: "npm:17.0.2"
react-hot-toast: "npm:^2.4.1"
react-tooltip: "npm:^5.28.0"
tailwindcss: "npm:^3.0.12"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -3382,6 +3426,19 @@ __metadata:
languageName: node
linkType: hard

"react-tooltip@npm:^5.28.0":
version: 5.28.0
resolution: "react-tooltip@npm:5.28.0"
dependencies:
"@floating-ui/dom": "npm:^1.6.1"
classnames: "npm:^2.3.0"
peerDependencies:
react: ">=16.14.0"
react-dom: ">=16.14.0"
checksum: 10c0/817909584adf4d84d70768e41c7fdf66bf9affd980499742a2da54378e5c8be53a0867bf72bdfb441fa4aa35c79847585990b6e31c91e6647e789ba68e9b08a2
languageName: node
linkType: hard

"react@npm:17.0.2":
version: 17.0.2
resolution: "react@npm:17.0.2"
Expand Down
Loading