change action to be run manually

This commit is contained in:
Send_Nukez 2021-10-26 15:37:21 +02:00
parent fdff6230a1
commit 28cac984b2
14 changed files with 4616 additions and 345 deletions

45
.github/workflows/release.yaml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version of Release'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Dependencies
run: npm install
- name: Build Webpack
run: npm run build
env:
DRIBBBLISH_VERSION: ${{ github.event.inputs.version }}
- name: Install zip
uses: montudor/action-zip@v1
- name: Zip Files
run: zip -r DribbblishDynamic_${{ github.event.inputs.version }}.zip *
working-directory: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.version }}
files: dist/DribbblishDynamic_${{ github.event.inputs.version }}.zip

View file

@ -1,33 +0,0 @@
name: Webpack
on:
push:
branches:
- main
jobs:
webpack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- run: npm run build
- run: |
cd "$GITHUB_ACTION_PATH"
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Action"
git pull
git add -f dist
git commit -m "Compile Webpack"
git push

File diff suppressed because one or more lines are too long

5
dist/user.css vendored
View file

@ -454,7 +454,8 @@ span.artist-artistVerifiedBadge-badge svg > path:last-of-type {
.main-userWidget-box.update-avail,
.view-homeShortcutsGrid-shortcut,
:not(.view-homeShortcutsGrid-imageWrapper) > .main-image-image:not(.main-avatar-image) {
border-radius: var(--image-radius) !important; }
border-radius: var(--image-radius) !important;
padding-right: 10px; }
.main-avatar-image,
.main-userWidget-box:not(.update-avail),
@ -928,7 +929,7 @@ li.GlueDropTarget {
/** Grid */
.Root__top-container {
grid-template-areas: "nav-bar main-view buddy-feed" "nav-bar now-playing-bar buddy-feed";
grid-template-areas: "nav-bar main-view buddy-feed" "nav-bar now-playing-bar buddy-feed";
padding: var(--main-gap) 0; }
html:not(.buddyfeed-visible) .Root__top-container {

923
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,7 @@
{
"devDependencies": {
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^9.0.1",
"file-loader": "^6.2.0",
"node-sass": "^6.0.1",
"sass-loader": "^12.2.0",

162
src/color.ini Normal file
View file

@ -0,0 +1,162 @@
[base]
text = FFFFFF
subtext = F0F0F0
sidebar-text = FFFFFF
main = 000000
sidebar = 1ed760
player = 000000
card = 000000
shadow = 202020
selected-row = 797979
button = 1ed760
button-active = 1ed760
button-disabled = 535353
tab-active = 166632
notification = 1db954
notification-error = e22134
misc = BFBFBF
[white]
text = 363636
subtext = 3D3D3D
sidebar-text = FFF9F4
main = FFF9F4
sidebar = FFA789
player = FFF9F4
card = FFF9F4
shadow = d3d3d3
selected-row = 6D6D6D
button = ff8367
button-active = ff8367
button-disabled = 535353
tab-active = ffdace
notification = FFA789
notification-error = e22134
misc = BFBFBF
[dark]
text = F0F0F0
subtext = F0F0F0
sidebar-text = 0a0e14
main = 0a0e14
sidebar = C2D935
player = 0a0e14
card = 0a0e14
shadow = 202020
selected-row = DEDEDE
button = C2D935
button-active = C2D935
button-disabled = 535353
tab-active = 727d2b
notification = C2D935
notification-error = e22134
misc = BFBFBF
[dracula]
text = f8f8f2
subtext = f8f8f2
sidebar-text = F0F0F0
main = 44475a
sidebar = 6272a4
player = 44475a
card = 6272a4
shadow = 000000
selected-row = bd93f9
button = ffb86c
button-active = 8be9fd
button-disabled = 535353
tab-active = 6272a4
notification = bd93f9
notification-error = e22134
misc = BFBFBF
[nord-light]
text = 2e3440
subtext = 3b4252
sidebar-text = ECEFF4
main = ECEFF4
sidebar = 5E81AC
player = ECEFF4
card = ebcb8b
shadow = eceff4
selected-row = 4c566a
button = 81a1c1
button-active = 81a1c1
button-disabled = c0c0c0
tab-active = ebcb8b
notification = a3be8c
notification-error = bf616a
misc = BFBFBF
[nord-dark]
text = ECEFF4
subtext = E5E9F0
sidebar-text = 434c5e
main = 2e3440
sidebar = 88C0D0
player = 2e3440
card = 2e3440
shadow = 2E3440
selected-row = D8DEE9
button = 81A1C1
button-active = 81A1C1
button-disabled = 434C5E
tab-active = 434C5E
notification = A3BE8C
notification-error = BF616A
misc = BFBFBF
[purple]
text = f1eaff
subtext = f1eaff
sidebar-text = e0d0ff
main = 0A0E14
sidebar = 6F3C89
player = 0A0E14
card = 0A0E14
shadow = 3a2645
selected-row = EBDFFF
button = c76af6
button-active = 6F3C89
button-disabled = 535353
tab-active = 58306D
notification = ff9e00
notification-error = f61379
misc = DEDEDE
[samourai]
text = ebdbb2
subtext = ebdbb2
sidebar-text = 461217
main = 461217
sidebar = ebdbb2
player = 461217
card = 461217
shadow = 3a2645
selected-row = 909090
button = e7a52d
button-active = e7a52d
button-disabled = 535353
tab-active = e7a52d
notification = e7a52d
notification-error = e22134
misc = BFBFBF
[beach-sunset]
text = FFFFFF
subtext = F0F0F0
sidebar-text = F0F0F0
main = 262626
sidebar = bd3e3e
player = 262626
card = 262626
shadow = 000000
selected-row = d1d6e2
button = f1a84f
button-active = c98430
button-disabled = 535353
tab-active = f1a84f
notification = c98430
notification-error = e22134
misc = BFBFBF

View file

@ -3,7 +3,7 @@ import chroma from "chroma-js";
import ConfigMenu from "./ConfigMenu";
const CURRENT_VERSION = "2.6.0";
const CURRENT_VERSION = process.env.DRIBBBLISH_VERSION;
class _DribbblishShared {
constructor() {
@ -690,16 +690,18 @@ hookCoverChange(false);
return response.json();
})
.then((data) => {
if (data.tag_name > CURRENT_VERSION) {
const upd = document.createElement("div");
const upd = document.createElement("div");
upd.classList.add("ellipsis-one-line", "main-type-finale");
upd.setAttribute("title", `Changes: ${data.name}`);
upd.style.setProperty("color", "var(--spice-button-active)");
if (CURRENT_VERSION == "Dev") {
upd.innerText = "Dev version!";
} else if (data.tag_name > CURRENT_VERSION) {
upd.innerText = `Theme UPD v${data.tag_name} avail.`;
upd.classList.add("ellipsis-one-line", "main-type-finale");
upd.setAttribute("title", `Changes: ${data.name}`);
upd.style.setProperty("color", "var(--spice-button-active)");
document.querySelector(".main-userWidget-box").append(upd);
document.querySelector(".main-userWidget-box").classList.add("update-avail");
new Spicetify.Menu.Item("Update Dribbblish", false, () => window.open("https://github.com/JulienMaille/dribbblish-dynamic-theme/blob/main/README.md#install--update", "_blank")).register();
}
document.querySelector(".main-userWidget-box").append(upd);
document.querySelector(".main-userWidget-box").classList.add("update-avail");
})
.catch((err) => {
// Do something for an error here

View file

@ -434,6 +434,7 @@ span.artist-artistVerifiedBadge-badge svg > path:last-of-type {
.view-homeShortcutsGrid-shortcut,
:not(.view-homeShortcutsGrid-imageWrapper) > .main-image-image:not(.main-avatar-image) {
border-radius: var(--image-radius) !important;
padding-right: 10px;
}
.main-avatar-image,

View file

@ -1,4 +1,6 @@
const webpack = require("webpack");
const CopyPlugin = require("copy-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const path = require("path");
module.exports = {
@ -28,5 +30,14 @@ module.exports = {
]
},
devtool: false,
plugins: [new webpack.SourceMapDevToolPlugin({})]
plugins: [
new CleanWebpackPlugin(),
new webpack.DefinePlugin({
"process.env.DRIBBBLISH_VERSION": JSON.stringify((process.env.DRIBBBLISH_VERSION || "vDev").substring(1)) // Substring because the script expects the version to be `X.X.X` and not `vX.X.X`
}),
new webpack.SourceMapDevToolPlugin({}),
new CopyPlugin({
patterns: [{ from: "src/assets", to: "assets" }, { from: "src/color.ini" }]
})
]
};