Compare commits
No commits in common. "e8bb51d388f990b6c59e61c106a28199f41fc092" and "44fc06cd4ba6762aa3a05a82d826a335dee934c3" have entirely different histories.
e8bb51d388
...
44fc06cd4b
5 changed files with 3 additions and 38 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -2,20 +2,6 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [0.4.1] - 2023-04-05
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- Stop propagation of key events on menu search
|
|
||||||
- Use sh
|
|
||||||
- Remove version prefix from "latest" tag
|
|
||||||
- Detect CI commit SHA
|
|
||||||
- Use better abbreviations for page names
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- Add upload script
|
|
||||||
|
|
||||||
## [0.4.0] - 2023-04-02
|
## [0.4.0] - 2023-04-02
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "talon"
|
name = "talon"
|
||||||
version = "0.4.1"
|
version = "0.4.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["ThetaDev <t.testboy@gmail.com>"]
|
authors = ["ThetaDev <t.testboy@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -48,7 +48,7 @@ commit_parsers = [
|
||||||
{ message = "^refactor", group = "Refactor"},
|
{ message = "^refactor", group = "Refactor"},
|
||||||
{ message = "^style", group = "Styling"},
|
{ message = "^style", group = "Styling"},
|
||||||
{ message = "^test", group = "Testing"},
|
{ message = "^test", group = "Testing"},
|
||||||
{ message = "^chore\\(release\\):", skip = true},
|
{ message = "^chore\\(release\\): (prepare for|bump)", skip = true},
|
||||||
{ message = "(^chore)|(^ci)", group = "Miscellaneous Tasks"},
|
{ message = "(^chore)|(^ci)", group = "Miscellaneous Tasks"},
|
||||||
{ body = ".*security", group = "Security"},
|
{ body = ".*security", group = "Security"},
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import Icon from "./Icon.svelte";
|
import Icon from "./Icon.svelte";
|
||||||
import type { Website } from "talon-client";
|
import type { Website } from "talon-client";
|
||||||
import { talonConfig } from "../util/talonData";
|
import { talonConfig } from "../util/talonData";
|
||||||
import { getAbbreviation } from "../util/functions";
|
|
||||||
|
|
||||||
export let website: Website;
|
export let website: Website;
|
||||||
export let size = 40;
|
export let size = 40;
|
||||||
|
@ -16,7 +15,7 @@
|
||||||
? `${talonConfig.internal}/icons/${website.subdomain}`
|
? `${talonConfig.internal}/icons/${website.subdomain}`
|
||||||
: null}
|
: null}
|
||||||
color={website.color}
|
color={website.color}
|
||||||
alt={getAbbreviation(website.name)}
|
alt={website.name.substring(0, 2)}
|
||||||
{size}
|
{size}
|
||||||
{scale}
|
{scale}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -81,23 +81,3 @@ export function trimCommit(commit: string | undefined): string | undefined {
|
||||||
export function isMobile(): boolean {
|
export function isMobile(): boolean {
|
||||||
return window.innerWidth < 768;
|
return window.innerWidth < 768;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a 2-letter abbreviation of the website name.
|
|
||||||
*
|
|
||||||
* If the name consists of multiple words
|
|
||||||
* (separated by spaces, underscores or CamelCase), output
|
|
||||||
* the first letters of these words.
|
|
||||||
*
|
|
||||||
* Otherwise output the first letters of the name.
|
|
||||||
*/
|
|
||||||
export function getAbbreviation(name: string): string {
|
|
||||||
const split_sep = name
|
|
||||||
.replace(/([a-z])([A-Z])/g, "$1_$2")
|
|
||||||
.split(/[ ,.;_-]/)
|
|
||||||
.filter((x) => x.length > 0);
|
|
||||||
if (split_sep.length >= 2) {
|
|
||||||
return split_sep[0].charAt(0) + split_sep[1].charAt(0);
|
|
||||||
}
|
|
||||||
return name.substring(0, 2);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue