merge from local

This commit is contained in:
SrGooglo 2024-09-16 10:19:14 +00:00
parent 31906dc5c4
commit 576f99d325
85 changed files with 334 additions and 215 deletions

View File

@ -5,7 +5,7 @@ export default {
if (text) { if (text) {
items.push({ items.push({
label: "Copy", label: "Copy",
icon: "Copy", icon: "FiCopy",
action: (clickedItem, ctx) => { action: (clickedItem, ctx) => {
copyToClipboard(text) copyToClipboard(text)
@ -16,7 +16,7 @@ export default {
items.push({ items.push({
label: "Paste", label: "Paste",
icon: "Clipboard", icon: "FiClipboard",
action: (clickedItem, ctx) => { action: (clickedItem, ctx) => {
app.message.error("This action is not supported by your browser") app.message.error("This action is not supported by your browser")
@ -26,7 +26,7 @@ export default {
items.push({ items.push({
label: "Report a bug", label: "Report a bug",
icon: "AlertTriangle", icon: "FiAlertTriangle",
action: (clickedItem, ctx) => { action: (clickedItem, ctx) => {
app.eventBus.emit("app.reportBug", { app.eventBus.emit("app.reportBug", {
clickedItem, clickedItem,

View File

@ -5,7 +5,7 @@ export default {
"post-card": (items, parent, element, control) => { "post-card": (items, parent, element, control) => {
items.push({ items.push({
label: "Copy ID", label: "Copy ID",
icon: "Copy", icon: "FiCopy",
action: () => { action: () => {
copyToClipboard(parent.id) copyToClipboard(parent.id)
control.close() control.close()
@ -14,7 +14,7 @@ export default {
items.push({ items.push({
label: "Copy Link", label: "Copy Link",
icon: "Link", icon: "FiLink",
action: () => { action: () => {
copyToClipboard(`${window.location.origin}/post/${parent.id}`) copyToClipboard(`${window.location.origin}/post/${parent.id}`)
control.close() control.close()
@ -39,7 +39,7 @@ export default {
items.push({ items.push({
label: "Copy media URL", label: "Copy media URL",
icon: "Copy", icon: "FiCopy",
action: () => { action: () => {
copyToClipboard(media.src) copyToClipboard(media.src)
control.close() control.close()
@ -48,7 +48,7 @@ export default {
items.push({ items.push({
label: "Open media in new tab", label: "Open media in new tab",
icon: "ExternalLink", icon: "FiExternalLink",
action: () => { action: () => {
window.open(media.src, "_blank") window.open(media.src, "_blank")
control.close() control.close()
@ -57,7 +57,7 @@ export default {
items.push({ items.push({
label: "Download media", label: "Download media",
icon: "Download", icon: "FiDownload",
action: () => { action: () => {
download(media.src) download(media.src)
control.close() control.close()

View File

@ -1,19 +1,19 @@
{ {
"general": { "general": {
"title": "General", "title": "General",
"icon": "Settings" "icon": "FiSettings"
}, },
"notifications": { "notifications": {
"title": "Notifications", "title": "Notifications",
"icon": "Bell" "icon": "FiBell"
}, },
"sidebar": { "sidebar": {
"title": "Sidebar", "title": "Sidebar",
"icon": "Layout" "icon": "FiLayout"
}, },
"aspect": { "aspect": {
"title": "Aspect", "title": "Aspect",
"icon": "Eye" "icon": "FiEye"
}, },
"animations": { "animations": {
"title": "Animations", "title": "Animations",
@ -21,23 +21,23 @@
}, },
"security.account": { "security.account": {
"title": "Account Security", "title": "Account Security",
"icon": "Lock" "icon": "FiLock"
}, },
"security.other": { "security.other": {
"title": "Others", "title": "Others",
"icon": "MoreHorizontal" "icon": "FiMoreHorizontal"
}, },
"account.basicInfo": { "account.basicInfo": {
"title": "Basic Information", "title": "Basic Information",
"icon": "Info" "icon": "FiInfo"
}, },
"account.profile": { "account.profile": {
"title": "Profile", "title": "Profile",
"icon": "Book" "icon": "FiBook"
}, },
"layout": { "layout": {
"title": "Layout", "title": "Layout",
"icon": "Layers" "icon": "FiLayers"
}, },
"posts": { "posts": {
"title": "Posts", "title": "Posts",
@ -53,7 +53,7 @@
}, },
"ui.sounds": { "ui.sounds": {
"title": "UI Sounds", "title": "UI Sounds",
"icon": "Volume2" "icon": "FiVolume2"
}, },
"privacy.general": { "privacy.general": {
"title": "Privacy", "title": "Privacy",

View File

@ -2,23 +2,23 @@
{ {
"id": "search", "id": "search",
"label": "Search", "label": "Search",
"icon": "Search" "icon": "FiSearch"
}, },
{ {
"id": "messages", "id": "messages",
"label": "Messages", "label": "Messages",
"icon": "MessageCircle", "icon": "FiMessageCircle",
"path": "/messages" "path": "/messages"
}, },
{ {
"id": "notifications", "id": "notifications",
"label": "Notifications", "label": "Notifications",
"icon": "Bell" "icon": "FiBell"
}, },
{ {
"id": "settings", "id": "settings",
"label": "Settings", "label": "Settings",
"icon": "Settings", "icon": "FiSettings",
"path": "/settings" "path": "/settings"
} }
] ]

View File

@ -16,9 +16,9 @@
}, },
"dependencies": { "dependencies": {
"@ant-design/icons": "^5.4.0", "@ant-design/icons": "^5.4.0",
"@capacitor/assets": "^2.0.4",
"@capacitor/android": "^5.0.5", "@capacitor/android": "^5.0.5",
"@capacitor/app": "^5.0.3", "@capacitor/app": "^5.0.3",
"@capacitor/assets": "^2.0.4",
"@capacitor/cli": "^5.0.5", "@capacitor/cli": "^5.0.5",
"@capacitor/core": "^5.0.5", "@capacitor/core": "^5.0.5",
"@capacitor/haptics": "1.1.4", "@capacitor/haptics": "1.1.4",
@ -94,4 +94,4 @@
"vaul": "^0.9.2", "vaul": "^0.9.2",
"vite": "^5.4.4" "vite": "^5.4.4"
} }
} }

View File

@ -14,6 +14,8 @@ import { StatusBar, Style } from "@capacitor/status-bar"
import { App as CapacitorApp } from "@capacitor/app" import { App as CapacitorApp } from "@capacitor/app"
import { CapacitorUpdater } from "@capgo/capacitor-updater" import { CapacitorUpdater } from "@capgo/capacitor-updater"
import AppsMenu from "@components/AppMenu"
import AuthModel from "@models/auth" import AuthModel from "@models/auth"
import SessionModel from "@models/session" import SessionModel from "@models/session"
import UserModel from "@models/user" import UserModel from "@models/user"
@ -119,6 +121,9 @@ class ComtyApp extends React.Component {
} }
}) })
}, },
openAppsMenu: () => {
app.layout.drawer.open("apps", AppsMenu)
},
openRegisterForm: async (options = {}) => { openRegisterForm: async (options = {}) => {
app.layout.drawer.open("Register", UserRegister, { app.layout.drawer.open("Register", UserRegister, {
defaultLocked: options.defaultLocked ?? false, defaultLocked: options.defaultLocked ?? false,
@ -371,6 +376,10 @@ class ComtyApp extends React.Component {
} }
initialization = async () => { initialization = async () => {
// await new Promise((resolve) => {
// setTimeout(resolve, 8000)
// })
app.eventBus.emit("app.initialization.start") app.eventBus.emit("app.initialization.start")
console.debug(`[App] Initializing app`) console.debug(`[App] Initializing app`)

View File

@ -38,7 +38,7 @@ export default (props) => {
</div> </div>
<div className="indicator"> <div className="indicator">
<Icons.Target /> <span>Featured event</span> <Icons.FiTarget /> <span>Featured event</span>
</div> </div>
</div> </div>
} }

View File

@ -76,7 +76,7 @@ export default (props) => {
if (followers.length === 0) { if (followers.length === 0) {
return <antd.Result return <antd.Result
icon={<Icons.UserX style={{ fontSize: "50px" }} />} icon={<Icons.FiUserX style={{ fontSize: "50px" }} />}
> >
<h2> <h2>
It's seems this user has no followers, yet. It's seems this user has no followers, yet.

View File

@ -5,7 +5,7 @@ import VerifiedBadge from "./customIcons/verifiedBadge"
import Crown from "./customIcons/crown" import Crown from "./customIcons/crown"
// import icons lib // import icons lib
import * as lib1 from "feather-reactjs" import * as lib1 from "react-icons/fi"
import * as lib2 from "@ant-design/icons" import * as lib2 from "@ant-design/icons"
import * as lib3 from "react-icons/md" import * as lib3 from "react-icons/md"
import * as lib4 from "react-icons/io" import * as lib4 from "react-icons/io"

View File

@ -234,6 +234,7 @@ class Login extends React.Component {
</div> </div>
</div> </div>
} }
return <div className="login_wrapper"> return <div className="login_wrapper">
<div className="content"> <div className="content">
<h1> <h1>
@ -256,7 +257,7 @@ class Login extends React.Component {
name="username" name="username"
className="field" className="field"
> >
<span><Icons.Mail /> Username or Email</span> <span><Icons.FiMail /> Username or Email</span>
<antd.Input <antd.Input
placeholder="myusername / myemail@example.com" placeholder="myusername / myemail@example.com"
onChange={(e) => this.onUpdateInput("username", e.target.value)} onChange={(e) => this.onUpdateInput("username", e.target.value)}
@ -275,7 +276,7 @@ class Login extends React.Component {
} }
)} )}
> >
<span><Icons.Lock /> Password</span> <span><Icons.FiLock /> Password</span>
<antd.Input.Password <antd.Input.Password
//placeholder="********" //placeholder="********"
onChange={(e) => this.onUpdateInput("password", e.target.value)} onChange={(e) => this.onUpdateInput("password", e.target.value)}
@ -292,7 +293,7 @@ class Login extends React.Component {
} }
)} )}
> >
<span><Icons.Lock /> Verification Code</span> <span><Icons.FiLock /> Verification Code</span>
{ {
this.state.mfa_required && <> this.state.mfa_required && <>

View File

@ -148,7 +148,7 @@ const ReleaseEditor = (props) => {
{ {
customPage.props?.onSave && <antd.Button customPage.props?.onSave && <antd.Button
type="primary" type="primary"
icon={<Icons.Save />} icon={<Icons.FiSave />}
onClick={() => customPage.props.onSave()} onClick={() => customPage.props.onSave()}
> >
Save Save
@ -179,7 +179,7 @@ const ReleaseEditor = (props) => {
<antd.Button <antd.Button
type="primary" type="primary"
onClick={handleSubmit} onClick={handleSubmit}
icon={<Icons.Save />} icon={<Icons.FiSave />}
disabled={submitting || loading || !canFinish()} disabled={submitting || loading || !canFinish()}
loading={submitting} loading={submitting}
> >

View File

@ -67,7 +67,7 @@ const TrackListItem = (props) => {
<div className="music-studio-release-editor-tracks-list-item-actions"> <div className="music-studio-release-editor-tracks-list-item-actions">
<antd.Button <antd.Button
type="ghost" type="ghost"
icon={<Icons.Edit2 />} icon={<Icons.FiEdit2 />}
onClick={onClickEditTrack} onClick={onClickEditTrack}
/> />

View File

@ -314,7 +314,7 @@ class TracksManager extends React.Component {
this.state.list.length === 0 ? this.state.list.length === 0 ?
<UploadHint /> : <antd.Button <UploadHint /> : <antd.Button
className="uploadMoreButton" className="uploadMoreButton"
icon={<Icons.Plus />} icon={<Icons.FiPlus />}
> >
Add another Add another
</antd.Button> </antd.Button>

View File

@ -95,7 +95,7 @@ const TrackEditor = (props) => {
<div className="track-editor-field"> <div className="track-editor-field">
<div className="track-editor-field-header"> <div className="track-editor-field-header">
<Icons.User /> <Icons.FiUser />
<span>Artist</span> <span>Artist</span>
</div> </div>

View File

@ -173,7 +173,7 @@ export class BackgroundMediaPlayer extends React.Component {
size="small" size="small"
shape="rounded" shape="rounded"
type="ghost" type="ghost"
icon={<Icons.ChevronRight />} icon={<Icons.FiChevronRight />}
onClick={app.cores.player.playback.next} onClick={app.cores.player.playback.next}
/> />
@ -181,7 +181,7 @@ export class BackgroundMediaPlayer extends React.Component {
size="small" size="small"
shape="rounded" shape="rounded"
type="ghost" type="ghost"
icon={<Icons.Minimize />} icon={<Icons.FiMinimize />}
onClick={this.onClickMinimize} onClick={this.onClickMinimize}
/> />
</div> </div>

View File

@ -57,7 +57,7 @@ const Controls = (props) => {
<antd.Button <antd.Button
type="ghost" type="ghost"
shape="round" shape="round"
icon={<Icons.ChevronLeft />} icon={<Icons.FiChevronLeft />}
onClick={() => handleAction("previous")} onClick={() => handleAction("previous")}
disabled={ctx.control_locked} disabled={ctx.control_locked}
/> />
@ -81,7 +81,7 @@ const Controls = (props) => {
<antd.Button <antd.Button
type="ghost" type="ghost"
shape="round" shape="round"
icon={<Icons.ChevronRight />} icon={<Icons.FiChevronRight />}
onClick={() => handleAction("next")} onClick={() => handleAction("next")}
disabled={ctx.control_locked} disabled={ctx.control_locked}
/> />
@ -108,8 +108,8 @@ const Controls = (props) => {
> >
{ {
ctx.muted ctx.muted
? <Icons.VolumeX /> ? <Icons.FiVolumeX />
: <Icons.Volume2 /> : <Icons.FiVolume2 />
} }
</button> </button>
</antd.Popover> </antd.Popover>

View File

@ -128,7 +128,7 @@ const Player = (props) => {
</antd.Button> */} </antd.Button> */}
<antd.Button <antd.Button
icon={<Icons.X />} icon={<Icons.FiX />}
shape="circle" shape="circle"
onClick={() => app.cores.player.close()} onClick={() => app.cores.player.close()}
/> />

View File

@ -14,14 +14,14 @@ const SelfActionsItems = [
{ {
key: "onClickEdit", key: "onClickEdit",
label: <> label: <>
<Icons.Edit /> <Icons.FiEdit />
<span>Edit</span> <span>Edit</span>
</>, </>,
}, },
{ {
key: "onClickDelete", key: "onClickDelete",
label: <> label: <>
<Icons.Trash /> <Icons.FiTrash />
<span>Delete</span> <span>Delete</span>
</>, </>,
}, },
@ -41,7 +41,7 @@ const MoreActionsItems = [
{ {
key: "onClickShare", key: "onClickShare",
label: <> label: <>
<Icons.Share /> <Icons.FiShare />
<span>Share</span> <span>Share</span>
</>, </>,
}, },
@ -51,7 +51,7 @@ const MoreActionsItems = [
{ {
key: "onClickReport", key: "onClickReport",
label: <> label: <>
<Icons.AlertTriangle /> <Icons.FiAlertTriangle />
<span>Report</span> <span>Report</span>
</>, </>,
}, },
@ -122,7 +122,7 @@ export default (props) => {
}} }}
> >
<div className="icon"> <div className="icon">
<Icons.MoreHorizontal /> <Icons.FiMoreHorizontal />
</div> </div>
</Dropdown> </Dropdown>
</div> </div>

View File

@ -12,7 +12,7 @@ export default (props) => {
type="ghost" type="ghost"
shape="circle" shape="circle"
onClick={props.onClick} onClick={props.onClick}
icon={<Icons.Repeat />} icon={<Icons.FiRepeat />}
/> />
{ {
props.count > 0 && <span className="replies_count">{props.count}</span> props.count > 0 && <span className="replies_count">{props.count}</span>

View File

@ -21,7 +21,7 @@ const PostCardHeader = (props) => {
className="post-header-replied_to" className="post-header-replied_to"
> >
<div className="post-header-replied_to-label"> <div className="post-header-replied_to-label">
<Icons.Repeat /> <Icons.FiRepeat />
<span> <span>
Replied to Replied to

View File

@ -154,7 +154,7 @@ export default class PostCard extends React.PureComponent {
return <div className="postCard error"> return <div className="postCard error">
<h1> <h1>
<Icons.AlertTriangle /> <Icons.FiAlertTriangle />
<span>Cannot render this post</span> <span>Cannot render this post</span>
<span> <span>
Maybe this version of the app is outdated or is not supported yet Maybe this version of the app is outdated or is not supported yet

View File

@ -399,7 +399,7 @@ export default class PostCreator extends React.Component {
> >
<antd.Button <antd.Button
type="link" type="link"
icon={<Icons.Trash />} icon={<Icons.FiTrash />}
/> />
</antd.Popconfirm> </antd.Popconfirm>
} }
@ -583,7 +583,7 @@ export default class PostCreator extends React.Component {
type="primary" type="primary"
disabled={loading || !this.canSubmit()} disabled={loading || !this.canSubmit()}
onClick={this.debounceSubmit} onClick={this.debounceSubmit}
icon={loading ? <Icons.LoadingOutlined spin /> : (editMode ? <Icons.MdEdit /> : <Icons.Send />)} icon={loading ? <Icons.LoadingOutlined spin /> : (editMode ? <Icons.MdEdit /> : <Icons.FiSend />)}
/> />
</div> </div>
</div> </div>
@ -619,12 +619,12 @@ export default class PostCreator extends React.Component {
<antd.Button <antd.Button
type="ghost" type="ghost"
onClick={this.handleUploadClick} onClick={this.handleUploadClick}
icon={<Icons.Upload />} icon={<Icons.FiUpload />}
/> />
<antd.Button <antd.Button
type="ghost" type="ghost"
icon={<Icons.MdPoll />} icon={<Icons.FiMdPoll />}
onClick={this.handleAddPoll} onClick={this.handleAddPoll}
/> />
</div> </div>

View File

@ -71,7 +71,7 @@ const PostList = React.forwardRef((props, ref) => {
shape="round" shape="round"
onClick={props.onResumeRealtimeUpdates} onClick={props.onResumeRealtimeUpdates}
loading={props.resumingLoading} loading={props.resumingLoading}
icon={<Icons.SyncOutlined />} icon={<Icons.FiSyncOutlined />}
> >
Resume Resume
</antd.Button> </antd.Button>

View File

@ -17,7 +17,7 @@ import "./index.less"
const ResultsTypeDecorators = { const ResultsTypeDecorators = {
users: { users: {
icon: "Users", icon: "FiUsers",
label: "Users", label: "Users",
onClick: (item) => { onClick: (item) => {
app.navigation.goToAccount(item.username) app.navigation.goToAccount(item.username)
@ -31,7 +31,7 @@ const ResultsTypeDecorators = {
} }
}, },
tracks: { tracks: {
icon: "Album", icon: "FiAlbum",
label: "Tracks", label: "Tracks",
renderItem: (props) => { renderItem: (props) => {
const { item, onClick } = props const { item, onClick } = props
@ -42,7 +42,7 @@ const ResultsTypeDecorators = {
} }
}, },
playlists: { playlists: {
icon: "Album", icon: "FiAlbum",
label: "Playlists", label: "Playlists",
renderItem: (props) => { renderItem: (props) => {
return <div className="suggestion"> return <div className="suggestion">
@ -232,7 +232,7 @@ export default (props) => {
placeholder="Start typing to search..." placeholder="Start typing to search..."
onChange={handleOnSearch} onChange={handleOnSearch}
value={searchValue} value={searchValue}
prefix={<Icons.Search />} prefix={<Icons.FiSearch />}
autoFocus={props.autoFocus ?? false} autoFocus={props.autoFocus ?? false}
onFocus={props.onFocus} onFocus={props.onFocus}
onBlur={props.onUnfocus} onBlur={props.onUnfocus}

View File

@ -141,7 +141,7 @@ export const DragActiveActions = ({
<Button <Button
type="primary" type="primary"
size="small" size="small"
icon={<Icons.Check />} icon={<Icons.FiCheck />}
onClick={() => setActiveDrag(false)} onClick={() => setActiveDrag(false)}
/> />

View File

@ -156,7 +156,7 @@ export default class StepsForm extends React.Component {
}) })
return () => <div> return () => <div>
<Icons.XCircle /> Error <Icons.FiXCircle /> Error
</div> </div>
} }
}, { }, {
@ -220,7 +220,7 @@ export default class StepsForm extends React.Component {
<ActionsBar mode="float"> <ActionsBar mode="float">
{this.state.step > 0 && ( {this.state.step > 0 && (
<antd.Button style={{ margin: "0 8px" }} onClick={() => this.prev()}> <antd.Button style={{ margin: "0 8px" }} onClick={() => this.prev()}>
<Icons.ChevronLeft /> <Icons.FiChevronLeft />
<Translation> <Translation>
{t => t("Previous")} {t => t("Previous")}
</Translation> </Translation>
@ -228,7 +228,7 @@ export default class StepsForm extends React.Component {
)} )}
{this.state.step < steps.length - 1 && ( {this.state.step < steps.length - 1 && (
<antd.Button disabled={!this.state.canNext} type="primary" onClick={() => this.next()}> <antd.Button disabled={!this.state.canNext} type="primary" onClick={() => this.next()}>
<Icons.ChevronRight /> <Icons.FiChevronRight />
<Translation> <Translation>
{t => t("Next")} {t => t("Next")}
</Translation> </Translation>

View File

@ -93,7 +93,7 @@ export default (props) => {
> >
<div className="uploadButton-content"> <div className="uploadButton-content">
{ {
!progess && (props.icon ?? <Icons.Upload !progess && (props.icon ?? <Icons.FiUpload
style={{ style={{
margin: 0 margin: 0
}} }}

View File

@ -127,9 +127,9 @@ export const UserCard = React.forwardRef((props, ref) => {
</div> </div>
<div className="description"> <div className="description">
<h3> <span>
{user.description} {user.description}
</h3> </span>
</div> </div>
{ {

View File

@ -337,7 +337,8 @@ html {
h3 { h3 {
margin: 0; margin: 0;
font-size: 0.9rem; font-size: 0.8rem;
font-weight: normal;
height: 100%; height: 100%;

View File

@ -11,7 +11,7 @@ const steps = [
{ {
key: "username", key: "username",
title: "Step 1", title: "Step 1",
icon: "User", icon: "FiUser",
description: () => <div> description: () => <div>
<p>Enter your username you gonna use for your account, its used to access to your account.</p> <p>Enter your username you gonna use for your account, its used to access to your account.</p>
<p>It must be unique, on lower case, and contain only accepted characters as letters, numbers, underscores.</p> <p>It must be unique, on lower case, and contain only accepted characters as letters, numbers, underscores.</p>
@ -141,7 +141,7 @@ const steps = [
{ {
key: "password", key: "password",
title: "Step 2", title: "Step 2",
icon: "Key", icon: "FiKey",
description: "Enter a password for the account. must comply with the password requirements policy.", description: "Enter a password for the account. must comply with the password requirements policy.",
required: true, required: true,
content: (props) => { content: (props) => {
@ -256,7 +256,7 @@ const steps = [
{ {
key: "email", key: "email",
title: "Step 3", title: "Step 3",
icon: "Mail", icon: "FiMail",
description: "Enter a email for the account", description: "Enter a email for the account",
required: true, required: true,
content: (props) => { content: (props) => {

View File

@ -16,7 +16,7 @@ const ResultsTypeDecorators = {
label: "Recent" label: "Recent"
}, },
"users": { "users": {
icon: "Users", icon: "FiUsers",
label: "Users" label: "Users"
} }
} }
@ -181,7 +181,7 @@ const UserSelector = (props) => {
placeholder="Start typing to search..." placeholder="Start typing to search..."
onChange={handleOnSearch} onChange={handleOnSearch}
value={searchValue} value={searchValue}
prefix={<Icons.Search />} prefix={<Icons.FiSearch />}
autoFocus={props.autoFocus ?? false} autoFocus={props.autoFocus ?? false}
onFocus={props.onFocus} onFocus={props.onFocus}
onBlur={props.onUnfocus} onBlur={props.onUnfocus}

View File

@ -94,8 +94,8 @@ export default React.memo((props) => {
<div className="widget_preview_item_actions"> <div className="widget_preview_item_actions">
{ {
installed && <antd.Switch installed && <antd.Switch
checkedChildren={<Icons.Eye />} checkedChildren={<Icons.FiEye />}
unCheckedChildren={<Icons.EyeOff />} unCheckedChildren={<Icons.FiEyeOff />}
onChange={(checked) => { onChange={(checked) => {
props.onChangeVisible(checked) props.onChangeVisible(checked)
setVisible(checked) setVisible(checked)
@ -105,7 +105,7 @@ export default React.memo((props) => {
} }
<antd.Button <antd.Button
icon={installed ? <Icons.MdSync /> : <Icons.Plus />} icon={installed ? <Icons.MdSync /> : <Icons.FiPlus />}
onClick={installed ? onUpdate : onInstall} onClick={installed ? onUpdate : onInstall}
type={installed ? "default" : "primary"} type={installed ? "default" : "primary"}
/> />
@ -113,7 +113,7 @@ export default React.memo((props) => {
{ {
installed && <antd.Button installed && <antd.Button
type="primary" type="primary"
icon={<Icons.Trash />} icon={<Icons.FiTrash />}
onClick={handleItemRemove} onClick={handleItemRemove}
danger danger
/> />

View File

@ -53,7 +53,7 @@ export const WidgetBrowser = (props) => {
placeholder="Start typing to search..." placeholder="Start typing to search..."
onChange={handleOnSearch} onChange={handleOnSearch}
value={searchValue} value={searchValue}
prefix={<Icons.Search />} prefix={<Icons.FiSearch />}
autoFocus autoFocus
/> />

View File

@ -259,7 +259,7 @@ export default class WidgetsWrapper extends React.Component {
activeDragActions={[ activeDragActions={[
{ {
id: "settings", id: "settings",
icon: "Settings", icon: "FiSettings",
onClick: () => { onClick: () => {
app.location.push("/settings?tab=widgets") app.location.push("/settings?tab=widgets")
} }

View File

@ -65,7 +65,7 @@ class NotificationUI {
} }
if (notification.icon) { if (notification.icon) {
notfObj.icon = React.isValidElement(notification.icon) ? notification.icon : (createIconRender(notification.icon) ?? <Icons.Bell />) notfObj.icon = React.isValidElement(notification.icon) ? notification.icon : (createIconRender(notification.icon) ?? <Icons.FiBell />)
} }
if (Array.isArray(notification.actions)) { if (Array.isArray(notification.actions)) {

View File

@ -97,7 +97,7 @@ export default class DefaultWindowRender extends React.Component {
actions.push({ actions.push({
key: "close", key: "close",
render: () => <Icons.XCircle style={{ margin: 0, padding: 0 }} />, render: () => <Icons.FiXCircle style={{ margin: 0, padding: 0 }} />,
onClick: () => { onClick: () => {
this.props.close() this.props.close()
}, },

View File

@ -1,7 +1,6 @@
import React from "react" import React from "react"
import * as antd from "antd" import * as antd from "antd"
import classnames from "classnames" import classnames from "classnames"
import { ActionSheet } from "antd-mobile"
import { Motion, spring } from "react-motion" import { Motion, spring } from "react-motion"
import { Icons, createIconRender } from "@components/Icons" import { Icons, createIconRender } from "@components/Icons"
@ -63,7 +62,7 @@ const PlayerButton = (props) => {
const AccountButton = React.forwardRef((props, ref) => { const AccountButton = React.forwardRef((props, ref) => {
const user = app.userData const user = app.userData
const ActionSheetRef = React.useRef() const ActionMenu = React.useRef()
const handleClick = () => { const handleClick = () => {
if (!user) { if (!user) {
@ -74,31 +73,34 @@ const AccountButton = React.forwardRef((props, ref) => {
} }
const handleHold = () => { const handleHold = () => {
ActionSheetRef.current = ActionSheet.show({ ActionMenu.current = app.layout.draggable.actions({
actions: [ list: [
{ {
key: "settings", key: "settings",
text: <><Icons.Settings /> <span>Settings</span></>, icon: "FiSettings",
label: "Settings",
onClick: () => { onClick: () => {
app.navigation.goToSettings() app.navigation.goToSettings()
ActionSheetRef.current.close() ActionMenu.current.close()
} }
}, },
{ {
key: "account", key: "account",
text: <><Icons.User /> <span>Account</span></>, icon: "FiUser",
label: "Account",
onClick: () => { onClick: () => {
app.navigation.goToAccount() app.navigation.goToAccount()
ActionSheetRef.current.close() ActionMenu.current.close()
} }
}, },
{ {
key: "logout", key: "logout",
text: <><Icons.MdOutlineLogout /> <span>Logout</span></>, icon: "FiLogOut",
label: "Logout",
danger: true, danger: true,
onClick: () => { onClick: () => {
app.eventBus.emit("app.logout_request") app.eventBus.emit("app.logout_request")
ActionSheetRef.current.close() ActionMenu.current.close()
} }
} }
] ]
@ -116,7 +118,7 @@ const AccountButton = React.forwardRef((props, ref) => {
> >
<div className="icon"> <div className="icon">
{ {
user ? <antd.Avatar shape="square" src={app.userData.avatar} /> : createIconRender("Login") user ? <antd.Avatar shape="square" src={app.userData.avatar} /> : createIconRender("FiLogin")
} }
</div> </div>
</div> </div>
@ -365,7 +367,7 @@ export class BottomBar extends React.Component {
onClick={openCreator} onClick={openCreator}
> >
<div className="icon"> <div className="icon">
{createIconRender("PlusCircle")} {createIconRender("FiPlusCircle")}
</div> </div>
</div> </div>
@ -395,7 +397,7 @@ export class BottomBar extends React.Component {
}} }}
> >
<div className="icon"> <div className="icon">
{createIconRender("Home")} {createIconRender("FiHome")}
</div> </div>
</div> </div>
@ -406,7 +408,7 @@ export class BottomBar extends React.Component {
onClick={app.controls.openSearcher} onClick={app.controls.openSearcher}
> >
<div className="icon"> <div className="icon">
{createIconRender("Search")} {createIconRender("FiSearch")}
</div> </div>
</div> </div>

View File

@ -11,7 +11,7 @@ export const QuickNavMenuItems = [
}, },
{ {
id: "tv", id: "tv",
icon: "Tv", icon: "FiTv",
label: "Tv", label: "Tv",
location: "/tv" location: "/tv"
}, },
@ -24,7 +24,7 @@ export const QuickNavMenuItems = [
}, },
{ {
id: "marketplace", id: "marketplace",
icon: "Box", icon: "FiBox",
label: "Marketplace", label: "Marketplace",
location: "/marketplace", location: "/marketplace",
disabled: true disabled: true

View File

@ -1,6 +1,9 @@
import React from "react" import React from "react"
import { Drawer } from "vaul" import { Drawer } from "vaul"
import {createIconRender} from "@components/Icons"
import { Translation } from "react-i18next"
import "./index.less" import "./index.less"
export class DraggableDrawerController extends React.Component { export class DraggableDrawerController extends React.Component {
@ -10,6 +13,7 @@ export class DraggableDrawerController extends React.Component {
this.interface = { this.interface = {
open: this.open, open: this.open,
close: this.close, close: this.close,
actions: this.actions,
} }
this.state = { this.state = {
@ -33,6 +37,16 @@ export class DraggableDrawerController extends React.Component {
this.destroy(drawer.id) this.destroy(drawer.id)
} }
actions = (data) => {
const win = this.open("actions-menu", ActionsComponent, {
componentProps: {
...data,
}
})
return win
}
open = (id, render, options = {}) => { open = (id, render, options = {}) => {
let drawerObj = { let drawerObj = {
id: id, id: id,
@ -59,7 +73,10 @@ export class DraggableDrawerController extends React.Component {
drawers: [...this.state.drawers, drawerObj], drawers: [...this.state.drawers, drawerObj],
}) })
return true return {
...drawerObj,
close: () => this.destroy(id),
}
} }
destroy = (id) => { destroy = (id) => {
@ -136,4 +153,26 @@ export const DraggableDrawer = (props) => {
</Drawer.Content> </Drawer.Content>
</Drawer.Portal> </Drawer.Portal>
</Drawer.Root> </Drawer.Root>
}
const ActionsComponent = (props) => {
console.log(props)
return <div
className="app-drawer-actions"
>
{
props.list.map((action) => {
return <div
key={action.id}
className="app-drawer-action"
onClick={() => {
action.onClick()
}}
>
{createIconRender(action.icon)}
<span><Translation>{t => t(action.label)}</Translation></span>
</div>
})
}
</div>
} }

View File

@ -42,4 +42,26 @@
.app-drawer-handle { .app-drawer-handle {
background-color: var(--background-color-contrast); background-color: var(--background-color-contrast);
}
.app-drawer-actions {
display: flex;
flex-direction: column;
gap: 10px;
color: var(--text-color);
.app-drawer-action {
display: inline-flex;
flex-direction: row;
padding: 10px;
border-radius: 12px;
font-size: 1rem;
background-color: var(--background-color-primary);
}
} }

View File

@ -22,7 +22,7 @@ const ActionMenuItems = [
{ {
key: "profile", key: "profile",
label: <> label: <>
<Icons.User /> <Icons.FiUser />
<Translation> <Translation>
{t => t("Profile")} {t => t("Profile")}
</Translation> </Translation>
@ -40,7 +40,7 @@ const ActionMenuItems = [
{ {
key: "addons", key: "addons",
label: <> label: <>
<Icons.Box /> <Icons.FiBox />
<Translation> <Translation>
{t => t("Addons")} {t => t("Addons")}
</Translation> </Translation>
@ -61,7 +61,7 @@ const ActionMenuItems = [
{ {
key: "logout", key: "logout",
label: <> label: <>
<Icons.LogOut /> <Icons.FiLogOut />
<Translation> <Translation>
{t => t("Logout")} {t => t("Logout")}
</Translation> </Translation>
@ -267,7 +267,7 @@ export default class Sidebar extends React.Component {
label: <Translation> label: <Translation>
{t => t("Login")} {t => t("Login")}
</Translation>, </Translation>,
icon: <Icons.LogIn />, icon: <Icons.FiLogIn />,
}) })
} }

View File

@ -227,7 +227,7 @@ export default class Account extends React.Component {
{ {
id: "posts", id: "posts",
label: "Posts", label: "Posts",
icon: "BookOpen", icon: "FiBookOpen",
}, },
{ {
id: "music", id: "music",
@ -237,12 +237,12 @@ export default class Account extends React.Component {
{ {
id: "followers", id: "followers",
label: "Followers", label: "Followers",
icon: "Users", icon: "FiUsers",
}, },
{ {
id: "details", id: "details",
label: "Details", label: "Details",
icon: "Info", icon: "FiInfo",
} }
])} ])}
/> />

View File

@ -19,7 +19,7 @@ import "./index.mobile.less"
const Tabs = [ const Tabs = [
{ {
key: "posts", key: "posts",
icon: "BookOpen", icon: "FiBookOpen",
label: <Translation> label: <Translation>
{t => t("Posts")} {t => t("Posts")}
</Translation>, </Translation>,
@ -27,7 +27,7 @@ const Tabs = [
}, },
{ {
key: "followers", key: "followers",
icon: "Users", icon: "FiUsers",
label: <Translation> label: <Translation>
{t => t("Followers")} {t => t("Followers")}
</Translation>, </Translation>,
@ -35,7 +35,7 @@ const Tabs = [
}, },
{ {
key: "details", key: "details",
icon: "Info", icon: "FiInfo",
label: <Translation> label: <Translation>
{t => t("Details")} {t => t("Details")}
</Translation>, </Translation>,

View File

@ -88,7 +88,7 @@ export default (props) => {
<div className="inline_field"> <div className="inline_field">
<div className="field_header"> <div className="field_header">
<div className="field_icon"> <div className="field_icon">
<Icons.Users /> <Icons.FiUsers />
</div> </div>
<span> <span>
@ -106,7 +106,7 @@ export default (props) => {
<div className="inline_field"> <div className="inline_field">
<div className="field_header"> <div className="field_header">
<div className="field_icon"> <div className="field_icon">
<Icons.Calendar /> <Icons.FiCalendar />
</div> </div>
<span> <span>
@ -122,7 +122,7 @@ export default (props) => {
header={<> header={<>
<div className="field_header"> <div className="field_header">
<div className="field_icon"> <div className="field_icon">
<Icons.Award /> <Icons.FiAward />
</div> </div>
<span> <span>

View File

@ -8,7 +8,7 @@ import PostModel from "@models/post"
const emptyListRender = () => { const emptyListRender = () => {
return <Result return <Result
icon={<Icons.UserX style={{ fontSize: "50px" }} />} icon={<Icons.FiUserX style={{ fontSize: "50px" }} />}
> >
<h2> <h2>
It's seems this user has no public post, yet. It's seems this user has no public post, yet.

View File

@ -83,7 +83,7 @@ const EmailStepComponent = (props) => {
export default { export default {
key: "email", key: "email",
title: "Step 3", title: "Step 3",
icon: "Mail", icon: "FiMail",
description: "Enter a email for the account, it can be used to access to your account. \n Will not be shared with anyone else and not be used for marketing purposes.", description: "Enter a email for the account, it can be used to access to your account. \n Will not be shared with anyone else and not be used for marketing purposes.",
required: true, required: true,
content: EmailStepComponent, content: EmailStepComponent,

View File

@ -118,7 +118,7 @@ export const PasswordStepComponent = (props) => {
export default { export default {
key: "password", key: "password",
title: "Step 2", title: "Step 2",
icon: "Key", icon: "FiKey",
description: "Enter a password for the account. must comply with the password requirements policy.", description: "Enter a password for the account. must comply with the password requirements policy.",
required: true, required: true,
content: PasswordStepComponent, content: PasswordStepComponent,

View File

@ -155,7 +155,7 @@ export const UsernameStepComponent = (props) => {
export default { export default {
key: "username", key: "username",
title: "Step 1", title: "Step 1",
icon: "User", icon: "FiUser",
description: () => <div> description: () => <div>
<p>Enter your username you gonna use for your account, its used to access to your account and give a easy name to identify you.</p> <p>Enter your username you gonna use for your account, its used to access to your account and give a easy name to identify you.</p>
<p>You can set a diferent public name for your account after registration.</p> <p>You can set a diferent public name for your account after registration.</p>

View File

@ -11,7 +11,7 @@ const MainSelector = (props) => {
return <> return <>
<div className="content_header"> <div className="content_header">
<img src={app.isMobile ? config.logo.alt : config.logo.full} className="logo" /> <img src={config.logo.alt} className="logo" />
</div> </div>
<div className="actions"> <div className="actions">
@ -23,14 +23,13 @@ const MainSelector = (props) => {
app.navigation.goMain() app.navigation.goMain()
}} }}
> >
Continue as {app.userData.username} <antd.Avatar size={23} shape="square" src={app.userData.avatar} /> Continue as {app.userData.username}
</antd.Button> </antd.Button>
} }
<antd.Button <antd.Button
onClick={onClickLogin} onClick={onClickLogin}
size="large" icon={<Icons.FiLogIn />}
icon={<Icons.LogIn />}
type="primary" type="primary"
> >
Continue with a Comty Account Continue with a Comty Account
@ -38,28 +37,25 @@ const MainSelector = (props) => {
<antd.Button <antd.Button
onClick={onClickLogin} onClick={onClickLogin}
size="large" icon={<Icons.FiLogIn />}
icon={<Icons.LogIn />}
type="primary" type="primary"
disabled disabled
> >
Continue with a RageStudio© ID Continue with a RageStudio© ID
</antd.Button> </antd.Button>
</div>
<h4>Or create a new account</h4> <h4>Or create a new account</h4>
<div className="actions">
<antd.Button <antd.Button
onClick={onClickRegister} onClick={onClickRegister}
icon={<Icons.UserPlus />} icon={<Icons.FiUserPlus />}
type="primary" type="primary"
> >
Create a Comty Account Create a Comty Account
</antd.Button> </antd.Button>
<p> <p>
<Icons.Info /> <Icons.FiInfo />
Registering a new account accepts the <a onClick={() => app.location.push("/terms")}>Terms and Conditions</a> and <a onClick={() => app.location.push("/privacy")}>Privacy policy</a> for the services provided by {config.author} Registering a new account accepts the <a onClick={() => app.location.push("/terms")}>Terms and Conditions</a> and <a onClick={() => app.location.push("/privacy")}>Privacy policy</a> for the services provided by {config.author}
</p> </p>
</div> </div>

View File

@ -50,7 +50,7 @@ const AuthPage = (props) => {
changeStage(2) changeStage(2)
} }
return <div className="loginPage"> return <div className="login-page">
<div className="background"> <div className="background">
<GradientSVG /> <GradientSVG />
</div> </div>

View File

@ -1,4 +1,4 @@
.loginPage { .login-page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -87,13 +87,13 @@
min-width: 420px; min-width: 420px;
gap: 20px;
padding: 40px; padding: 40px;
.content_header { .content_header {
height: 70px; height: 70px;
margin-bottom: 50px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -109,11 +109,10 @@
width: 100%; width: 100%;
margin-bottom: 20px; gap: 15px;
.ant-btn { .ant-btn {
width: 100%; width: 100%;
margin-bottom: 20px;
font-weight: 500; font-weight: 500;
letter-spacing: -0.6px; letter-spacing: -0.6px;

View File

@ -106,7 +106,7 @@ export default (props) => {
<div className="field"> <div className="field">
<div className="field_header"> <div className="field_header">
<Icons.Eye /> <Icons.FiEye />
<span>Visibility</span> <span>Visibility</span>
</div> </div>

View File

@ -91,7 +91,7 @@ const FileItemEditor = (props) => {
<div className="fileItemEditor_field"> <div className="fileItemEditor_field">
<div className="fileItemEditor_field_header"> <div className="fileItemEditor_field_header">
<Icons.User /> <Icons.FiUser />
<span>Artist</span> <span>Artist</span>
</div> </div>
@ -173,7 +173,7 @@ const FileItemEditor = (props) => {
<div className="fileItemEditor_field"> <div className="fileItemEditor_field">
<div className="fileItemEditor_field_header"> <div className="fileItemEditor_field_header">
<Icons.Tag /> <Icons.FiTag />
<span>Spotify ID</span> <span>Spotify ID</span>
</div> </div>
@ -378,7 +378,7 @@ export default (props) => {
props.fileList.length === 0 ? props.fileList.length === 0 ?
<UploadHint /> : <antd.Button <UploadHint /> : <antd.Button
className="uploadMoreButton" className="uploadMoreButton"
icon={<Icons.Plus />} icon={<Icons.FiPlus />}
/> />
} }
</antd.Upload> </antd.Upload>

View File

@ -137,17 +137,17 @@ export default (props) => {
<div className="panel"> <div className="panel">
<div className="card"> <div className="card">
<div className="dates"> <div className="dates">
<Icons.Calendar /> {Array.isArray(eventData.dates) && renderDates(eventData.dates)} <Icons.FiCalendar /> {Array.isArray(eventData.dates) && renderDates(eventData.dates)}
</div> </div>
<div className="location"> <div className="location">
<Icons.MapPin /> {ProcessString(LocationProcessRegexs)(eventData.location)} <Icons.FiMapPin /> {ProcessString(LocationProcessRegexs)(eventData.location)}
</div> </div>
</div> </div>
<div className="card"> <div className="card">
<Button> <Button>
<Icons.Calendar /> Add to Calendar <Icons.FiCalendar /> Add to Calendar
</Button> </Button>
</div> </div>
</div> </div>

View File

@ -168,7 +168,7 @@ const ChatPage = (props) => {
/> />
<antd.Button <antd.Button
type="primary" type="primary"
icon={<Icons.Send />} icon={<Icons.FiSend />}
onClick={submitMessage} onClick={submitMessage}
/> />
</div> </div>

View File

@ -6,7 +6,7 @@ export default [
{ {
key: "explore", key: "explore",
label: "Explore", label: "Explore",
icon: "Compass", icon: "FiCompass",
component: ExploreTab component: ExploreTab
}, },
{ {
@ -24,7 +24,7 @@ export default [
{ {
key: "radio", key: "radio",
label: "Radio", label: "Radio",
icon: "Radio", icon: "FiRadio",
disabled: true disabled: true
}, },
] ]

View File

@ -28,7 +28,7 @@ export default () => {
<div className="spacesExplorer_header_actions"> <div className="spacesExplorer_header_actions">
<antd.Button <antd.Button
type="primary" type="primary"
icon={<Icons.PlusCircle />} icon={<Icons.FiPlusCircle />}
> >
Create Create
</antd.Button> </antd.Button>

View File

@ -18,8 +18,6 @@ export default (props) => {
return false return false
} }
console.log(result)
switch (result.behavior.type) { switch (result.behavior.type) {
case "url": { case "url": {
return window.location.href = result.behavior.value return window.location.href = result.behavior.value

View File

@ -44,7 +44,7 @@ const PostPage = (props) => {
{ {
!!result.hasReplies && <div className="post-page-replies"> !!result.hasReplies && <div className="post-page-replies">
<h1><Icons.Repeat />Replies</h1> <h1><Icons.FiRepeat />Replies</h1>
<PostsList <PostsList
disableReplyTag disableReplyTag

View File

@ -507,7 +507,7 @@ export default class SettingItemComponent extends React.PureComponent {
{ {
this.state.debouncedValue && <antd.Button this.state.debouncedValue && <antd.Button
type="round" type="round"
icon={<Icons.Save />} icon={<FiSave />}
onClick={async () => await this.dispatchUpdate(this.state.debouncedValue)} onClick={async () => await this.dispatchUpdate(this.state.debouncedValue)}
> >
Save Save

View File

@ -25,7 +25,7 @@ const extraMenuItems = [
label: <div style={{ label: <div style={{
color: "#f72585" color: "#f72585"
}}> }}>
{createIconRender("Heart")} {createIconRender("FiHeart")}
Support us Support us
</div>, </div>,
}, },

View File

@ -16,7 +16,7 @@ const MusicStudioPage = (props) => {
<antd.Button <antd.Button
type="primary" type="primary"
icon={<Icons.PlusCircle />} icon={<Icons.FiPlusCircle />}
onClick={() => { onClick={() => {
app.location.push("/studio/music/new") app.location.push("/studio/music/new")
}} }}

View File

@ -1,7 +1,7 @@
import React from "react" import React from "react"
import * as antd from "antd" import * as antd from "antd"
import useRequest from "comty.js/dist/hooks/useRequest" import useRequest from "comty.js/hooks/useRequest"
import Streaming from "@models/spectrum" import Streaming from "@models/spectrum"
const ProfileConnection = (props) => { const ProfileConnection = (props) => {

View File

@ -12,7 +12,7 @@ export default class Home extends React.Component {
extraItems={[ extraItems={[
{ {
key: "create", key: "create",
icon: "PlusCircle", icon: "FiPlusCircle",
label: <Translation>{(t) => t("Create")}</Translation>, label: <Translation>{(t) => t("Create")}</Translation>,
props: { props: {
type: "primary", type: "primary",

View File

@ -12,13 +12,13 @@ export default [
{ {
key: "global", key: "global",
label: "Global", label: "Global",
icon: "Globe", icon: "FiGlobe",
component: GlobalTab component: GlobalTab
}, },
{ {
key: "savedPosts", key: "savedPosts",
label: "Saved posts", label: "Saved posts",
icon: "Bookmark", icon: "FiBookmark",
component: SavedPostsTab component: SavedPostsTab
} }
] ]

View File

@ -326,7 +326,7 @@ export default class StreamViewer extends React.Component {
{ {
!this.state.isEnded && <div className="livestream_player_header_user_spectators"> !this.state.isEnded && <div className="livestream_player_header_user_spectators">
<antd.Tag <antd.Tag
icon={<Icons.Eye />} icon={<Icons.FiEye />}
> >
{this.state.spectators} {this.state.spectators}
</antd.Tag> </antd.Tag>
@ -388,7 +388,7 @@ export default class StreamViewer extends React.Component {
<div className="chatbox"> <div className="chatbox">
{ {
!this.state.cinemaMode && <div className="chatbox_header"> !this.state.cinemaMode && <div className="chatbox_header">
<h4><Icons.MessageCircle /> Live chat</h4> <h4><Icons.FiMessageCircle /> Live chat</h4>
</div> </div>
} }
<LiveChat <LiveChat

View File

@ -4,13 +4,13 @@ export default [
{ {
key: "live", key: "live",
label: "Livestreams", label: "Livestreams",
icon: "Radio", icon: "FiRadio",
component: LivestreamsList component: LivestreamsList
}, },
{ {
key: "videos", key: "videos",
label: "Videos", label: "Videos",
icon: "Video", icon: "FiVideo",
component: LivestreamsList, component: LivestreamsList,
disabled: true, disabled: true,
}, },
@ -22,13 +22,13 @@ export default [
{ {
key: "controlPanel.uploads", key: "controlPanel.uploads",
label: "Uploads", label: "Uploads",
icon: "Upload", icon: "FiUpload",
disabled: true disabled: true
}, },
{ {
key: "controlPanel.streaming_settings", key: "controlPanel.streaming_settings",
label: "Stream Configuration", label: "Stream Configuration",
icon: "Settings", icon: "FiSettings",
disabled: true, disabled: true,
}, },
{ {

View File

@ -18,7 +18,7 @@ const connectionsTooltipStrings = {
export default { export default {
id: "about", id: "about",
icon: "Info", icon: "FiInfo",
label: "About", label: "About",
group: "bottom", group: "bottom",
render: () => { render: () => {
@ -81,9 +81,9 @@ export default {
</div> </div>
</div> </div>
<div className="versions"> <div className="versions">
<antd.Tag><Icons.Tag />v{window.app.version ?? "experimental"}</antd.Tag> <antd.Tag><Icons.FiTag />v{window.app.version ?? "experimental"}</antd.Tag>
<antd.Tag color={isProduction ? "green" : "magenta"}> <antd.Tag color={isProduction ? "green" : "magenta"}>
{isProduction ? <Icons.CheckCircle /> : <Icons.Triangle />} {isProduction ? <Icons.FiCheckCircle /> : <Icons.FiTriangle />}
{String(import.meta.env.MODE)} {String(import.meta.env.MODE)}
</antd.Tag> </antd.Tag>
</div> </div>
@ -91,7 +91,7 @@ export default {
<div className="group"> <div className="group">
<div className="group_header"> <div className="group_header">
<h3><Icons.Info />Server information</h3> <h3><Icons.FiInfo />Server information</h3>
</div> </div>
<div className="field"> <div className="field">

View File

@ -6,7 +6,7 @@ import "./index.less"
export default { export default {
id: "apparence", id: "apparence",
icon: "Eye", icon: "FiEye",
label: "Apparence", label: "Apparence",
group: "app", group: "app",
order: 1, order: 1,
@ -14,7 +14,7 @@ export default {
{ {
id: "style:variant_mode", id: "style:variant_mode",
group: "aspect", group: "aspect",
icon: "Moon", icon: "FiMoon",
title: "Theme", title: "Theme",
description: "Change the theme of the application.", description: "Change the theme of the application.",
component: loadable(() => import("../components/themeVariantSelector")), component: loadable(() => import("../components/themeVariantSelector")),
@ -135,7 +135,7 @@ export default {
extraActions: [ extraActions: [
{ {
id: "delete", id: "delete",
icon: "Delete", icon: "FiDelete",
title: "Remove", title: "Remove",
onClick: (ctx) => { onClick: (ctx) => {
return ctx.dispatchUpdate("") return ctx.dispatchUpdate("")

View File

@ -69,7 +69,7 @@ const ChangePasswordComponent = (props) => {
return <div className="changePasswordPrompt"> return <div className="changePasswordPrompt">
<div className="title"> <div className="title">
<h1><Icons.Lock />Change Password</h1> <h1><Icons.FiLock />Change Password</h1>
</div> </div>
<div className="form"> <div className="form">

View File

@ -104,7 +104,7 @@ export default class ProfileEditor extends React.Component {
<Button <Button
className="profile_links_field_removebtn" className="profile_links_field_removebtn"
onClick={() => this.remove(index)} onClick={() => this.remove(index)}
icon={<Icons.Trash />} icon={<Icons.FiTrash />}
shape="circle" shape="circle"
/> />
</div> </div>
@ -113,7 +113,7 @@ export default class ProfileEditor extends React.Component {
<Button <Button
onClick={this.add} onClick={this.add}
icon={<Icons.Plus />} icon={<Icons.FiPlus />}
> >
Add Add
</Button> </Button>

View File

@ -32,7 +32,7 @@ const DeviceIcon = (props) => {
return <FirefoxIcon /> return <FirefoxIcon />
} }
default: { default: {
return <Icons.Globe /> return <Icons.FiGlobe />
} }
} }
} }
@ -86,12 +86,12 @@ const SessionItem = (props) => {
<antd.Badge dot={isCurrentSession}> <antd.Badge dot={isCurrentSession}>
<div className="security_sessions_list_item_info"> <div className="security_sessions_list_item_info">
<div className="security_sessions_list_item_title"> <div className="security_sessions_list_item_title">
<h3><Icons.Tag /> {session.session_uuid}</h3> <h3><Icons.FiTag /> {session.session_uuid}</h3>
</div> </div>
<div className="security_sessions_list_item_info_details"> <div className="security_sessions_list_item_info_details">
<div className="security_sessions_list_item_info_details_item"> <div className="security_sessions_list_item_info_details_item">
<Icons.Clock /> <Icons.FiClock />
<span> <span>
{moment(session.date).format("DD/MM/YYYY HH:mm")} {moment(session.date).format("DD/MM/YYYY HH:mm")}
@ -130,7 +130,7 @@ const SessionItem = (props) => {
{ {
ua.device.vendor && <div className="security_sessions_list_item_info_details_item"> ua.device.vendor && <div className="security_sessions_list_item_info_details_item">
<Icons.Cpu /> <Icons.FiCpu />
<span> <span>
{ua.device.vendor} | {ua.device.model} {ua.device.vendor} | {ua.device.model}

View File

@ -28,7 +28,7 @@ export default (props) => {
/> />
<Button <Button
icon={<Icons.Save />} icon={<Icons.FiSave />}
onClick={() => props.ctx.dispatchUpdate(value)} onClick={() => props.ctx.dispatchUpdate(value)}
/> />
</Input.Group> </Input.Group>

View File

@ -49,7 +49,7 @@ export default class WidgetsManager extends React.Component {
> >
<antd.Button <antd.Button
type="primary" type="primary"
icon={<Icons.Plus />} icon={<Icons.FiPlus />}
onClick={openWidgetsBrowserModal} onClick={openWidgetsBrowserModal}
> >
Install more Install more

View File

@ -2,7 +2,7 @@ import config from "@config"
export default { export default {
id: "general", id: "general",
icon: "Command", icon: "FiCommand",
label: "General", label: "General",
group: "app", group: "app",
order: 0, order: 0,

View File

@ -2,7 +2,7 @@ import React from "react"
export default { export default {
id: "notifications", id: "notifications",
icon: "Bell", icon: "FiBell",
label: "Notifications", label: "Notifications",
group: "basic", group: "basic",
settings: [ settings: [

View File

@ -73,7 +73,7 @@ export default {
{ {
id: "player.compressor.values", id: "player.compressor.values",
title: "Compression", title: "Compression",
icon: "Sliders", icon: "FiSliders",
group: "general", group: "general",
description: "Adjust compression values (Warning: may cause distortion when changing values)", description: "Adjust compression values (Warning: may cause distortion when changing values)",
experimental: true, experimental: true,

View File

@ -22,7 +22,7 @@ export default {
], ],
footer: () => { footer: () => {
return <div className="reminder"> return <div className="reminder">
<Icons.Info /> Take a look to our <a href="/privacy" target="_blank">privacy policy</a>. <Icons.FiInfo /> Take a look to our <a href="/privacy" target="_blank">privacy policy</a>.
</div> </div>
} }
} }

View File

@ -4,7 +4,7 @@ import UploadButton from "@components/UploadButton"
export default { export default {
id: "profile", id: "profile",
icon: "User", icon: "FiUser",
label: "Profile", label: "Profile",
group: "basic", group: "basic",
ctxData: async () => { ctxData: async () => {
@ -19,7 +19,7 @@ export default {
id: "username", id: "username",
group: "account.basicInfo", group: "account.basicInfo",
component: "Button", component: "Button",
icon: "AtSign", icon: "FiAtSign",
title: "Username", title: "Username",
description: "Your username is the name you use to log in to your account.", description: "Your username is the name you use to log in to your account.",
props: { props: {
@ -31,7 +31,7 @@ export default {
id: "public_name", id: "public_name",
group: "account.basicInfo", group: "account.basicInfo",
component: "Input", component: "Input",
icon: "Edit3", icon: "FiEdit3",
title: "Name", title: "Name",
description: "Change your public name", description: "Change your public name",
props: { props: {
@ -70,7 +70,7 @@ export default {
id: "email", id: "email",
group: "account.basicInfo", group: "account.basicInfo",
component: "Input", component: "Input",
icon: "Mail", icon: "FiMail",
title: "Email", title: "Email",
description: "Change your email address", description: "Change your email address",
props: { props: {
@ -96,7 +96,7 @@ export default {
{ {
id: "avatar", id: "avatar",
group: "account.profile", group: "account.profile",
icon: "Image", icon: "FiImage",
title: "Avatar", title: "Avatar",
description: "Change your avatar (Upload an image or use an URL)", description: "Change your avatar (Upload an image or use an URL)",
component: loadable(() => import("../components/urlInput")), component: loadable(() => import("../components/urlInput")),
@ -120,7 +120,7 @@ export default {
{ {
id: "cover", id: "cover",
group: "account.profile", group: "account.profile",
icon: "Image", icon: "FiImage",
title: "Cover", title: "Cover",
description: "Change your profile cover (Upload an image or use an URL)", description: "Change your profile cover (Upload an image or use an URL)",
component: loadable(() => import("../components/urlInput")), component: loadable(() => import("../components/urlInput")),
@ -145,7 +145,7 @@ export default {
id: "description", id: "description",
group: "account.profile", group: "account.profile",
component: "TextArea", component: "TextArea",
icon: "Edit3", icon: "FiEdit3",
title: "Description", title: "Description",
description: "Change your description for your profile", description: "Change your description for your profile",
props: { props: {

View File

@ -2,7 +2,7 @@ import loadable from "@loadable/component"
export default { export default {
id: "security", id: "security",
icon: "Shield", icon: "FiShield",
label: "Security", label: "Security",
group: "basic", group: "basic",
settings: [ settings: [
@ -11,7 +11,7 @@ export default {
group: "security.account", group: "security.account",
title: "Change Password", title: "Change Password",
description: "Change your password", description: "Change your password",
icon: "Lock", icon: "FiLock",
component: loadable(() => import("../components/changePassword")), component: loadable(() => import("../components/changePassword")),
}, },
{ {
@ -30,7 +30,7 @@ export default {
group: "security.account", group: "security.account",
title: "Sessions", title: "Sessions",
description: "Manage your active sessions", description: "Manage your active sessions",
icon: "Monitor", icon: "FiMonitor",
component: loadable(() => import("../components/sessions")), component: loadable(() => import("../components/sessions")),
} }
] ]

View File

@ -164,6 +164,7 @@ class OwnTags extends React.Component {
loading: true, loading: true,
error: null, error: null,
data: null, data: null,
editorOpen: false,
} }
loadData = async () => { loadData = async () => {
@ -193,6 +194,23 @@ class OwnTags extends React.Component {
}) })
} }
handleOpenEditor = (props) => {
this.setState({
editorOpen: true
})
OpenTagEditor({
...props,
onFinish: () => {
this.setState({
editorOpen: false
})
this.loadData()
}
})
}
handleTagDelete = (tag) => { handleTagDelete = (tag) => {
antd.Modal.confirm({ antd.Modal.confirm({
title: "Are you sure you want to delete this tag?", title: "Are you sure you want to delete this tag?",
@ -213,6 +231,10 @@ class OwnTags extends React.Component {
} }
handleTagRead = async (error, tag) => { handleTagRead = async (error, tag) => {
if (this.state.editorOpen) {
return false
}
if (error) { if (error) {
console.error(error) console.error(error)
return false return false
@ -222,12 +244,12 @@ class OwnTags extends React.Component {
return ownedTag.serial === tag.serialNumber return ownedTag.serial === tag.serialNumber
}) })
if (!ownedTag && app.layout.drawer.drawersLength() === 0) { if (!ownedTag) {
app.message.error("This tag is not registered or you don't have permission to edit it.") app.message.error("This tag is not registered or you don't have permission to edit it.")
return false return false
} }
return OpenTagEditor({ return this.handleOpenEditor({
tag: ownedTag tag: ownedTag
}) })
} }
@ -243,6 +265,7 @@ class OwnTags extends React.Component {
} }
render() { render() {
console.log(this.state)
if (this.state.loading) { if (this.state.loading) {
return <div className="tap-share-own_tags"> return <div className="tap-share-own_tags">
<antd.Skeleton /> <antd.Skeleton />
@ -268,8 +291,8 @@ class OwnTags extends React.Component {
key={tag.serialNumber} key={tag.serialNumber}
tag={tag} tag={tag}
onEdit={() => { onEdit={() => {
OpenTagEditor({ this.handleOpenEditor({
tag tag: tag
}) })
}} }}
onDelete={() => { onDelete={() => {
@ -278,15 +301,35 @@ class OwnTags extends React.Component {
/> />
}) })
} }
{
app.isMobile && <antd.Button
type="primary"
icon={<Icons.FiPlus />}
onClick={() => this.handleOpenEditor({})}
className="tap-share-own_tags-add"
>
Add new
</antd.Button>
}
</div> </div>
} }
} }
const OpenTagEditor = ({ tag, onFinish = () => app.navigation.softReload() } = {}) => { const OpenTagEditor = ({ tag, onFinish = () => app.navigation.softReload() } = {}) => {
app.layout.drawer.open("tag_register", RegisterNewTag, { if (!app.layout.draggable) {
return app.layout.drawer.open("tag_register", RegisterNewTag, {
props: {
onFinish: onFinish,
tagData: tag,
}
})
}
return app.layout.draggable.open("tag_register", RegisterNewTag, {
componentProps: { componentProps: {
tagData: tag,
onFinish: onFinish, onFinish: onFinish,
tagData: tag,
} }
}) })
} }
@ -329,16 +372,6 @@ const TapShareRender = () => {
editMode editMode
/> />
</div> </div>
{
app.isMobile && <antd.Button
type="primary"
icon={<Icons.Plus />}
onClick={() => OpenTagEditor()}
>
Add new
</antd.Button>
}
</div> </div>
} }

View File

@ -42,9 +42,13 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
.tap-share-own_tags-add {
width: 100%;
}
.tap-share-own_tags-item { .tap-share-own_tags-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -151,13 +155,14 @@
} }
.tap-share-register-header-back { .tap-share-register-header-back {
font-size: 5rem; font-size: 2rem;
color: var(--colorPrimary); color: var(--colorPrimary);
&.hidden { &.hidden {
width: 0; width: 0;
height: 0; height: 0;
padding: 0; padding: 0;
display: none;
} }
} }
@ -175,18 +180,12 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center;
height: 100%; height: 100%;
.tap-share-register_step { .tap-share-register_step {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center;
align-items: flex-start;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -194,8 +193,13 @@
transition: all 150ms ease-in-out; transition: all 150ms ease-in-out;
.adm-input-element {
color: var(--text-color);
}
h1 { h1 {
transition: all 150ms ease-in-out; transition: all 150ms ease-in-out;
color: var(--text-color);
} }
&.centered { &.centered {
@ -236,13 +240,16 @@
height: fit-content; height: fit-content;
padding: 0; padding: 0;
margin: 0; margin: 0;
}
color: var(--text-color);
}
} }
.description { .description {
font-size: 0.8rem; font-size: 0.8rem;
opacity: 0.8; opacity: 0.8;
color: var(--text-color);
} }
} }
} }
@ -256,6 +263,8 @@
gap: 20px; gap: 20px;
padding: 10px; padding: 10px;
color: var(--text-color);
} }
} }
} }

View File

@ -80,10 +80,11 @@ export default (props) => {
disabled disabled
/> />
</antd.Form.Item> </antd.Form.Item>
<antd.Form.Item <antd.Form.Item
name="alias" name="alias"
label={<> label={<>
<Icons.Tag /> <Icons.FiTag />
Alias Alias
</>} </>}
rules={[ rules={[

View File

@ -4,7 +4,7 @@ import WidgetsManager from "../components/widgetsManager"
export default { export default {
id: "widgets", id: "widgets",
icon: "List", icon: "FiList",
label: "Widgets", label: "Widgets",
group: "app", group: "app",
render: () => { render: () => {

View File

@ -41,6 +41,15 @@ export default defineConfig({
}, },
build: { build: {
target: "esnext", target: "esnext",
rollupOptions: {
output:{
manualChunks(id) {
if (id.includes('node_modules')) {
return id.toString().split('node_modules/')[1].split('/')[0].toString();
}
}
}
}
}, },
esbuild: { esbuild: {
supported: { supported: {