-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04c77ce
commit b1056d6
Showing
12 changed files
with
91 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,7 @@ export const enObj: I18nObjects = { | |
], | ||
}, | ||
editorTutorials: { | ||
mockDataUrl: "https://63621db87521369cd06514c2.mockapi.io/api/openblocks/users", | ||
mockScript: "return new Promise(r => {\n setTimeout(() => r([\n { name: \"Ron Cormier\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1199.jpg\", city: \"Port Isadore\", email: \"[email protected]\", createAt: \"2022-11-01T10:29:17.119Z\", id: 1 },\n { name: \"Glen Quitzon\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/729.jpg\", city: \"Sporerside\", email: \"[email protected]\", createAt: \"2022-11-01T16:42:37.766Z\", id: 2 },\n { name: \"Tamara Kreiger III\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/992.jpg\", city: \"West Maryam\", email: \"[email protected]\", createAt: \"2022-11-01T19:58:12.285Z\", id: 3 },\n { name: \"Edgar Stokes\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/25.jpg\", city: \"North Richland Hills\", email: \"[email protected]\", createAt: \"2022-11-01T23:39:32.720Z\", id: 4 },\n ]), 500)\n})", | ||
data: (code) => ( | ||
<> | ||
The component and query data are listed here, which can be referenced through | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
/* eslint-disable only-ascii/only-ascii */ | ||
import { enObj } from "./enObj"; | ||
import { I18nObjects } from "./types"; | ||
|
||
export const ptObj: I18nObjects = enObj; | ||
export const ptObj: I18nObjects = { | ||
...enObj, | ||
editorTutorials: { | ||
mockScript: "return new Promise(r => {\n setTimeout(() => r([\n { name: \"Ron Cormier\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1199.jpg\", city: \"Port Isadore\", email: \"[email protected]\", createAt: \"2022-11-01T10:29:17.119Z\", id: 1 },\n { name: \"Glen Quitzon\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/729.jpg\", city: \"Sporerside\", email: \"[email protected]\", createAt: \"2022-11-01T16:42:37.766Z\", id: 2 },\n { name: \"Tamara Kreiger III\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/992.jpg\", city: \"West Maryam\", email: \"[email protected]\", createAt: \"2022-11-01T19:58:12.285Z\", id: 3 },\n { name: \"Edgar Stokes\", avatar: \"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/25.jpg\", city: \"North Richland Hills\", email: \"[email protected]\", createAt: \"2022-11-01T23:39:32.720Z\", id: 4 },\n ]), 500)\n})", | ||
data: (code) => ( | ||
<> | ||
O componente e os dados da consulta estão listados aqui, os quais podem ser referenciados por | ||
{code("{{ }}")}. Por exemplo: {code("{{table1.selectedRow}}")}. | ||
</> | ||
), | ||
compProperties: (code) => ( | ||
<> | ||
Quando um componente é selecionado, as propriedades dele são mostradas no painel direito | ||
{code("{{query1.data}}")}. Para referenciar os dados já consultados, você pode usar na caixa de texto | ||
{code("{{ }}")} | ||
o seguinte JavaScript. | ||
</> | ||
), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import currentUser from "./currentUser"; | ||
import markStatus from "./mark-status"; | ||
import me from "./me"; | ||
import password from "./password"; | ||
|
||
export default [...currentUser, ...me, ...password]; | ||
export default [...currentUser, ...markStatus, ...me, ...password]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { auth, users } from "@/api"; | ||
import { mocker } from "@/mocker"; | ||
import { | ||
adminRoute, | ||
createDefaultErrorResponse, | ||
createDefaultResponse, | ||
} from "@/utils"; | ||
|
||
export default [ | ||
mocker.put( | ||
"/api/users/mark-status", | ||
adminRoute(async (req) => { | ||
const { type, value } = req.config.data; | ||
if (type === "newUserGuidance") { | ||
const authResponse = await auth.getCurrentUser(); | ||
if (!authResponse.data) { | ||
return createDefaultErrorResponse([{ status: 401 }]); | ||
} | ||
const updateUserResponse = await users.update({ | ||
id: authResponse.data.id, | ||
show_tutorial: !value, | ||
}); | ||
if (updateUserResponse.status === 200) { | ||
return createDefaultResponse(); | ||
} | ||
return createDefaultErrorResponse([updateUserResponse]); | ||
} | ||
return createDefaultResponse(); | ||
}), | ||
), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters