Skip to content

Commit

Permalink
Merge pull request #13 from line/dev
Browse files Browse the repository at this point in the history
V3
  • Loading branch information
thebestluck authored Mar 7, 2024
2 parents 265d127 + 6c34e9f commit 969c838
Show file tree
Hide file tree
Showing 38 changed files with 863 additions and 300 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

permissions:
contents: read
contents: write
pages: write
id-token: write

Expand Down Expand Up @@ -45,3 +45,31 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

# Tagging job
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Read packages.json
run: |
echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV
- name: Generate tag version (headver)
run: |
VERSION_PREFIX="v"
VERSION_HEAD=$(cut -d '.' -f 1 <<< ${{ fromJson(env.PACKAGE_JSON).version }})
VERSION_YEAR=$(date +%g)
VERSION_WEEK=$(date +%V)
VERSION_BUILD=${{github.run_number}}
NEW_TAG="${VERSION_PREFIX}${VERSION_HEAD}.${VERSION_YEAR}${VERSION_WEEK}.${VERSION_BUILD}"
echo "Generated new tag: $NEW_TAG"
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
- name: Push Git Tag
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag $NEW_TAG
git push origin $NEW_TAG
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ The `app.config.json` should be as below;
| backgrounds | Array of images. (Detailed explanation about `Image` is below) | |
| inputFields (optional) | Set up an input field group just for this theme | |
| isNew (optional) | If it's true, new icon shows up next to this theme | `false` |
| isHidden (optional) | If it's true, this theme will be hidden | `false` |

### 🌆 Background Images

Expand Down Expand Up @@ -171,6 +172,7 @@ The `app.config.json` should be as below;
| offset | Adjusting detail position from origin point. (Detailed explanation is below) | |
| isRequired (optional) | | `false` |
| text (optional) | Default value of input | `""` |
| tooltip (optional) | Allows you to add a description of the input. | `""` |

- Offset

Expand Down Expand Up @@ -282,7 +284,7 @@ With above structure, let say you want to override `themes` node for `office` th
"fields": [
{
"label": "name",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -297,7 +299,7 @@ With above structure, let say you want to override `themes` node for `office` th
"fields": [
{
"label": "Team Name",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand Down
34 changes: 18 additions & 16 deletions app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
"type": "filesystem",
"path": "backgrounds"
},
"contributeGuide": "./CONTRIBUTING.md",
"fonts": {
"sizes": {
"large": "6rem",
"medium": "4.5rem",
"regular": "3.5rem",
"small": "3rem",
"caption": "1.5rem"
"XLarge": "6rem",
"Large": "4.5rem",
"Base": "3.5rem",
"Small": "3rem",
"XSmall": "1.5rem"
},
"styles": ["LINE Seed"]
},
Expand All @@ -28,17 +29,18 @@
"fields": [
{
"label": "name",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
"y": "0%"
},
"isRequired": true
"isRequired": true,
"tooltip": "Please enter your name."
},
{
"label": "team",
"fontSize": "small",
"fontSize": "Small",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -47,7 +49,7 @@
},
{
"label": "role",
"fontSize": "small",
"fontSize": "Small",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -70,7 +72,7 @@
"fields": [
{
"label": "name",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -80,7 +82,7 @@
},
{
"label": "team",
"fontSize": "small",
"fontSize": "Small",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -89,7 +91,7 @@
},
{
"label": "role",
"fontSize": "small",
"fontSize": "Small",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -103,7 +105,7 @@
"fields": [
{
"label": "Company",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -124,7 +126,7 @@
"fields": [
{
"label": "name",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -134,7 +136,7 @@
},
{
"label": "role",
"fontSize": "small",
"fontSize": "Small",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand All @@ -148,7 +150,7 @@
"fields": [
{
"label": "Company",
"fontSize": "medium",
"fontSize": "Large",
"fontStyle": "LINE Seed",
"offset": {
"x": "0%",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "abc-virtual-background-maker",
"private": true,
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
7 changes: 5 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* under the License.
*/
import { CSSProperties, useEffect, useRef } from "react";
import { keyColor, title } from "~/output.config.json";
import config from "~/output.config.json";

import {
DownloadButton,
Expand All @@ -23,10 +23,13 @@ import {
SyncButton,
ThemeMenu,
} from "@/components";
import { Config } from "@/constants/config";
import { AppProvider, useMediaQuery, useSnapshot, useTitle } from "@/hooks";
import locales from "@/locales/en-US.json";
import styles from "./App.module.scss";

function App() {
const { keyColor, title } = config as unknown as Config;
const imageAreaRef = useRef<HTMLDivElement>(null);
const { saveImage, loading } = useSnapshot(imageAreaRef);
const { logo, text } = title;
Expand Down Expand Up @@ -62,7 +65,7 @@ function App() {
<div className={styles.content}>
<nav className={styles.navigation}>
<h2>
Select Theme <SyncButton />
{locales["title"]["theme"]} <SyncButton />
</h2>
<div>
<ThemeMenu />
Expand Down
103 changes: 103 additions & 0 deletions src/components/Alert/Alert.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/**
* Copyright 2023 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

.dim {
position: fixed;
top: 0;
left: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: var(--background-dim);
animation: fade-in 0.3s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.modal {
padding: 1rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
max-width: min(45rem, calc(100vw - 3rem));
background-color: var(--background-tertiary);
white-space: pre-line;
text-align: center;
border-radius: 0.5rem;
animation:
fade-in 0.3s cubic-bezier(0.17, 0.55, 0.55, 1),
scale-up 0.3s cubic-bezier(0.17, 0.55, 0.55, 1);

:global {
.material-symbols-outlined {
margin-bottom: 0.5rem;
color: var(--red-primary);
font-size: 2rem;
font-variation-settings:
"FILL" 1,
"wght" 400,
"GRAD" 0,
"opsz" 24;
}
}

strong {
@include font("16", "label-primary");

font-weight: bold;
}

p {
@include font("14", "label-secondary");

margin-top: 0.5rem;
}
}

.button {
@include font("16", "label-above-primary");

margin-top: 1rem;
width: 100%;
height: 3rem;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--red-primary);
border-radius: 0.5rem;
}

@keyframes fade-in {
from {
opacity: 0;
}

to {
opacity: 1;
}
}

@keyframes scale-up {
from {
transform: scale(0.85);
}

to {
transform: scale(1);
}
}
Loading

0 comments on commit 969c838

Please sign in to comment.