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

Feature/v22.12.1 #40

Merged
merged 2 commits into from Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog

## ZaDark v22.12.1
> PC v6.1 && Web v7.1

### Changed
- Thêm nhận diện thương hiệu của Nhà phát hành
- Cập nhật địa chỉ Website chính thức sang https://zadark.quaric.com
- Thêm Menu "Donate"

## ZaDark v22.11.2
> PC v6.0 && Web v7.0

Expand Down
2 changes: 1 addition & 1 deletion src/core/scss/zadark.scss
@@ -1,6 +1,6 @@
/*
ZaDark – Zalo Dark Mode
Made by NCDAi Studio
Made by Quaric
*/

@mixin zadark-colors {
Expand Down
2 changes: 1 addition & 1 deletion src/pc/assets/js/zadark-auto.js
@@ -1,6 +1,6 @@
/*
ZaDark – Zalo Dark Mode
Made by NCDAi Studio
Made by Quaric

This script helps to handle the "Sync with system" feature
*/
Expand Down
2 changes: 1 addition & 1 deletion src/pc/constants.js
@@ -1,6 +1,6 @@
/*
ZaDark – Zalo Dark Mode
Made by NCDAi Studio
Made by Quaric
*/

const os = require('os')
Expand Down
30 changes: 23 additions & 7 deletions src/pc/index.js
@@ -1,6 +1,6 @@
/*
ZaDark – Zalo Dark Mode
Made by NCDAi Studio
Made by Quaric
*/

const prompt = require('prompt-sync')()
Expand All @@ -13,9 +13,11 @@ const { PLATFORM, ZADARK_VERSION } = require('./constants')
const renderHeader = () => {
log('')
log(chalk.blueBright.bold('ZaDark – Zalo Dark Mode'))
log(chalk.blueBright('Website :', chalk.underline('https://zadark.ncdaistudio.com')))
log(chalk.blueBright('Website :', chalk.underline('https://zadark.quaric.com')))
log(chalk.blueBright('Phien ban :', `${PLATFORM === 'darwin' ? 'macOS' : 'Windows'}-${ZADARK_VERSION}`))
log('')
log(chalk.blueBright('<ZaDark from Quaric>'))
log('')
}

const handleInstall = async (zaloResDirList, isSyncWithSystem = false) => {
Expand All @@ -34,7 +36,7 @@ const handleInstall = async (zaloResDirList, isSyncWithSystem = false) => {
(async () => {
try {
if (PLATFORM === 'darwin' && !isRoot()) {
const supportUrl = 'https://zadark.ncdaistudio.com/pc/macos#run-zadark-as-root'
const supportUrl = 'https://zadark.quaric.com/pc/macos#run-zadark-as-root'
open(supportUrl)
throw new Error(`Vui long chay ZaDark voi quyen Root (${supportUrl}).`)
}
Expand Down Expand Up @@ -71,6 +73,9 @@ const handleInstall = async (zaloResDirList, isSyncWithSystem = false) => {
log('2. Vui long thoat Zalo PC truoc khi cai dat, go cai dat ZaDark.')
log('3. Vui long cai dat lai ZaDark sau khi cap nhat Zalo PC.')
log('')
log(chalk.greenBright('Neu ban yeu thich ZaDark, ban co the Donate cho ZaDark tai dia chi :'))
log(chalk.greenBright(chalk.underline('https://zadark.quaric.com/donate')))
log('')

prompt(chalk.yellowBright('> Nhan', chalk.bold('[enter]'), 'de bat dau ...'))

Expand All @@ -84,11 +89,12 @@ const handleInstall = async (zaloResDirList, isSyncWithSystem = false) => {
log('3. Khoi phuc Zalo PC goc')
log('')

log('4. Lien he')
log('5. Thoat')
log('4. Donate')
log('5. Lien he')
log('6. Thoat')
log('')

const featureIndex = prompt(chalk.yellowBright('> Nhap STT chuc nang', chalk.bold('[1-5]'), 'va nhan', chalk.bold('[enter]'), ': '))
const featureIndex = prompt(chalk.yellowBright('> Nhap STT chuc nang', chalk.bold('[1-6]'), 'va nhan', chalk.bold('[enter]'), ': '))

console.clear()
renderHeader()
Expand Down Expand Up @@ -117,9 +123,19 @@ const handleInstall = async (zaloResDirList, isSyncWithSystem = false) => {
}

case '4': {
log(chalk.magentaBright.bold('[DONATE]'))

const donateUrl = 'https://zadark.quaric.com/donate'
log('>> Truy cap', chalk.underline(donateUrl))
open(donateUrl)

break
}

case '5': {
log(chalk.magentaBright.bold('[LIEN HE]'))

const contactUrl = 'https://zadark.ncdaistudio.com/contact'
const contactUrl = 'https://zadark.quaric.com/contact'
log('>> Truy cap', chalk.underline(contactUrl))
open(contactUrl)

Expand Down
2 changes: 1 addition & 1 deletion src/pc/package.json
@@ -1,7 +1,7 @@
{
"name": "zadark-pc",
"description": "Dark Mode tốt nhất cho Zalo",
"version": "6.0",
"version": "6.1",
"main": "index.js",
"repository": "git@github.com:ncdai3651408/za-dark.git",
"author": "Dai Nguyen <ncdai3651408@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion src/pc/zadark-pc.js
@@ -1,6 +1,6 @@
/*
ZaDark – Zalo Dark Mode
Made by NCDAi Studio
Made by Quaric
*/

const fs = require('fs')
Expand Down
26 changes: 20 additions & 6 deletions src/web/changelog.html
Expand Up @@ -15,18 +15,22 @@
<body>
<header class="main-header">
<div class="ext-logo">
<a href="https://zadark.ncdaistudio.com" title="ZaDark – Zalo Dark Mode" target="_blank">
<img src="images/zadark-logo-text.svg" alt="ZaDark" />
<a href="https://zadark.quaric.com" title="ZaDark – Zalo Dark Mode" target="_blank">
<img src="images/zadark-lockup.svg" alt="ZaDark" />
</a>
</div>

<div class="ext-links">
<span class="ext-links-item divider">
<a href="https://zadark.ncdaistudio.com" title="Website chính thức" target="_blank">Website</a>
<a href="https://zadark.quaric.com" title="Website chính thức" target="_blank">Website</a>
</span>

<span class="ext-links-item divider">
<a href="https://short.ncdaistudio.com/zadark-github" title="Mã nguồn ZaDark" target="_blank">GitHub</a>
<a href="https://go.quaric.com/zadark-github" title="Mã nguồn ZaDark" target="_blank">GitHub</a>
</span>

<span class="ext-links-item divider">
<a href="https://zadark.quaric.com/donate" title="Donate" target="_blank">Donate</a>
</span>

<span class="ext-links-item">
Expand All @@ -41,11 +45,13 @@ <h1 class="text-2xl mb-4 font-semibold">Có gì mới trong ZaDark v<span id="js
<div class="panel">
<div class="panel-body">
<p>
Chào bạn! Bạn đã cập nhật <a href="https://zadark.ncdaistudio.com" title="ZaDark" target="_blank">ZaDark</a> thành công. Đây là những thay đổi trong phiên bản này:
Chào bạn! Bạn đã cập nhật <a href="https://zadark.quaric.com" title="ZaDark" target="_blank">ZaDark</a> thành công. Đây là những thay đổi trong phiên bản này:
</p>

<ul>
<li>Sửa lỗi hiển thị sai màu sắc do Zalo Web có sự thay đổi lớn lần 2 về bảng màu (Colors CSS Variables) từ ngày 22/11/2022</li>
<li>Thêm nhận diện thương hiệu của Nhà phát hành</li>
<li>Cập nhật địa chỉ Website chính thức sang https://zadark.quaric.com</li>
<li>Thêm Menu "Donate" trên Header của Extension Popup</li>
</ul>

<p>Cảm ơn bạn đã tin tưởng sử dụng ZaDark!</p>
Expand All @@ -64,6 +70,14 @@ <h1 class="text-2xl mb-4 font-semibold">Có gì mới trong ZaDark v<span id="js
</div>
</div>
</div>

<div class="flex justify-center">
<div class="zadark-from-quaric">
<span class="text-gray-400">ZaDark from</span>
<img src="images/quaric-lockup-dark.svg" class="quaric-lockup quaric-lockup-dark">
<img src="images/quaric-lockup-light.svg" class="quaric-lockup quaric-lockup-light">
</div>
</div>
</main>

<script src="libs/jquery/jquery-3.6.0.min.js"></script>
Expand Down
9 changes: 9 additions & 0 deletions src/web/images/quaric-lockup-dark.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/web/images/quaric-lockup-light.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
2 changes: 1 addition & 1 deletion src/web/js/changelog.js
@@ -1,7 +1,7 @@
/*
ZaDark – Zalo Dark Mode
Browser Extension
Made by NCDAi Studio
Made by Quaric
*/

const manifestData = window.zadark.browser.getManifest()
Expand Down
2 changes: 1 addition & 1 deletion src/web/js/execute-script.js
@@ -1,7 +1,7 @@
/*
ZaDark – Zalo Dark Mode
Browser Extension
Made by NCDAi Studio
Made by Quaric
*/

if (window.zadark) {
Expand Down
2 changes: 1 addition & 1 deletion src/web/js/popup.js
@@ -1,7 +1,7 @@
/*
ZaDark – Zalo Dark Mode
Browser Extension
Made by NCDAi Studio
Made by Quaric
*/

const versionElName = '#js-ext-version'
Expand Down
2 changes: 1 addition & 1 deletion src/web/js/utils.js
@@ -1,7 +1,7 @@
/*
ZaDark – Zalo Dark Mode
Browser Extension
Made by NCDAi Studio
Made by Quaric

! This file must use VanillaJS
*/
Expand Down
2 changes: 1 addition & 1 deletion src/web/js/zadark.js
@@ -1,7 +1,7 @@
/*
ZaDark – Zalo Dark Mode
Browser Extension
Made by NCDAi Studio
Made by Quaric
*/

window.zadark.browser.initClassNames()
Expand Down
20 changes: 16 additions & 4 deletions src/web/popup.html
Expand Up @@ -17,18 +17,22 @@
<div class="ext-container">
<header class="main-header">
<div class="ext-logo">
<a href="https://zadark.ncdaistudio.com" title="ZaDark – Zalo Dark Mode" target="_blank">
<img src="images/zadark-logo-text.svg" alt="ZaDark" />
<a href="https://zadark.quaric.com" title="ZaDark – Zalo Dark Mode" target="_blank">
<img src="images/zadark-lockup.svg" alt="ZaDark" />
</a>
</div>

<div class="ext-links">
<span class="ext-links-item divider">
<a href="https://zadark.ncdaistudio.com" title="Website chính thức" target="_blank">Website</a>
<a href="https://zadark.quaric.com" title="Website chính thức" target="_blank">Website</a>
</span>

<span class="ext-links-item divider">
<a href="https://short.ncdaistudio.com/zadark-github" title="Mã nguồn ZaDark" target="_blank">GitHub</a>
<a href="https://go.quaric.com/zadark-github" title="Mã nguồn ZaDark" target="_blank">GitHub</a>
</span>

<span class="ext-links-item divider">
<a href="https://zadark.quaric.com/donate" title="Donate" target="_blank">Donate</a>
</span>

<span class="ext-links-item">
Expand Down Expand Up @@ -110,6 +114,14 @@
</div>
</div>
</div>

<div class="mt-4 flex justify-center">
<div class="zadark-from-quaric">
<span class="text-gray-400">ZaDark from</span>
<img src="images/quaric-lockup-dark.svg" class="quaric-lockup quaric-lockup-dark">
<img src="images/quaric-lockup-light.svg" class="quaric-lockup quaric-lockup-light">
</div>
</div>
</main>
</div>

Expand Down
37 changes: 36 additions & 1 deletion src/web/scss/core.scss
Expand Up @@ -35,6 +35,10 @@ html[data-zadark-theme="light"] {
body {
-webkit-font-smoothing: antialiased;
}

.quaric-lockup-dark {
display: inline-block;
}
}

html[data-zadark-theme="dark"] {
Expand Down Expand Up @@ -78,10 +82,14 @@ html[data-zadark-theme="dark"] {
body {
-webkit-font-smoothing: auto;
}

.quaric-lockup-light {
display: inline-block;
}
}

html:root {
--primary-base: #0E70FF;
--primary-base: #0e70ff;
--primary-dark: #035bdc;

--border-base: var(--grey-300);
Expand Down Expand Up @@ -164,6 +172,10 @@ code {
&.items-center {
align-items: center;
}

&.justify-center {
justify-content: center;
}
}
.flex-1 {
flex: 1;
Expand Down Expand Up @@ -459,3 +471,26 @@ header.main-header {
padding: 16px;
}
}

.zadark-from-quaric {
height: 32px;

display: inline-flex;
align-items: center;
justify-content: center;

padding: 0 16px;
border: 1px solid var(--border-base);
border-radius: 16px;
user-select: none;

span {
color: var(--neutral-500);
}

.quaric-lockup {
height: 12px;
display: none;
margin-left: 8px;
}
}
2 changes: 1 addition & 1 deletion src/web/scss/popup.scss
@@ -1,6 +1,6 @@
/*
ZaDark – Zalo Dark Mode
Made by NCDAi Studio
Made by Quaric
*/

:root {
Expand Down
4 changes: 2 additions & 2 deletions src/web/vendor/chrome/background.js
@@ -1,12 +1,12 @@
/*
ZaDark – Zalo Dark Mode
Chrome Extension
Made by NCDAi Studio
Made by Quaric
*/

chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === 'install') {
chrome.tabs.create({ url: 'https://zadark.ncdaistudio.com/web/chrome' })
chrome.tabs.create({ url: 'https://zadark.quaric.com/web/chrome' })
}

if (details.reason === 'update') {
Expand Down
2 changes: 1 addition & 1 deletion src/web/vendor/chrome/browser.js
@@ -1,7 +1,7 @@
/*
ZaDark – Zalo Dark Mode
Chrome Extension
Made by NCDAi Studio
Made by Quaric

! This file must use VanillaJS
*/
Expand Down