Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: Rename Preferences to Settings#1487

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 3 commits intomainfrombq/chore-update-preferences-to-settings
May 16, 2022
Merged
Show file tree
Hide file tree
Changes fromall 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
8 changes: 4 additions & 4 deletionssite/src/AppRouter.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
import React from "react"
import { Route, Routes } from "react-router-dom"
import { AuthAndFrame } from "./components/AuthAndFrame/AuthAndFrame"
import { PreferencesLayout } from "./components/PreferencesLayout/PreferencesLayout"
import { RequireAuth } from "./components/RequireAuth/RequireAuth"
import { SettingsLayout } from "./components/SettingsLayout/SettingsLayout"
import { IndexPage } from "./pages"
import { NotFoundPage } from "./pages/404Page/404Page"
import { CliAuthenticationPage } from "./pages/CliAuthPage/CliAuthPage"
import { HealthzPage } from "./pages/HealthzPage/HealthzPage"
import { LoginPage } from "./pages/LoginPage/LoginPage"
import { OrgsPage } from "./pages/OrgsPage/OrgsPage"
import { AccountPage } from "./pages/PreferencesPages/AccountPage/AccountPage"
import { SSHKeysPage } from "./pages/PreferencesPages/SSHKeysPage/SSHKeysPage"
import { SettingsPage } from "./pages/SettingsPage/SettingsPage"
import { AccountPage } from "./pages/SettingsPages/AccountPage/AccountPage"
import { SSHKeysPage } from "./pages/SettingsPages/SSHKeysPage/SSHKeysPage"
import { CreateWorkspacePage } from "./pages/TemplatesPages/OrganizationPage/TemplatePage/CreateWorkspacePage"
import { TemplatePage } from "./pages/TemplatesPages/OrganizationPage/TemplatePage/TemplatePage"
import { TemplatesPage } from "./pages/TemplatesPages/TemplatesPage"
Expand DownExpand Up@@ -131,7 +131,7 @@ export const AppRouter: React.FC = () => (
}
/>

<Route path="preferences" element={<PreferencesLayout />}>
<Route path="settings" element={<SettingsLayout />}>
<Route path="account" element={<AccountPage />} />
<Route path="ssh-keys" element={<SSHKeysPage />} />
</Route>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ export const Language = {
emailLabel: "Email",
emailInvalid: "Please enter a valid email address.",
emailRequired: "Please enter an email address.",
updatePreferences: "Updatepreferences",
updateSettings: "Updatesettings",
}

const validationSchema = Yup.object({
Expand DownExpand Up@@ -73,7 +73,7 @@ export const AccountForm: React.FC<AccountFormProps> = ({

<div>
<LoadingButton color="primary" loading={isLoading} type="submit" variant="contained">
{isLoading ? "" : Language.updatePreferences}
{isLoading ? "" : Language.updateSettings}
</LoadingButton>
</div>
</Stack>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,20 +8,20 @@ import { TabPanel } from "../TabPanel/TabPanel"
export const Language = {
accountLabel: "Account",
sshKeysLabel: "SSH Keys",
preferencesLabel: "Preferences",
settingsLabel: "Settings",
}

const menuItems = [
{ label: Language.accountLabel, path: "/preferences/account" },
{ label: Language.sshKeysLabel, path: "/preferences/ssh-keys" },
{ label: Language.accountLabel, path: "/settings/account" },
{ label: Language.sshKeysLabel, path: "/settings/ssh-keys" },
]

export constPreferencesLayout: React.FC = () => {
export constSettingsLayout: React.FC = () => {
return (
<AuthAndFrame>
<Box display="flex" flexDirection="column">
<Margins>
<TabPanel title={Language.preferencesLabel} menuItems={menuItems}>
<TabPanel title={Language.settingsLabel} menuItems={menuItems}>
<Outlet />
</TabPanel>
</Margins>
Expand Down
2 changes: 1 addition & 1 deletionsite/src/components/UserDropdown/UserDropdown.test.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,6 +63,6 @@ describe("UserDropdown", () => {
throw new Error("Anchor tag not found for the account menu item")
}

expect(link.getAttribute("href")).toBe("/preferences/account")
expect(link.getAttribute("href")).toBe("/settings/account")
})
})
2 changes: 1 addition & 1 deletionsite/src/components/UserDropdown/UsersDropdown.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,7 +68,7 @@ export const UserDropdown: React.FC<UserDropdownProps> = ({ user, onSignOut }: U

<Divider />

<Link to="/preferences/account" className={styles.link}>
<Link to="/settings/account" className={styles.link}>
<MenuItem className={styles.menuItem} onClick={onPopoverClose}>
<ListItemIcon className={styles.icon}>
<AccountIcon />
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { fireEvent, screen, waitFor } from "@testing-library/react"
import React from "react"
import * as API from "../../../api/api"
import { GlobalSnackbar } from "../../../components/GlobalSnackbar/GlobalSnackbar"
import * as AccountForm from "../../../components/PreferencesAccountForm/PreferencesAccountForm"
import * as AccountForm from "../../../components/SettingsAccountForm/SettingsAccountForm"
import { renderWithAuth } from "../../../testHelpers/renderHelpers"
import * as AuthXService from "../../../xServices/auth/authXService"
import { AccountPage, Language } from "./AccountPage"
Expand All@@ -25,7 +25,7 @@ const fillAndSubmitForm = async () => {
await waitFor(() => screen.findByLabelText("Email"))
fireEvent.change(screen.getByLabelText("Email"), { target: { value: newData.email } })
fireEvent.change(screen.getByLabelText("Username"), { target: { value: newData.username } })
fireEvent.click(screen.getByText(AccountForm.Language.updatePreferences))
fireEvent.click(screen.getByText(AccountForm.Language.updateSettings))
}

describe("AccountPage", () => {
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useActor } from "@xstate/react"
import React, { useContext } from "react"
import { isApiError, mapApiErrorToFieldErrors } from "../../../api/errors"
import { AccountForm } from "../../../components/PreferencesAccountForm/PreferencesAccountForm"
import { Section } from "../../../components/Section/Section"
import { AccountForm } from "../../../components/SettingsAccountForm/SettingsAccountForm"
import { XServiceContext } from "../../../xServices/StateContext"

export const Language = {
Expand Down
2 changes: 1 addition & 1 deletionsite/src/xServices/auth/authXService.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ import * as TypesGen from "../../api/typesGenerated"
import { displayError, displaySuccess } from "../../components/GlobalSnackbar/utils"

export const Language = {
successProfileUpdate: "Updatedpreferences.",
successProfileUpdate: "Updatedsettings.",
successRegenerateSSHKey: "SSH Key regenerated successfully",
errorRegenerateSSHKey: "Error on regenerate the SSH Key",
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp