Compare commits
5 commits
10fa537a56
...
5f876ffc25
Author | SHA1 | Date | |
---|---|---|---|
Natsu Kagami | 5f876ffc25 | ||
Natsu Kagami | eebd0d9d03 | ||
Natsu Kagami | be27b9d1e0 | ||
Natsu Kagami | 6bcd4877bd | ||
Natsu Kagami | a036c9a326 |
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -25,3 +25,7 @@ dist-ssr
|
||||||
|
|
||||||
# Custom
|
# Custom
|
||||||
.env.dev
|
.env.dev
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
.direnv
|
||||||
|
result
|
||||||
|
|
|
@ -43,7 +43,7 @@ Everything is designed and engineered following my taste and vision. This is a p
|
||||||
|
|
||||||
- **Status actions (reply, boost, favourite, bookmark, etc) are hidden by default**.<br>They only appear in individual status page. This is to reduce clutter and distraction. It may result in lower engagement, but we're not chasing numbers here.
|
- **Status actions (reply, boost, favourite, bookmark, etc) are hidden by default**.<br>They only appear in individual status page. This is to reduce clutter and distraction. It may result in lower engagement, but we're not chasing numbers here.
|
||||||
- **Boost is represented with the rocket icon**.<br>The green double arrow icon (retweet for Twitter) doesn't look right for the term "boost". Green rocket looks weird, so I use purple.
|
- **Boost is represented with the rocket icon**.<br>The green double arrow icon (retweet for Twitter) doesn't look right for the term "boost". Green rocket looks weird, so I use purple.
|
||||||
- **Short usernames (`@username`) are displayed in timelines, instead of the full account username (`@username@instance`)**.<br>Despite the [guideline](https://docs.joinmastodon.org/api/guidelines/#username) mentioned that "Decentralization must be transparent to the user", I don't think we should shove it to the face every single time. There are also some [screen-reader-related accessibility concerns](https://twitter.com/lifeofablindgrl/status/1595864647554502656) with the full username, though this web app is unfortunately not accessible yet.
|
- ~~**Short usernames (`@username`) are displayed in timelines, instead of the full account username (`@username@instance`)**.<br>Despite the [guideline](https://docs.joinmastodon.org/api/guidelines/#username) mentioned that "Decentralization must be transparent to the user", I don't think we should shove it to the face every single time. There are also some [screen-reader-related accessibility concerns](https://twitter.com/lifeofablindgrl/status/1595864647554502656) with the full username, though this web app is unfortunately not accessible yet.~~ DTTHDon fork displays the full username by default.
|
||||||
- **No autoplay for video/GIF/whatever in timeline**.<br>The timeline is already a huge mess with lots of people, brands, news and media trying to grab your attention. Let's not make it worse. (Current exception now would be animated emojis.)
|
- **No autoplay for video/GIF/whatever in timeline**.<br>The timeline is already a huge mess with lots of people, brands, news and media trying to grab your attention. Let's not make it worse. (Current exception now would be animated emojis.)
|
||||||
- **Hash-based URLs**.<br>This web app is not meant to be a full-fledged replacement to Mastodon's existing front-end. There's no SEO, database, serverless or any long-running servers. I could be wrong one day.
|
- **Hash-based URLs**.<br>This web app is not meant to be a full-fledged replacement to Mastodon's existing front-end. There's no SEO, database, serverless or any long-running servers. I could be wrong one day.
|
||||||
|
|
||||||
|
|
61
flake.lock
Normal file
61
flake.lock
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689068808,
|
||||||
|
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689413807,
|
||||||
|
"narHash": "sha256-exuzOvOhGAEKWQKwDuZAL4N8a1I837hH5eocaTcIbLc=",
|
||||||
|
"owner": "nixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "46ed466081b9cad1125b11f11a2af5cc40b942c7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
38
flake.nix
Normal file
38
flake.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = github:nixOS/nixpkgs/nixpkgs-unstable;
|
||||||
|
inputs.flake-utils.url = github:numtide/flake-utils;
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
lib = pkgs.lib;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.default = pkgs.buildNpmPackage {
|
||||||
|
pname = "dtth-phanpy";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [ git ];
|
||||||
|
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
|
npmDepsHash = "sha256-1c6ZyWIfV4rBnZA7mSNH7ikCbJvbTRS3SacIjBW3yhc=";
|
||||||
|
|
||||||
|
# DTTH-specific env variables
|
||||||
|
VITE_CLIENT_NAME = "DTTH Phanpy";
|
||||||
|
VITE_CLIENT_ID = "ch.dtth.phanpy";
|
||||||
|
VITE_WEBSITE = "https://social.dtth.ch";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp -r dist $out/lib/phanpy
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [ nodejs ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
|
@ -15,6 +15,9 @@ a.name-text.short:is(:hover, :focus) i {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
|
.name-text i.instance {
|
||||||
|
opacity: 0.35;
|
||||||
|
}
|
||||||
|
|
||||||
.name-text .avatar {
|
.name-text .avatar {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -60,12 +60,13 @@ function NameText({
|
||||||
<b>
|
<b>
|
||||||
<EmojiText text={displayName} emojis={emojis} />
|
<EmojiText text={displayName} emojis={emojis} />
|
||||||
</b>
|
</b>
|
||||||
{!showAcct && username && (
|
{!showAcct && username ? (
|
||||||
<>
|
<>
|
||||||
{' '}
|
{' '}
|
||||||
<i>@{username}</i>
|
<i>@{username}</i>
|
||||||
</>
|
</>
|
||||||
)}
|
) : ' '}
|
||||||
|
<i class="instance">{acct2}</i>
|
||||||
</>
|
</>
|
||||||
) : short ? (
|
) : short ? (
|
||||||
<i>@{username}</i>
|
<i>@{username}</i>
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Login() {
|
||||||
const cachedInstanceURL = store.local.get('instanceURL');
|
const cachedInstanceURL = store.local.get('instanceURL');
|
||||||
const [uiState, setUIState] = useState('default');
|
const [uiState, setUIState] = useState('default');
|
||||||
const [instanceText, setInstanceText] = useState(
|
const [instanceText, setInstanceText] = useState(
|
||||||
cachedInstanceURL?.toLowerCase() || '',
|
cachedInstanceURL?.toLowerCase() || 'gts.dtth.ch',
|
||||||
);
|
);
|
||||||
|
|
||||||
const [instancesList, setInstancesList] = useState([]);
|
const [instancesList, setInstancesList] = useState([]);
|
||||||
|
@ -25,6 +25,9 @@ function Login() {
|
||||||
const res = await fetch(instancesListURL);
|
const res = await fetch(instancesListURL);
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
setInstancesList(data);
|
setInstancesList(data);
|
||||||
|
|
||||||
|
// Automatically just login to DTTHDon
|
||||||
|
submitInstance("gts.dtth.ch")
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Silently fail
|
// Silently fail
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
|
@ -38,7 +38,7 @@ function Welcome() {
|
||||||
</b>
|
</b>
|
||||||
</big>
|
</big>
|
||||||
</p>
|
</p>
|
||||||
<p class="desc">A minimalistic opinionated Mastodon web client.</p>
|
<p class="desc">A minimalistic opinionated DTTHDon web client.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="why-container">
|
<div id="why-container">
|
||||||
<div class="sections">
|
<div class="sections">
|
||||||
|
@ -99,8 +99,13 @@ function Welcome() {
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
<p>
|
||||||
|
<a href="https://git.dtth.ch/nki/phanpy" target="_blank">
|
||||||
|
DTTHDon Fork
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<a href="https://github.com/cheeaun/phanpy" target="_blank">
|
<a href="https://github.com/cheeaun/phanpy" target="_blank">
|
||||||
Built
|
Original built
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
by{' '}
|
by{' '}
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -16,7 +16,10 @@ const {
|
||||||
} = loadEnv('production', process.cwd());
|
} = loadEnv('production', process.cwd());
|
||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
const commitHash = (() => {
|
||||||
|
try { return execSync('git rev-parse --short HEAD').toString().trim(); }
|
||||||
|
catch (e) { return "unknown"; }
|
||||||
|
})();
|
||||||
|
|
||||||
const rollbarCode = fs.readFileSync(
|
const rollbarCode = fs.readFileSync(
|
||||||
resolve(__dirname, './rollbar.js'),
|
resolve(__dirname, './rollbar.js'),
|
||||||
|
|
Loading…
Reference in a new issue