Skip to content
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

Fix/linkstyle220812 #216

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
13 changes: 13 additions & 0 deletions .github/deployment/Dockerfile-affine-multiplatform
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG BASE_IMAGE=localhost:5000/toeverything/relocate:latest

FROM ${BASE_IMAGE} as relocate

# =============
# AFFiNE image
# =============
FROM caddy:2.4.6-alpine as AFFiNE
WORKDIR /app
COPY --from=relocate /app .

EXPOSE 3000
CMD ["caddy", "run"]
34 changes: 31 additions & 3 deletions .github/workflows/affine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
NAMESPACE: toeverything
AFFINE_IMAGE_NAME: AFFiNE
IMAGE_TAG_LATEST: nightly-latest
LOCAL_CACHE: localhost:5000/toeverything/relocate:latest

jobs:
ligo-virgo:
Expand All @@ -28,30 +29,57 @@ jobs:
contents: read
packages: write

services:
registry:
image: registry:2
ports:
- 5000:5000

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host

- name: Extract metadata (tags, labels) for Docker (AFFiNE-Local)
id: meta_affine
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.AFFINE_IMAGE_NAME }}
tags: ${{ env.IMAGE_TAG_LATEST }}

- name: Build and push Docker image (AFFINE-Local)
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./.github/deployment/Dockerfile-affine
tags: ${{ env.LOCAL_CACHE }}
target: AFFiNE

- name: Build and push Docker image (AFFINE-Local)
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64/v8
file: ./.github/deployment/Dockerfile-affine-multiplatform
push: ${{ github.ref == 'refs/heads/master' && true || false }}
tags: ${{ steps.meta_affine.outputs.tags }}
labels: ${{ steps.meta_affine.outputs.labels }}
target: AFFiNE
build-args: |
BASE_IMAGE=${{ env.LOCAL_CACHE }}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"Backlinks",
"blockdb",
"booktitle",
"Buildx",
"Cascader",
"clsx",
"cssmodule",
Expand Down
11 changes: 6 additions & 5 deletions libs/components/common/src/lib/text/plugins/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { ReactEditor } from 'slate-react';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
import EditIcon from '@mui/icons-material/Edit';
import LinkOffIcon from '@mui/icons-material/LinkOff';
import AttachmentIcon from '@mui/icons-material/Attachment';
import {
MuiTooltip as Tooltip,
styled,
Expand All @@ -39,7 +38,7 @@ import {

import { getRandomString } from '../utils';
import { colors } from '../../colors';

import { LinkIcon } from '@toeverything/components/icons';
export type LinkElement = {
type: 'link';
url: string;
Expand Down Expand Up @@ -124,7 +123,7 @@ const LinkStyledTooltip = styled(({ className, ...props }: MuiTooltipProps) => (
))(({ theme }) => ({
[`& .${muiTooltipClasses.tooltip}`]: {
backgroundColor: '#fff',
color: '#4C6275',
color: '#3E6FDB',
boxShadow: theme.affine.shadows.shadow1,
fontSize: '14px',
},
Expand Down Expand Up @@ -419,8 +418,8 @@ export const LinkModal = memo((props: LinkModalProps) => {
}}
>
<div className={styles('linkModalContainerIcon')}>
<AttachmentIcon
style={{ color: colors.Gray04, fontSize: 16 }}
<LinkIcon
style={{ fontSize: '16px', marginTop: '2px' }}
/>
</div>
<input
Expand Down Expand Up @@ -505,6 +504,7 @@ const LinkModalContainer = styled('div')(({ theme }) => ({

const styles = style9.create({
linkModalContainerIcon: {
display: 'flex',
width: '16px',
margin: '0 16px 0 4px',
},
Expand All @@ -517,6 +517,7 @@ const styles = style9.create({
'::-webkit-input-placeholder': {
color: '#98acbd',
},
color: '#4C6275',
},
linkMask: {
position: 'fixed',
Expand Down
3 changes: 3 additions & 0 deletions libs/components/editor-blocks/src/blocks/page/PageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,8 @@ const PageTitleBlock = styled('div')(({ theme }) => {
'.content': {
outline: 'none',
},
a: {
color: '#3e6fdb',
},
};
});
2 changes: 1 addition & 1 deletion libs/components/icons/src/auto-icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const timestamp = 1660239514133;
export const timestamp = 1660291261961;
export * from './image/image';
export * from './format-clear/format-clear';
export * from './backward-undo/backward-undo';
Expand Down